================
@@ -1166,26 +1166,54 @@
TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) {
Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) {
auto *NewBD = BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(),
- D->getIdentifier());
+ D->getIdentifier(), D->getType());
NewBD->setReferenced(D->isReferenced());
SemaRef.CurrentInstantiationScope->InstantiatedLocal(D, NewBD);
+
return NewBD;
}
Decl *TemplateDeclInstantiator::VisitDecompositionDecl(DecompositionDecl *D) {
// Transform the bindings first.
+ // The transformed DD will have all of the concrete BindingDecls.
SmallVector<BindingDecl*, 16> NewBindings;
- for (auto *OldBD : D->bindings())
+ ResolvedUnexpandedPackExpr *OldResolvedPack = nullptr;
+ for (auto *OldBD : D->bindings()) {
+ Expr *BindingExpr = OldBD->getBinding();
+ if (auto *RP =
dyn_cast_if_present<ResolvedUnexpandedPackExpr>(BindingExpr))
+ OldResolvedPack = RP;
----------------
zyn0217 wrote:
We probably want to assert there's no more than one ResolvedUnexpandedPackExpr
around
https://github.com/llvm/llvm-project/pull/121417
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits