Teach TemplateSpecializationTypeLoc::initializeArgLocs() to actually
generate meaningful [*] template argument location information.
[*] Well, as meaningful as possible, given that this entire code path
is a hack for when we've lost type-source information.
llvm-svn: 124211
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 654bf90..04c45b8 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -2980,8 +2980,8 @@
// Temporary workaround. All of these transformations should
// eventually turn into transformations on TypeLocs.
- TypeSourceInfo *DI = getSema().Context.CreateTypeSourceInfo(T);
- DI->getTypeLoc().initialize(getDerived().getBaseLocation());
+ TypeSourceInfo *DI = getSema().Context.getTrivialTypeSourceInfo(T,
+ getDerived().getBaseLocation());
TypeSourceInfo *NewDI = getDerived().TransformType(DI);
@@ -3073,7 +3073,7 @@
return T;
TypeSourceInfo *TSI =
- SemaRef.Context.getTrivialTypeSourceInfo(T, getBaseLocation());
+ SemaRef.Context.getTrivialTypeSourceInfo(T, getDerived().getBaseLocation());
TSI = getDerived().TransformTypeInObjectScope(TSI, ObjectType,
UnqualLookup, Prefix);