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;
// '::' 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;