================ @@ -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>(); ---------------- zyn0217 wrote:
```c++ if (QualType QT = TL.getNamedTypeLoc().getType(); ... && isa<...>(QT)) { auto SpecTL = ...; auto *TST = QT.getTypePtr(); } ``` Probably looks better. 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