3 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
81cdf9472c
[clang][OpenMP] Fix region nesting check for scan directive (#98386)
The previous check was inconsistent. For example, it would allow
```
#pragma omp target
#pragma omp parallel for
  for (...) {
#pragma omp scan
  }
```
but not
```
#pragma omp target parallel for
  for (...) {
#pragma omp scan
  }
```

Make the check conform to the wording on the specification.
2024-07-11 08:07:58 -05:00
Mike Rice
b097018fda
[clang][OpenMP] Fix teams nesting of region check (#94806)
The static verifier flagged dead code in the check since the loop will
only execute once and never reach the iterator increment.

The loop needs to iterate twice to correctly diagnose when a statement
is after the teams.

Since there are two iterations again, reset the iterator to the first
teams directive when the double teams case is seen so the diagnostic can
report both locations.
2024-06-24 13:31:39 -07:00
Mike Rice
aa6a089c36
[NFC][OpenMP] Split nesting_of_regions test (#87842)
This test is the bottleneck for OpenMP lit tests, running about twice as
long as the others. Break it into five tests based on run lines with the
same version.
2024-04-08 12:53:30 -07:00