================
@@ -2269,10 +2269,11 @@ StmtResult Sema::ActOnForStmt(SourceLocation ForLoc,
SourceLocation LParenLoc,
for (auto *DI : DS->decls()) {
if (VarDecl *VD = dyn_cast<VarDecl>(DI)) {
VarDeclSeen = true;
- if (VD->isLocalVarDecl() && !VD->hasLocalStorage()) {
- Diag(DI->getLocation(), diag::err_non_local_variable_decl_in_for);
- DI->setInvalidDecl();
- }
+ if (VD->isLocalVarDecl() && !VD->hasLocalStorage())
----------------
Sirraide wrote:
There is a C99 quote further up above on line 2264; we could add a comment that
mentions that this changed at some point though. Something like ‘C23 has no
such restriction’ maybe?
https://github.com/llvm/llvm-project/pull/129737
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits