[clang] [clang][Parser] Warn when the body of expansion statement is not a compound statement (PR #209229)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 15 06:56:55 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_missing_braces : Extension<
+ "ISO C++ requires a compound statement to be the body of an expansion statement">,
----------------
AaronBallman wrote:
```suggestion
"ISO C++ requires the body of an expansion statement to be a compound statement">,
```
This just seems to read better to me, WDYT?
https://github.com/llvm/llvm-project/pull/209229
More information about the cfe-commits
mailing list