summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-26 23:56:24 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-26 23:56:24 +0000
commitc23500ebb3935eb5168cd5992c9b7b4e83dcac49 (patch)
tree74a1d7c693e7f2279f63e50e8619cc08de9bc864 /clang/lib/Parse/ParseExprCXX.cpp
parentf21eb49a0404949c481c671965149e9cbdbc376d (diff)
downloadbcm5719-llvm-c23500ebb3935eb5168cd5992c9b7b4e83dcac49.tar.gz
bcm5719-llvm-c23500ebb3935eb5168cd5992c9b7b4e83dcac49.zip
Simplify CXXScopeSpec a lot. No more weird SmallVector-like hacks here
llvm-svn: 67800
Diffstat (limited to 'clang/lib/Parse/ParseExprCXX.cpp')
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index 731f4c7957f..b3ec24f8640 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -36,8 +36,7 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) {
"Call sites of this function should be guarded by checking for C++");
if (Tok.is(tok::annot_cxxscope)) {
- SS.setFromAnnotationData(Tok.getAnnotationValue());
- CXXScopeSpec::freeAnnotationData(Tok.getAnnotationValue());
+ SS.setScopeRep(Tok.getAnnotationValue());
SS.setRange(Tok.getAnnotationRange());
ConsumeToken();
return true;
@@ -54,7 +53,7 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) {
// '::' - Global scope qualifier.
SourceLocation CCLoc = ConsumeToken();
SS.setBeginLoc(CCLoc);
- SS.addScopeRep(Actions.ActOnCXXGlobalScopeSpecifier(CurScope, CCLoc));
+ SS.setScopeRep(Actions.ActOnCXXGlobalScopeSpecifier(CurScope, CCLoc));
SS.setEndLoc(CCLoc);
HasScopeSpecifier = true;
}
@@ -80,7 +79,7 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) {
if (SS.isInvalid())
continue;
- SS.addScopeRep(
+ SS.setScopeRep(
Actions.ActOnCXXNestedNameSpecifier(CurScope, SS, IdLoc, CCLoc, *II));
SS.setEndLoc(CCLoc);
continue;
@@ -165,7 +164,7 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS) {
HasScopeSpecifier = true;
}
- SS.addScopeRep(
+ SS.setScopeRep(
Actions.ActOnCXXNestedNameSpecifier(CurScope, SS,
TypeToken.getAnnotationValue(),
TypeToken.getAnnotationRange(),
OpenPOWER on IntegriCloud