[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 1 11:21:57 PDT 2025


================
@@ -80,6 +81,11 @@ Parser::ParseStatementOrDeclaration(StmtVector &Stmts,
   assert((CXX11Attrs.empty() || Res.isInvalid() || Res.isUsable()) &&
          "attributes on empty statement");
 
+  if (HasStdAttr && getLangOpts().C99 &&
----------------
AaronBallman wrote:

Why are all the checks predicated on C99?

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


More information about the cfe-commits mailing list