[PATCH] D133522: [clang] Fix Complex x Float x Int conversions so it handles type sugar

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 8 19:09:57 PDT 2022


shafik added inline comments.


================
Comment at: clang/lib/Sema/SemaExpr.cpp:1135
+    QualType RHSElementType =
+        RHSComplexType ? RHSComplexType->getElementType() : RHSType;
+    QualType ResultType =
----------------
Can you collapse this check with the next line? It just looks weird checking `RHSComplexType` twice and having `RHSType` on the opposite side of each one. It took me a while to understand what was going on.

This comment also applies a few lines down.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133522



More information about the cfe-commits mailing list