[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 2 11:25:41 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 &&
----------------
yronglin wrote:
I originally want to emit this warning in C99 mode, but now I have changed the condition here to C23.
https://github.com/llvm/llvm-project/pull/146224
More information about the cfe-commits
mailing list