[clang] [Clang][P1061] Add stuctured binding packs (PR #121417)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 07:00:05 PST 2025


================
@@ -5321,6 +5321,58 @@ class BuiltinBitCastExpr final
   }
 };
 
+// Represents an unexpanded pack where the list of expressions are
+// known. These are used when structured bindings introduce a pack.
+class ResolvedUnexpandedPackExpr final
+    : public Expr,
+      private llvm::TrailingObjects<ResolvedUnexpandedPackExpr, Stmt *> {
----------------
erichkeane wrote:

The only place you're using this as a Stmt is for children, and the cast that way is 'safe' (and Expr isa Stmt).  This change likely saves a bunch of casting elsewhere.

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


More information about the cfe-commits mailing list