aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r--clang/lib/Parse/Parser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp
index ff50b3f..a8cfe20 100644
--- a/clang/lib/Parse/Parser.cpp
+++ b/clang/lib/Parse/Parser.cpp
@@ -1838,7 +1838,8 @@ Parser::TryAnnotateName(CorrectionCandidateCallback *CCC,
case NameClassificationKind::TypeTemplate:
if (Next.isNot(tok::less)) {
- // This may be a type template being used as a template template argument.
+ // This may be a type or variable template being used as a template
+ // template argument.
if (SS.isNotEmpty())
AnnotateScopeToken(SS, !WasScopeAnnotation);
return AnnotatedNameKind::TemplateName;
@@ -1852,10 +1853,10 @@ Parser::TryAnnotateName(CorrectionCandidateCallback *CCC,
Classification.getKind() == NameClassificationKind::Concept;
// We have a template name followed by '<'. Consume the identifier token so
// we reach the '<' and annotate it.
- if (Next.is(tok::less))
- ConsumeToken();
UnqualifiedId Id;
Id.setIdentifier(Name, NameLoc);
+ if (Next.is(tok::less))
+ ConsumeToken();
if (AnnotateTemplateIdToken(
TemplateTy::make(Classification.getTemplateName()),
Classification.getTemplateNameKind(), SS, SourceLocation(), Id,