[clang] [clang][Interp] Implement ComplexToReal casts (PR #77294)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 8 02:29:23 PST 2024


================
@@ -37,6 +37,18 @@ constexpr _Complex int I2 = {};
 static_assert(__real(I2) == 0, "");
 static_assert(__imag(I2) == 0, "");
 
+constexpr int ignoredCast() {
+  I2;
+  (int)I2;
+  /* (float)I2; FIXME*/
+  D1;
+  /* (int)D1; FIXME*/
----------------
tbaederr wrote:

The commented-out tests need https://github.com/llvm/llvm-project/pull/77295 first.

https://github.com/llvm/llvm-project/pull/77294


More information about the cfe-commits mailing list