Tweak the CXXScopeSpec API a bit, so that we require the
nested-name-specifier and source range to be set at the same time.
llvm-svn: 126347
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 60c3a4c..caf7226 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -956,8 +956,8 @@
goto DoneWithDeclSpec;
CXXScopeSpec SS;
- SS.setScopeRep((NestedNameSpecifier*) Tok.getAnnotationValue());
- SS.setRange(Tok.getAnnotationRange());
+ SS.Adopt(static_cast<NestedNameSpecifier *>(Tok.getAnnotationValue()),
+ Tok.getAnnotationRange());
// We are looking for a qualified typename.
Token Next = NextToken();