[llvm-branch-commits] [flang] [flang][openmp] Add parser/semantic support for workdistribute (PR #154377)

Kareem Ergawy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 20 22:17:35 PDT 2025


================
@@ -813,6 +874,13 @@ void OmpStructureChecker::Enter(const parser::OpenMPBlockConstruct &x) {
           "TARGET construct with nested TEAMS region contains statements or "
           "directives outside of the TEAMS construct"_err_en_US);
     }
+    if (GetContext().directive == llvm::omp::Directive::OMPD_workdistribute &&
+        GetContextParent().directive != llvm::omp::Directive::OMPD_teams) {
+      context_.Say(x.BeginDir().DirName().source,
+          "%s region can only be strictly nested within the "
+          "teams region"_err_en_US,
----------------
ergawy wrote:

nit: I think we capitalize construct keywords and do not use `the` in fron of them. Just to be consistent with the rest of the error messages.
```suggestion
          "%s region can only be strictly nested within TEAMS region"_err_en_US,
```

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


More information about the llvm-branch-commits mailing list