[PATCH] D53308: [Fixed Point Arithmetic] Fixed Point to Boolean Cast

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 22 12:05:04 PDT 2018


leonardchan added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2026
+    return EmitScalarConversion(Visit(E), E->getType(), DestTy,
+                                CE->getExprLoc());
 
----------------
ebevhan wrote:
> rjmccall wrote:
> > Why are you pushing these casts through `EmitScalarConversion` when the cast kind already tells you which operation you're doing?
> It could be useful to enable EmitScalarConversion to handle any of the conversions so it can be used in other contexts than expanding a cast.
> It could be useful to enable EmitScalarConversion to handle any of the conversions so it can be used in other contexts than expanding a cast.

This was also the reason I did this since `EmitScalarConversion` seems to get called in many places as a generic dispatch for different conversions.


Repository:
  rC Clang

https://reviews.llvm.org/D53308





More information about the cfe-commits mailing list