summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2013-08-06 05:49:26 +0000
committerLarisse Voufo <lvoufo@google.com>2013-08-06 05:49:26 +0000
commitb959c3c6aeb77702919fea3f229658528a29fb70 (patch)
tree6f8ff6e2e16a1acf03c1575562ee4305a45d4c58
parent5ba12d75dfd4bc0f96e7d15fd6151a9c09b76943 (diff)
downloadbcm5719-llvm-b959c3c6aeb77702919fea3f229658528a29fb70.tar.gz
bcm5719-llvm-b959c3c6aeb77702919fea3f229658528a29fb70.zip
Removed hack that was used to properly restore the nested name specifier of qualified variable template ids. It turns out that the current implementation was just not logical setup for it. This commit has made it so.
llvm-svn: 187776
-rw-r--r--clang/lib/Parse/ParseExprCXX.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index d4a83fb0c9c..9ac6d435067 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -195,6 +195,13 @@ bool Parser::ParseOptionalCXXScopeSpecifier(CXXScopeSpec &SS,
return false;
}
+ if (Tok.is(tok::annot_template_id)) {
+ // If the current token is an annotated template id, it may already have
+ // a scope specifier. Restore it.
+ TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
+ SS = TemplateId->SS;
+ }
+
if (LastII)
*LastII = 0;
@@ -561,12 +568,6 @@ ExprResult Parser::ParseCXXIdExpression(bool isAddressOfOperand) {
// '::' unqualified-id
//
CXXScopeSpec SS;
- if (Tok.getKind() == tok::annot_template_id) {
- TemplateIdAnnotation *TemplateId = takeTemplateIdAnnotation(Tok);
- // FIXME: This is a hack for now. It may need to be done from within
- // ParseUnqualifiedId(), or most likely ParseOptionalCXXScopeSpecifier();
- SS = TemplateId->SS;
- }
ParseOptionalCXXScopeSpecifier(SS, ParsedType(), /*EnteringContext=*/false);
SourceLocation TemplateKWLoc;
OpenPOWER on IntegriCloud