[clang] [Clang][OpenMP] Fix crash on `atomic` with an erroneous statement (PR #228914)
Akash Manna via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 4 22:50:57 PDT 2026
akash-manna-sky wrote:
I think my original implementation fixed the original issue but introduced a new bug (your example). I assumed `contains errors` always comes with `instantiation-dependent`, which is true for a `RecoveryExpr` but not for a reference to a variable declaration. I reproduced it. `containsErrors()` is also set on a reference to a variable with a bad initializer, so the early return rejected valid statements. I dropped it, kept `NotAValidExpression`, and added the missing option to the note. Your example is in the tests.
@ojhunt
CC @alexey-bataev If you have another opinion?
https://github.com/llvm/llvm-project/pull/228914
More information about the cfe-commits
mailing list