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

via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 27 08:54:26 PDT 2025


================
@@ -524,6 +525,354 @@ class CoreturnStmt : public Stmt {
   }
 };
 
+/// CXXExpansionStmt - Base class for an unexpanded C++ expansion statement.
+class CXXExpansionStmt : public Stmt {
+  friend class ASTStmtReader;
+
+  ExpansionStmtDecl *ParentDecl;
+  SourceLocation ForLoc;
+  SourceLocation LParenLoc;
+  SourceLocation ColonLoc;
+  SourceLocation RParenLoc;
+
+protected:
+  enum SubStmt {
+    INIT,
----------------
Sirraide wrote:

We do in a lot of the other AST nodes when it comes to specifically this kind of enum that is used to access sub statements, but to be fair that might be because a lot of them are old code.

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


More information about the cfe-commits mailing list