summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-03 21:48:55 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-03 21:48:55 +0000
commit2b1ca9eaadc543bb6fe80bb6fd306fe05870fc03 (patch)
tree4cfc8844134e74588c3e3e6570edf01c8a556566 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
parent68a1525290ebe592dfbc008a80c6e3f5121131a9 (diff)
downloadbcm5719-llvm-2b1ca9eaadc543bb6fe80bb6fd306fe05870fc03.tar.gz
bcm5719-llvm-2b1ca9eaadc543bb6fe80bb6fd306fe05870fc03.zip
Fix PR9390 in not one, but two ways:
1) When we do an instantiation of the injected-class-name type, provide a proper source location. This is just plain good hygiene. 2) When we're building a NestedNameSpecifierLoc from a CXXScopeSpec, only return an empty NestedNameSpecifierLoc if there's no representation. Both problems contributed to the horrible test case in PR9390 that I couldn't reduce down to something palatable. llvm-svn: 126961
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 3a40b6fd77a..cbbc2d9f89f 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -2917,7 +2917,7 @@ NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
// FIXME: Can we use the CurrentInstantiationScope to avoid this
// extra instantiation in the common case?
- T = SubstType(T, TemplateArgs, SourceLocation(), DeclarationName());
+ T = SubstType(T, TemplateArgs, Loc, DeclarationName());
assert(!T.isNull() && "Instantiation of injected-class-name cannot fail.");
if (!T->isDependentType()) {
OpenPOWER on IntegriCloud