[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 3: Enumerating Expansion Statements) (PR #169682)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Mar 19 07:09:16 PDT 2026


================
@@ -24,6 +24,45 @@
 using namespace clang;
 using namespace sema;
 
+// Build a 'DeclRefExpr' designating the template parameter '__N'.
+static DeclRefExpr *BuildIndexDRE(Sema &S, CXXExpansionStmtDecl *ESD) {
+  return S.BuildDeclRefExpr(ESD->getIndexTemplateParm(),
+                            S.Context.getPointerDiffType(), VK_PRValue,
+                            ESD->getBeginLoc());
+}
+
+static bool FinaliseExpansionVar(Sema &S, VarDecl *ExpansionVar,
----------------
Sirraide wrote:

Right, American spelling; I’ll update that. Also, I used PascalCase instead of camelCase because that’s what the rest of Sema uses

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


More information about the llvm-branch-commits mailing list