================ @@ -1197,25 +1197,19 @@ Decl *TemplateDeclInstantiator::VisitDecompositionDecl(DecompositionDecl *D) { for (auto *NewBD : NewBindings) NewBD->setInvalidDecl(); - if (OldResolvedPack) { - // Mark the holding vars (if any) in the pack as instantiated since - // they are created implicitly. + if (OldBindingPack) { + // Mark the bindings in the pack as instantiated. auto Bindings = NewDD->bindings(); - auto BPack = llvm::find_if( + BindingDecl *NewBindingPack = *llvm::find_if( Bindings, [](BindingDecl *D) -> bool { return D->isParameterPack(); }); ---------------- ricejasonf wrote:
What do you think about capturing the index of the old pack in the loop above and using that instead of searching? https://github.com/llvm/llvm-project/pull/125394 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits