[clang] [BoundsSafety] WIP: Make 'counted_by' work for pointer fields; late parsing for 'counted_by' on decl attr position (PR #87596)

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 13:52:58 PDT 2024


================
@@ -4997,7 +5087,11 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
 
   ParsedAttributes attrs(AttrFactory);
   // If attributes exist after struct contents, parse them.
-  MaybeParseGNUAttributes(attrs);
+  MaybeParseGNUAttributes(attrs, &LateFieldAttrs);
+
+  assert(!getLangOpts().CPlusPlus);
----------------
delcypher wrote:

Should we remove the assert? Are we restricting late parsing to C only?

https://github.com/llvm/llvm-project/pull/87596


More information about the cfe-commits mailing list