[PATCH] D52321: [CUDA] Fixed parsing of optional template-argument-list.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 21 10:09:06 PDT 2018
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Parse/ParseTemplate.cpp:949-950
GreaterThanIsOperatorScope G(GreaterThanIsOperator, false);
- if (Tok.isNot(tok::greater) && Tok.isNot(tok::greatergreater))
+ if (!Tok.isOneOf(tok::greater, tok::greatergreater,
+ tok::greatergreatergreater))
Invalid = ParseTemplateArgumentList(TemplateArgs);
----------------
It'd be good to include the other tokens that start with `>` here (which we also split as an extension): `tok::greaterequal` and `tok::greatergreaterequal`.
https://reviews.llvm.org/D52321
More information about the cfe-commits
mailing list