[clang] [Clang][OpenMP] Fix crash on `atomic` with an erroneous statement (PR #228914)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 15:15:23 PDT 2026
https://github.com/ojhunt requested changes to this pull request.
This is simply incorrect. It removes an intended feature (OMP tracking invalid state due to non-OMP semantic errors), and the early return used to suppress the problematic code path causes problems with other diagnostics.
E.g.
```cpp
int x = 0, v = 0--;
#pragma omp atomic capture
{ x = v; v++; }
```
Due to the drop of "this is an error for non-omp reasons" this now diagnoses `v++` as being invalid.
The correct fix should be to simply make sure that the diagnostic covered all candidates, not remove the candidates. Why was that not possible?
https://github.com/llvm/llvm-project/pull/228914
More information about the cfe-commits
mailing list