[PATCH] D99995: [OpenMP51] Initial support for masked directive and filter clause

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 8 09:04:06 PDT 2021


cchen added inline comments.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:2814
     }
 
     if (CKind == OMPC_ordered && PP.LookAhead(/*N=*/0).isNot(tok::l_paren))
----------------
ABataev wrote:
> This can be simplified like this:
> ```
>     if (!FirstClause) {
>       Diag(Tok, diag::err_omp_more_one_clause)
>           << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
>       ErrorFound = true;
>     }
>     LLVM_FALLTHROUGH;
> case OMPC_filter:
> ```
> Plus, I think, you should not exclude OMPC_filter from the check, I think only single clause is allowed by the spec.
I misunderstood the syntax and will fix this and the tests, thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99995



More information about the cfe-commits mailing list