================ @@ -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(); }); ---------------- zyn0217 wrote:
For sanity (we have lost the assertion of `cast`ing a non-null pointer), we'd better add an non-null assertion here 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