Author: lvoufo
Date: Tue Aug 6 00:49:26 2013
New Revision: 187776
URL: http://llvm.org/viewvc/llvm-project?rev=187776&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Parse/ParseExprCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=187776&r1=187775&r2=187776&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Tue Aug 6 00:49:26 2013
@@ -195,6 +195,13 @@ bool Parser::ParseOptionalCXXScopeSpecif
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(
// '::' 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;
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits