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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 05:59:41 PDT 2021


ABataev added inline comments.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:2814
     }
 
     if (CKind == OMPC_ordered && PP.LookAhead(/*N=*/0).isNot(tok::l_paren))
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99995



More information about the llvm-commits mailing list