================ @@ -2269,11 +2269,10 @@ 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(), - getLangOpts().C23 - ? diag::warn_c17_non_local_variable_decl_in_for - : diag::ext_c23_non_local_variable_decl_in_for); + if (VD->isLocalVarDecl() && !VD->hasLocalStorage()) { + Diag(DI->getLocation(), diag::err_non_local_variable_decl_in_for); + DI->setInvalidDecl(); + } ---------------- Sirraide wrote:
Either github is having a stroke or something went wrong here because I don’t think this has anything to do with this pr. 👀 https://github.com/llvm/llvm-project/pull/130299 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits