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

Sunil K via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 09:35:24 PDT 2023


koops added inline comments.


================
Comment at: clang/include/clang/AST/OpenMPClause.h:2611-2617
+  void initFailClause(SourceLocation LParenLoc, OpenMPClauseKind FailParameter,
+                      SourceLocation FailParameterLoc) {
+
+    setLParenLoc(LParenLoc);
+    setFailParameterLoc(FailParameterLoc);
+    setFailParameter(FailParameter);
+  }
----------------
ABataev wrote:
> make this function private
OMPFailClause::initFailClause() is called from ParseOpenMPFailClause().


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10965
+def err_omp_atomic_fail_extra_mem_order_clauses : Error<"directive '#pragma omp atomic compare fail' cannot contain more than one memory order clause">;
+def err_omp_atomic_fail_extra_clauses : Error<"directive '#pragma omp atomic compare' cannot contain more than one fail clause">;
+def err_omp_atomic_fail_no_compare : Error<"expected 'compare' clause with the 'fail' modifier">;
----------------
ABataev wrote:
> I thin k this must be handled by parse..clause function already
This is not being handled by the ParseOpenMPFailClause() or any other Parse function. It is done only in the SemaOpenMP.cpp.


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

https://reviews.llvm.org/D123235



More information about the cfe-commits mailing list