[clang] [Clang] [Sema] Allow non-local/non-variable declarations in for loop (PR #129737)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 5 11:05:37 PST 2025
================
@@ -10794,6 +10794,23 @@ def err_non_local_variable_decl_in_for : Error<
"declaration of non-local variable in 'for' loop">;
def err_non_variable_decl_in_for : Error<
"non-variable declaration in 'for' loop">;
+
+def ext_c23_non_local_variable_decl_in_for : Extension<
----------------
Sirraide wrote:
> You should remove the error diagnostics because they're no longer used.
Well, they *are* still used for C++ range-based for loops and for whatever an `ObjCForCollectionStmt` is.
https://github.com/llvm/llvm-project/pull/129737
More information about the cfe-commits
mailing list