rjmccall added inline comments.

================
Comment at: clang/lib/AST/ExprConstant.cpp:9599
+      return false;
+    return Success(Val.getInt().getBoolValue(), E);
+  }
----------------
I know you haven't really done constant-evaluation yet, but I think you should 
at least be setting up operations like this correctly:

1. There should be an `EvaluateFixedPoint` function that evaluates an 
expression as a fixed-point value, just like `EvaluateFloat` and the others, 
which can be structured to use `FixedPointExprEvaluator`.
2. There should be a `getBoolValue` method on `APFixedPoint`.


================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2026
+    return EmitScalarConversion(Visit(E), E->getType(), DestTy,
+                                CE->getExprLoc());
 
----------------
Why are you pushing these casts through `EmitScalarConversion` when the cast 
kind already tells you which operation you're doing?


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