Skip to content

Commit c391f28

Browse files
committed
[clang][Interp][NFC] Add simple test case for atomic types
1 parent bc82d1a commit c391f28

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

clang/test/AST/Interp/atomic.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+

0 commit comments

Comments
 (0)