rsmith added inline comments.

================
Comment at: clang/lib/Parse/ParseTentative.cpp:597
+                                       tok::comma)))) ||
+                (getLangOpts().CUDA && Tok.is(tok::greatergreatergreater)))) {
       TPR = TPResult::True;
----------------
No need to check for CUDA here; that's a prerequisite for forming a 
`greatergreatergreater` token (and if we formed that token in any other 
language mode, we'd still want to split it here). But this should be gated by 
`CPlusPlus11` for clarity, since that's where we get the "split `>>` tokens" 
rule from. So I think this should be:

```
    } else if (Context == TypeIdAsTemplateArgument &&
               (Tok.isOneOf(tok::greater, tok::comma) ||
                (getLangOpts().CPlusPlus11 &&
                 (Tok.isOneOf(tok::greatergreater, tok::greatergreatergreater) 
||
                  (Tok.is(tok::ellipsis) &&
                   NextToken().isOneOf(tok::greater, tok::greatergreater,
                                       tok::greatergreatergreater, 
tok::comma)))))) {
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61396/new/

https://reviews.llvm.org/D61396



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to