================
@@ -164,7 +177,7 @@ bool Sema::ValidateBoundsAttrTypeShape(QualType Ty,
SourceLocation AttrLoc,
// Exception: void has an implicit size of 1 byte for pointer arithmetic
// (following GNU convention). Therefore, counted_by on void* is allowed
// and behaves equivalently to sized_by (treating the count as bytes).
- if (PointeeTy->isVoidType() && !getLangOpts().hasBoundsSafetyAttributes())
{
----------------
rapidsna wrote:
Good catch. I'll restore it. I originally dropped it because counted_by on void
* used to work upstream with or without -fexperimental-bounds-safety, and
dropping the guard kept attr-counted-by-void-ptr-gnu.c passing. But downstream
doesn't support counted_by on void * yet (swiftlang/llvm-project#11807), so
it's better to keep the downstream behavior for now and update the test.
https://github.com/llvm/llvm-project/pull/233582
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits