Skip to content

Commit

Permalink
[clang][Interp][NFC] Add some working _Complex tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Jan 25, 2024
1 parent 47a2e73 commit cd0b005
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clang/test/AST/Interp/complex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ constexpr _Complex double z1 = {1.0, 2.0};
static_assert(__real(z1) == 1.0, "");
static_assert(__imag(z1) == 2.0, "");

static_assert(&__imag z1 == &__real z1 + 1, "");
static_assert((*(&__imag z1)) == __imag z1, "");
static_assert((*(&__real z1)) == __real z1, "");


constexpr double setter() {
_Complex float d = {1.0, 2.0};

Expand Down

0 comments on commit cd0b005

Please sign in to comment.