[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 09:44:22 PDT 2023


ABataev added inline comments.


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:3328-3332
     if (!FirstClause) {
       Diag(Tok, diag::err_omp_more_one_clause)
           << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0;
       ErrorFound = true;
     }
----------------
If there is a second instance of this clause, it should be reported here


================
Comment at: clang/lib/Parse/ParseOpenMP.cpp:3830
+  // Store fail parameter for Sema.
+  FailClause->initFailClause(LParenLoc, CKind, MemOrderLoc);
+
----------------
That's a bad place, it should be done in Sema.


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

https://reviews.llvm.org/D123235



More information about the cfe-commits mailing list