================
@@ -152,7 +152,8 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr
*E, bool CountInBytes,
InvalidTypeKind = CountedByInvalidPointeeTypeKind::SIZELESS;
} else if (PointeeTy->isFunctionType()) {
InvalidTypeKind = CountedByInvalidPointeeTypeKind::FUNCTION;
- } else if (PointeeTy->isStructureTypeWithFlexibleArrayMember()) {
+ } else if (PointeeTy->isStructureTypeWithFlexibleArrayMember() &&
+ !CountInBytes) {
----------------
delcypher wrote:
Followup here: https://github.com/llvm/llvm-project/pull/209713
https://github.com/llvm/llvm-project/pull/209603
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits