================
@@ -2379,6 +2383,9 @@ StmtResult Parser::ParseForStatement(SourceLocation
*TrailingElseLoc,
return StmtError();
}
+ if (!isa<CompoundStmt>(Body.get()) || BodyStartsWithSquare)
+ Diag(BodyBeginLoc, diag::ext_expansion_stmt_missing_braces);
+
----------------
zwuis wrote:
Copied from changes in this PR:
> ```cpp
> // attribute-specifier without attribute (`[[]]`) isn't in AST.
> ```
https://github.com/llvm/llvm-project/pull/209229
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits