clang/test/SemaCXX/atomic-builtin-compound-assignment-overload.cpp
raw| 1 | // RUN: %clang_cc1 -std=gnu++98 -fsyntax-only -verify %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | _Atomic unsigned an_atomic_uint; |
| 5 | |
| 6 | enum { an_enum_value = 1 }; |
| 7 | |
| 8 | void enum1() { an_atomic_uint += an_enum_value; } |
| 9 | |
| 10 | void enum2() { an_atomic_uint |= an_enum_value; } |
| 11 | |
| 12 | volatile _Atomic unsigned an_volatile_atomic_uint; |
| 13 | |
| 14 | void enum3() { an_volatile_atomic_uint += an_enum_value; } |
| 15 | |
| 16 | void enum4() { an_volatile_atomic_uint |= an_enum_value; } |