[all-commits] [llvm/llvm-project] f92573: [flang][OpenMP] Check that IF clause applies to at...
Krzysztof Parzyszek via All-commits
all-commits at lists.llvm.org
Mon Jun 22 12:03:30 PDT 2026
Branch: refs/heads/users/kparzysz/check-if-name-modifier
Home: https://github.com/llvm/llvm-project
Commit: f9257362fa40daa5d76e8956702866fb5e6b1fa2
https://github.com/llvm/llvm-project/commit/f9257362fa40daa5d76e8956702866fb5e6b1fa2
Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: 2026-06-22 (Mon, 22 Jun 2026)
Changed paths:
M flang/lib/Semantics/check-omp-structure.cpp
M flang/lib/Semantics/check-omp-structure.h
M flang/test/Semantics/OpenMP/device-constructs.f90
M flang/test/Semantics/OpenMP/if-clause-45.f90
M flang/test/Semantics/OpenMP/if-clause-50.f90
M flang/test/Semantics/OpenMP/if-clause.f90
M llvm/include/llvm/Frontend/OpenMP/OMP.td
Log Message:
-----------
[flang][OpenMP] Check that IF clause applies to at most one leaf
This also allows placing the IF clause in the "allowedClauses" set for
all directives, instead of having it in "allowedOnceClauses" for some
directives and in "allowedClauses" for others.
The emitted diagnostic will show which constituent has multiple IF
clauses applying to it:
```
if.f90:4:35: error: At most one IF clause can apply to each directive constituent
!$omp & if(target teams: x > 0) if(teams distribute: y > 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
if.f90:4:11: Previous IF clause applying to the TEAMS constituent
!$omp & if(target teams: x > 0) if(teams distribute: y > 0)
^^^^^^^^^^^^^^^^^^^^^^^
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list