[flang-commits] [flang] [llvm] [Flang] Add semantic check for usage of COPYPRIVATE and NOWAIT clauses (PR #73486)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Mon Nov 27 11:17:47 PST 2023


================
@@ -33,6 +33,16 @@ static OmpClauseSet privateSet{
     Clause::OMPC_private, Clause::OMPC_firstprivate, Clause::OMPC_lastprivate};
 static OmpClauseSet privateReductionSet{
     OmpClauseSet{Clause::OMPC_reduction} | privateSet};
+// omp.td cannot differentiate allowed/not allowed clause list for few
+// directives for fortran. nowait is not allowed on begin directive clause list
+// for below list of directives. Directives with conflicting list of clauses are
+// included in below list.
+static const OmpDirectiveSet noWaitClauseAllowedSet{
+    Directive::OMPD_do,
+    Directive::OMPD_do_simd,
+    Directive::OMPD_sections,
+    Directive::OMPD_single,
+};
----------------
luporl wrote:

Doesn't this belong to `openmp-directive-sets.h`, where the other `*AllowedSet`s are?
Wouldn't something like `noWaitClauseNotAllowedSet` be a better name in this case?

https://github.com/llvm/llvm-project/pull/73486


More information about the flang-commits mailing list