[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 5: Iterating Expansion Statements) (PR #169684)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 7 07:34:42 PDT 2026


================
@@ -242,5 +545,187 @@ Sema::ComputeExpansionSize(CXXExpansionStmtPattern *Expansion) {
         ->getRangeExpr()
         ->getNumInits();
 
+  // CWG 3131: N is the result of evaluating the expression
+  //
+  // [&] consteval {
+  //    std::ptrdiff_t result = 0;
+  //    auto b = begin-expr;
+  //    auto e = end-expr;
+  //    for (; b != e; ++b) ++result;
+  //    return result;
+  // }()
----------------
Sirraide wrote:

Unfortunately not: consteval reuse the lambda parsing code... but we have no parser here

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


More information about the llvm-branch-commits mailing list