Commit b097018
authored
[clang][OpenMP] Fix teams nesting of region check (llvm#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.1 parent b1a93db commit b097018
File tree
2 files changed
+19
-3
lines changed- clang
- lib/Sema
- test/OpenMP/Inputs
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13433 | 13433 | | |
13434 | 13434 | | |
13435 | 13435 | | |
13436 | | - | |
13437 | | - | |
13438 | | - | |
| 13436 | + | |
| 13437 | + | |
13439 | 13438 | | |
| 13439 | + | |
| 13440 | + | |
| 13441 | + | |
| 13442 | + | |
| 13443 | + | |
13440 | 13444 | | |
13441 | 13445 | | |
13442 | 13446 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4880 | 4880 | | |
4881 | 4881 | | |
4882 | 4882 | | |
| 4883 | + | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + | |
| 4887 | + | |
| 4888 | + | |
4883 | 4889 | | |
4884 | 4890 | | |
4885 | 4891 | | |
| |||
14133 | 14139 | | |
14134 | 14140 | | |
14135 | 14141 | | |
| 14142 | + | |
| 14143 | + | |
| 14144 | + | |
| 14145 | + | |
| 14146 | + | |
| 14147 | + | |
14136 | 14148 | | |
14137 | 14149 | | |
14138 | 14150 | | |
| |||
0 commit comments