[clang] [clang][Parser] Warn when the body of expansion statement is not a compound statement (PR #209229)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 13 09:53:43 PDT 2026
================
@@ -457,6 +457,9 @@ 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_requires_braced_body : ExtWarn<
+ "ISO C++ requires a compound statement to be the body of expansion statement">,
+ InGroup<DiagGroup<"expansion-stmt-braced-body">>, DefaultIgnore;
----------------
Sirraide wrote:
Isn’t `ExtWarn<>` + `DefaultIgnore` just `Extension<>`?
https://github.com/llvm/llvm-project/pull/209229
More information about the cfe-commits
mailing list