[clang] [clang] require template arg list after template kw (PR #80801)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Tue May 28 12:26:14 PDT 2024


================
@@ -2995,13 +2996,23 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec &SS, ParsedType ObjectType,
           SS, ObjectType, ObjectHadErrors,
           TemplateKWLoc ? *TemplateKWLoc : SourceLocation(), Id, IdLoc,
           EnteringContext, Result, TemplateSpecified);
-    else if (TemplateSpecified &&
-             Actions.ActOnTemplateName(
-                 getCurScope(), SS, *TemplateKWLoc, Result, ObjectType,
-                 EnteringContext, Template,
-                 /*AllowInjectedClassName*/ true) == TNK_Non_template)
-      return true;
 
+    if (TemplateSpecified) {
+      TemplateNameKind TNK =
+          Actions.ActOnTemplateName(getCurScope(), SS, *TemplateKWLoc, Result,
+                                    ObjectType, EnteringContext, Template,
+                                    /*AllowInjectedClassName*/ true);
----------------
shafik wrote:

```suggestion
                                    /*AllowInjectedClassName=*/true);
```
nitpick

https://github.com/llvm/llvm-project/pull/80801


More information about the cfe-commits mailing list