xref: /llvm-project/clang/test/AST/ByteCode/atomic.cpp (revision a07aba5d44204a7ca0d891a3da05af9960081e4c)
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 
18