[clang] [clang][Interp] Support __real/__imag on primitives (PR #75485)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 02:29:30 PST 2023


================
@@ -2776,6 +2778,11 @@ bool ByteCodeExprGen<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
     return true;
   }
   case UO_Imag: { // __imag x
+    if (T) {
+      if (!this->discard(SubExpr))
+        return false;
+      return this->visitZeroInitializer(*T, SubExpr->getType(), SubExpr);
+    }
     assert(!T);
----------------
cor3ntin wrote:

Ditto

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


More information about the cfe-commits mailing list