================
@@ -4497,6 +4572,25 @@ void OmpStructureChecker::CheckWorkshareBlockStmts(
   }
 }
 
+void OmpStructureChecker::CheckWorkdistributeBlockStmts(
+    const parser::Block &block, parser::CharBlock source) {
+  unsigned version{context_.langOptions().OpenMPVersion};
+  if (version < 60)
+    context_.Say(source,
+        "WORKDISTRIBUTE construct is only supported from openMP 
6.0"_err_en_US);
----------------
kparzysz wrote:

We usually generate messages in the form of `"xyz is not allowed in %s, %s"`, 
with the string arguments being `ThisVersion(version)` and 
`TryVersion(sinceVersion)`.  ThisVersion(v) expands to "OpenMP v.v", 
TryVersion(v) expands to "try -fopenmp-version=v".
See 
https://github.com/llvm/llvm-project/blob/main/flang/lib/Semantics/check-omp-structure.cpp#L205-L207
 for an example.

https://github.com/llvm/llvm-project/pull/154377
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to