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
diff --git a/clang/lib/Parse/ParseExprCXX.cpp b/clang/lib/Parse/ParseExprCXX.cpp
index d4a83fb..9ac6d43 100644
--- a/clang/lib/Parse/ParseExprCXX.cpp
+++ b/clang/lib/Parse/ParseExprCXX.cpp
@@ -195,6 +195,13 @@
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 @@
// '::' 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;