[llvm-branch-commits] [flang] [llvm] [flang][OpenMP] Account for using different versions for modifier checks (PR #229525)

Sairudra More via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Oct 17 20:23:40 PDT 2026


================
@@ -401,10 +439,15 @@ AppliedModifierInfo GetAppliedModifiers(llvm::omp::Clause clauseId,
           [&](auto &&t) {
             auto &am{info.elements.emplace_back(AppliedModifier{})};
             am.id = WithSource{t.Id, m.source};
-            for (auto s : cdesc.getModifierSets(version)) {
-              auto &sdesc{llvm::omp::getDescriptor(s)};
-              if (sdesc.getModifiers(version).test(am.id.value)) {
-                am.sets.set(s);
+            am.version = GetClosestVersion(
----------------
Saieiei wrote:

Could you add a duplicate `iterator` case to `from-clause-v45.f90`? With `-fopenmp-version=45`, this change adds the duplicate-iterator error alongside the version warning. The existing test passes on both the base and this revision, so it doesn't exercise that new check.

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


More information about the llvm-branch-commits mailing list