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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 27 09:54:53 PDT 2023


aaron.ballman added a comment.

Is this intended to not handle all the binary operators in this patch? And also, is this intended to only impact initializers?



================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:587-588
+  const Expr *RHS = E->getRHS();
+  PrimType LHSElemT = *this->classifyComplexElementType(LHS->getType());
+  PrimType RHSElemT = *this->classifyComplexElementType(RHS->getType());
+
----------------
Should we be getting the canonical type because of the assertion below? I'm wondering specifically about a case where the LHS is a complex type and the RHS is a typedef to a complex type, that kind of thing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155572



More information about the cfe-commits mailing list