[clang] [Clang] [C++26] Implement P1306R5 Expansion Statements (PR #165195)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 1 12:35:44 PDT 2025


================
@@ -445,6 +450,8 @@ 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 range-based">;
----------------
cor3ntin wrote:

This sounds a bit clunky.
Maybe "must be a ranged based for loop" or just point at the first semi colon and say "unexpected token"

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


More information about the cfe-commits mailing list