clang/test/AST/ByteCode/atomic.cpp
raw| 1 | // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected -std=c++11 %s |
| 2 | // RUN: %clang_cc1 -verify=both,ref -std=c++11 %s |
| 3 | // RUN: %clang_cc1 -fexperimental-new-constant-interpreter -verify=both,expected -std=c++98 %s |
| 4 | // RUN: %clang_cc1 -verify=both,ref -std=c++98 %s |
| 5 | |
| 6 | |
| 7 | |
| 8 | // expected-no-diagnostics |
| 9 | // ref-no-diagnostics |
| 10 | |
| 11 | |
| 12 | /// Rejected in c++98 |
| 13 | #if __cplusplus >= 201103L |
| 14 | constexpr _Atomic(bool) B = true; |
| 15 | static_assert(B, ""); |
| 16 | #endif |
| 17 |