[PATCH] D133522: [clang] Fix Complex x Float x Int conversions so it handles type sugar
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 9 08:23:34 PDT 2022
mizvekov abandoned this revision.
mizvekov added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:1135
+ QualType RHSElementType =
+ RHSComplexType ? RHSComplexType->getElementType() : RHSType;
+ QualType ResultType =
----------------
shafik wrote:
> 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.
I have refactored the whole thing, but at D111509
The present patch was intended to be a quick fix to that one, to avoid reverting it, but that is moot now since it ended up reverted and we can't test what is in here without the other one.
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