[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 08:55:44 PST 2025


================
@@ -1178,13 +1178,13 @@ Decl *TemplateDeclInstantiator::VisitDecompositionDecl(DecompositionDecl *D) {
   // Transform the bindings first.
   // The transformed DD will have all of the concrete BindingDecls.
   SmallVector<BindingDecl*, 16> NewBindings;
-  ResolvedUnexpandedPackExpr *OldResolvedPack = nullptr;
+  BindingDecl *OldBindingPack = nullptr;
   for (auto *OldBD : D->bindings()) {
     Expr *BindingExpr = OldBD->getBinding();
-    if (auto *RP =
-            dyn_cast_if_present<ResolvedUnexpandedPackExpr>(BindingExpr)) {
-      assert(!OldResolvedPack && "no more than one pack is allowed");
-      OldResolvedPack = RP;
+    if (isa_and_nonnull<FunctionParmPackExpr>(BindingExpr)) {
----------------
zyn0217 wrote:

isa_and_present

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


More information about the cfe-commits mailing list