[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 07:20:09 PDT 2023
ABataev added inline comments.
================
Comment at: clang/include/clang/AST/OpenMPClause.h:2543
+ void setFailParameter(OpenMPClauseKind FailParameter) {
+
+ switch (FailParameter) {
----------------
Remove this empty line
================
Comment at: clang/include/clang/AST/OpenMPClause.h:2611-2617
+ void initFailClause(SourceLocation LParenLoc, OpenMPClauseKind FailParameter,
+ SourceLocation FailParameterLoc) {
+
+ setLParenLoc(LParenLoc);
+ setFailParameterLoc(FailParameterLoc);
+ setFailParameter(FailParameter);
+ }
----------------
make this function private
================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10964
+def err_omp_atomic_fail_wrong_or_no_clauses : Error<"expected a memory order clause">;
+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">;
----------------
Unused error message?
================
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">;
----------------
I thin k this must be handled by parse..clause function already
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123235/new/
https://reviews.llvm.org/D123235
More information about the cfe-commits
mailing list