[clang] [Sema] atomic_compare_exchange: check failure memory order (PR #74959)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 12 20:18:46 PST 2023


MaskRay wrote:

> Did this change anything for the `scoped_atomic_compare_exchange_n` variant I added recently?

I am not familiar with the scoped atomic xchg stuff, but this patch needs to update one `__hip_atomic_compare_exchange_weak` test:
```
  flag = __hip_atomic_compare_exchange_weak(ptr, &val, desired, __ATOMIC_RELAXED, __ATOMIC_ACQ_REL, __HIP_MEMORY_SCOPE_SINGLETHREAD); // expected-warning {{failure memory order argument to atomic operation is invalid}}
```

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


More information about the cfe-commits mailing list