[flang-commits] [PATCH] D89583: [Flang][OpenMP] Semantic checks for Atomic construct.

Valentin Clement via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Oct 21 11:27:20 PDT 2020


clementval added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:10
 #include "check-omp-structure.h"
+#include "flang/Common/Fortran.h"
 #include "flang/Parser/parse-tree.h"
----------------
Is this necessary? 


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:515
+    context_.Say(clause->source,
+        "Clause ACQUIRE is not allowed on the ATOMIC directive"_err_en_US);
+  }
----------------
Why is there a specific check for this? If it is not allowed it should not be in `OMP.td` and then catch be `CheckAllowed` in enter acquire. 


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:519
+    context_.Say(clause->source,
+        "Clause ACQ_REL is not allowed on the ATOMIC directive"_err_en_US);
+  }
----------------
Same here. This should be catch be the generic code and the TableGen map. 


================
Comment at: flang/lib/Semantics/check-omp-structure.h:162
+  void Enter(const parser::OmpClause::Hint &);
+  // Atomic-clause
+  void Enter(const parser::OmpAtomicRead &);
----------------
These are not really clause but atomic constructs. 


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

https://reviews.llvm.org/D89583



More information about the flang-commits mailing list