rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2026
+    return EmitScalarConversion(Visit(E), E->getType(), DestTy,
+                                CE->getExprLoc());
 
----------------
leonardchan wrote:
> 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.
I think we do that in a very restricted set of places, like compound assignment 
operators, and honestly they should be changed so that they store the final 
cast kind.  But I suppose I can't ask you to fight the current system.


Repository:
  rC Clang

https://reviews.llvm.org/D53308



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to