aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/DeclSpec.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
commitb46ae3964ba02535276c71332396e9a7bad2dfa5 (patch)
treead4798f0658fefa1450f3924514f2921d33089ee /lib/Sema/DeclSpec.cpp
parent093ac461b37a573dcf226fa55faed96f318169b9 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/DeclSpec.cpp')
-rw-r--r--lib/Sema/DeclSpec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index 2cb4904347..df29febe4f 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -126,7 +126,7 @@ void CXXScopeSpec::Adopt(NestedNameSpecifierLoc Other) {
NestedNameSpecifierLoc
CXXScopeSpec::getWithLocInContext(ASTContext &Context) const {
- if (isEmpty() || isInvalid())
+ if (!Builder.getRepresentation())
return NestedNameSpecifierLoc();
return Builder.getWithLocInContext(Context);