aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-06 06:57:57 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-06 06:57:57 +0000
commit9dc71d2fddcd283e07d45f3894c8559e2f7dd9a7 (patch)
treeab6bb160a28cb13afc50d296dd868feb6711c34d /lib/Sema/DeclSpec.cpp
parent57c13008c634f47d8ca1b6aa9d7965d82a05c502 (diff)
Fixed enum types can be complete without actually being valid to use
as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/DeclSpec.cpp')
-rw-r--r--lib/Sema/DeclSpec.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp
index c5b883e46d..a61188c3c4 100644
--- a/lib/Sema/DeclSpec.cpp
+++ b/lib/Sema/DeclSpec.cpp
@@ -126,6 +126,12 @@ void CXXScopeSpec::Adopt(NestedNameSpecifierLoc Other) {
Builder.Adopt(Other);
}
+SourceLocation CXXScopeSpec::getLastQualifierNameLoc() const {
+ if (!Builder.getRepresentation())
+ return SourceLocation();
+ return Builder.getTemporary().getLocalBeginLoc();
+}
+
NestedNameSpecifierLoc
CXXScopeSpec::getWithLocInContext(ASTContext &Context) const {
if (!Builder.getRepresentation())