Skip to content

Commit cd0b005

Browse files
committed
[clang][Interp][NFC] Add some working _Complex tests
1 parent 47a2e73 commit cd0b005

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/test/AST/Interp/complex.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ constexpr _Complex double z1 = {1.0, 2.0};
88
static_assert(__real(z1) == 1.0, "");
99
static_assert(__imag(z1) == 2.0, "");
1010

11+
static_assert(&__imag z1 == &__real z1 + 1, "");
12+
static_assert((*(&__imag z1)) == __imag z1, "");
13+
static_assert((*(&__real z1)) == __real z1, "");
14+
15+
1116
constexpr double setter() {
1217
_Complex float d = {1.0, 2.0};
1318

0 commit comments

Comments
 (0)