[clang] [Clang][P1061] Consolidate ResolvedUnpexandedPackExpr into FunctionParmPackExpr (PR #125394)
Jason Rice via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 6 09:35:54 PST 2025
================
@@ -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
More information about the cfe-commits
mailing list