[PATCH] D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions

Bjorn Pettersson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 27 01:15:51 PST 2019


bjope added inline comments.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1223
   if (SrcType->isFixedPointType()) {
-    if (DstType->isFixedPointType()) {
-      return EmitFixedPointConversion(Src, SrcType, DstType, Loc);
-    } else if (DstType->isBooleanType()) {
+    if (DstType->isBooleanType()) {
+      // It is important that we check this before checking if the dest type is
----------------
nit: May skip braces on this if


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1230
       return Builder.CreateIsNotNull(Src, "tobool");
+    } else if (DstType->isFixedPointType() || DstType->isIntegerType()) {
+      return EmitFixedPointConversion(Src, SrcType, DstType, Loc);
----------------
nit: may skip braces on this if.
nit: no need to use "else".



Repository:
  rC Clang

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

https://reviews.llvm.org/D56900





More information about the cfe-commits mailing list