================ @@ -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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits