Author: Timm Bäder Date: 2024-01-25T14:21:59+01:00 New Revision: cd0b0055a730e55f2f14f35172e05dc27642f8ce
URL: https://github.com/llvm/llvm-project/commit/cd0b0055a730e55f2f14f35172e05dc27642f8ce DIFF: https://github.com/llvm/llvm-project/commit/cd0b0055a730e55f2f14f35172e05dc27642f8ce.diff LOG: [clang][Interp][NFC] Add some working _Complex tests Added: Modified: clang/test/AST/Interp/complex.cpp Removed: ################################################################################ diff --git a/clang/test/AST/Interp/complex.cpp b/clang/test/AST/Interp/complex.cpp index 99c0dd141d0b77..836ea552adac86 100644 --- a/clang/test/AST/Interp/complex.cpp +++ b/clang/test/AST/Interp/complex.cpp @@ -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}; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits