================
@@ -457,6 +457,12 @@ def err_expansion_stmt_requires_cxx2c : Error<
"expansion statements are only supported in C++2c">;
def err_for_template : Error<
"'for template' is invalid; use 'template for' instead">;
+def ext_expansion_stmt_body_not_compound_stmt : Extension<
+ "ISO C++ requires the body of an expansion statement to be a compound
statement">,
+ InGroup<ExpansionStmtBody>;
+def ext_expansion_stmt_body_attr : Extension<
+ "ISO C++ forbids attributes before the compound statement of an expansion
statement">,
+ InGroup<ExpansionStmtBody>;
----------------
cor3ntin wrote:
I do not think we need 2 diagnostics
`[[]]{}` is not a compound statement therefore
`ext_expansion_stmt_body_not_compound_stmt` is enough
https://github.com/llvm/llvm-project/pull/209229
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits