================
@@ -4394,8 +4394,14 @@ NestedNameSpecifierLoc 
TreeTransform<Derived>::TransformNestedNameSpecifierLoc(
           SS.Adopt(ETL.getQualifierLoc());
           TL = ETL.getNamedTypeLoc();
         }
-        SS.Extend(SemaRef.Context, /*FIXME:*/ SourceLocation(), TL,
-                  Q.getLocalEndLoc());
+        SourceLocation TemplateKWLoc;
+        if (const auto TSTL = TL.getAs<TemplateSpecializationTypeLoc>())
+          TemplateKWLoc = TSTL.getTemplateKeywordLoc();
+        else if (const auto DTSTL =
+                     TL.getAs<DependentTemplateSpecializationTypeLoc>())
+          TemplateKWLoc = DTSTL.getTemplateKeywordLoc();
----------------
sdkrystian wrote:

@cor3ntin Make it a function where? In `ASTContext`, `TypeLoc`, or as a 
non-member function? `TemplateSpecializationTypeLoc` and 
`DependentTemplateSpecializationTypeLoc` don't have a common base other than 
`TypeLoc`.

https://github.com/llvm/llvm-project/pull/78595
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to