================ @@ -7216,9 +7216,30 @@ TreeTransform<Derived>::TransformElaboratedType(TypeLocBuilder &TLB, return QualType(); } - QualType NamedT = getDerived().TransformType(TLB, TL.getNamedTypeLoc()); - if (NamedT.isNull()) - return QualType(); + QualType NamedT; + if (SemaRef.getLangOpts().CPlusPlus20 && QualifierLoc && + isa<TemplateSpecializationType>(TL.getNamedTypeLoc().getType())) { + TemplateSpecializationTypeLoc SpecTL = + TL.getNamedTypeLoc().castAs<TemplateSpecializationTypeLoc>(); + const TemplateSpecializationType *TST = + SpecTL.getType()->castAs<TemplateSpecializationType>(); + CXXScopeSpec SS; + SS.Adopt(QualifierLoc); + if (TemplateDecl *TD = TST->getTemplateName().getAsTemplateDecl()) { + TemplateName InstName = getDerived().RebuildTemplateName( + SS, TL.getTemplateKeywordLoc(), *TD->getIdentifier(), + TL.getNamedTypeLoc().getBeginLoc(), /*ObjectType=*/QualType(), + /*FirstQualifierInScope=*/nullptr, /*AllowInjectedClassName=*/false); + if (InstName.isNull()) + return QualType(); + NamedT = TransformTemplateSpecializationType(TLB, SpecTL, InstName); ---------------- zyn0217 wrote:
Did you mean `getDerived().TransformTemplateSpecializationType()`? https://github.com/llvm/llvm-project/pull/93411 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits