[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:42 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(); });
----------------
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
More information about the cfe-commits
mailing list