[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 18 07:04:44 PDT 2026


akash-manna-sky wrote:

> SemaOpenMP.cpp:2670
> 
> ```
> -  if (ErrorFound == NoError && E && X) {
> +  if (ErrorFound == NoError && E && X && !E->containsErrors() &&
> +      !X->containsErrors()) {
> ```

Actually I'd noticed this one too but had left it for a follow-up; makes sense to fold it in here too. Added tests for `x += 0--;`  also.


https://github.com/llvm/llvm-project/pull/228914


More information about the cfe-commits mailing list