[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 29 01:15:08 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/test/AST/Interp/complex.cpp:119-124
+  using Bobble = _Complex float;
+  constexpr _Complex float A = { 13.0, 2.0 };
+  constexpr Bobble B = { 2.0, 1.0  };
+  constexpr _Complex float D = A - B;
+  static_assert(__real(D) == 11.0, "");
+  static_assert(__imag(D) == 1.0, "");
----------------
aaron.ballman wrote:
> Should this be under the `Sub` namespace instead of hanging out by itself?
Yeah I guess it should.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155572/new/

https://reviews.llvm.org/D155572



More information about the cfe-commits mailing list