Commit 9d245d0
committed
[OpenMP] Fix crash on invalid with cancel directive
If the next token after 'cancel' is a special token, we would trigger
an assertion. We should be consuming any token, same as elsewhere in
the function.
Note, we could check for an unknown directive and do different error
recovery, but that caused too many behavioral changes for other tests
in the form of "unexpected tokens ignored" diagnostics that didn't seem
like an improvement for the test cases.
Fixes #1393601 parent cede236 commit 9d245d0
File tree
3 files changed
+7
-1
lines changed- clang
- docs
- lib/Parse
- test/OpenMP
3 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
| 925 | + | |
925 | 926 | | |
926 | 927 | | |
927 | 928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2487 | 2487 | | |
2488 | 2488 | | |
2489 | 2489 | | |
2490 | | - | |
| 2490 | + | |
2491 | 2491 | | |
2492 | 2492 | | |
2493 | 2493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments