aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-25 19:13:18 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-25 19:13:18 +0000
commitc21c7e9c2cded68f91be15be6847c9649242dc17 (patch)
tree4cf47abb0058f7ada5262a133ee3aa859ab6df4a /lib/Sema/SemaTemplate.cpp
parent0691a5c83246604a89654e0dfc25870e742035b4 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 2d2c3ea672..78f8d5e05a 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -5901,7 +5901,8 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
if (InnerTSI)
Builder.pushFullCopy(InnerTSI->getTypeLoc());
else
- Builder.push<TemplateSpecializationTypeLoc>(T).initialize(TemplateLoc);
+ Builder.push<TemplateSpecializationTypeLoc>(T).initialize(Context,
+ TemplateLoc);
/* Note: NNS already embedded in template specialization type T. */
T = Context.getElaboratedType(ETK_Typename, /*NNS=*/0, T);
@@ -5937,7 +5938,8 @@ Sema::ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
for (unsigned I = 0, E = TST->getNumArgs(); I != E; ++I)
TL.setArgLocInfo(I, TSTL.getArgLocInfo(I));
} else {
- TL.initializeLocal(SourceLocation());
+ // FIXME: Poor source-location information here.
+ TL.initializeLocal(Context, TemplateLoc);
}
TL.setKeywordLoc(TypenameLoc);
TL.setQualifierRange(SS.getRange());