================
@@ -787,6 +787,23 @@ NamedDecl *Parser::ParseTemplateTemplateParameter(unsigned 
Depth,
                                                   unsigned Position) {
   assert(Tok.is(tok::kw_template) && "Expected 'template' keyword");
 
+  if (Token ahead = GetLookAheadToken(1);
+      ahead.isOneOf(tok::identifier, tok::ellipsis,
+                    tok::equal, tok::comma,
+                    tok::greater, tok::greatergreater, 
tok::greatergreatergreater)) {
----------------
Sirraide wrote:

I think it might be simpler to just check if the next token is *not* `<` and 
correct to `typename` in that case since a template-template parameter always 
has to start with `template <` anyway.

https://github.com/llvm/llvm-project/pull/95726
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to