[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 2: Parsing and Parser Tests) (PR #169681)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon May 4 08:33:41 PDT 2026


================
@@ -450,6 +455,14 @@ def err_unspecified_size_with_static : Error<
   "'static' may not be used without an array size">;
 def err_expected_parentheses_around_typename : Error<
   "expected parentheses around type name in %0 expression">;
+def err_expansion_stmt_requires_range : Error<
+  "expansion statement must be a range-based for loop">;
----------------
Sirraide wrote:

Yeah, I was struggling w/ the wording here too; maybe ‘`template for` cannot be used with a C-style `for` loop’ or sth like that? 

(Yes, that error would probably not make much sense if someone were to try and combine `template for` w/ an Objective-C for-in loop, but I do hope no-one is actually going to try and do that...)

https://github.com/llvm/llvm-project/pull/169681


More information about the llvm-branch-commits mailing list