[flang-commits] [flang] [FLANG][OMP] Add error message for invalid dependence type in taskwait construct (#219234). (PR #220837)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Thu Sep 3 08:21:27 PDT 2026
================
@@ -5109,6 +5116,14 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Depend &x) {
context_.Say(GetContext().clauseSource,
"The SINK and SOURCE dependence types can only be used with the ORDERED directive, used here in the %s construct"_err_en_US,
parser::omp::GetUpperName(dir, version));
+ } else if (dir == llvm::omp::OMPD_taskwait &&
+ taskDep->GetTaskDepType() ==
+ parser::OmpTaskDependenceType::Value::Mutexinoutset) {
+ // A depend clause on a taskwait construct must not have
+ // mutexinoutset as dependence-type.
+ context_.Say(GetContext().clauseSource,
+ "A DEPEND clause on a TASKWAIT construct must not have %s as dependence type"_err_en_US,
+ "MUTEXINOUTSET");
----------------
kparzysz wrote:
If you're passing a literal string to %s, you might as well put it in the actual message.
https://github.com/llvm/llvm-project/pull/220837
More information about the flang-commits
mailing list