[PATCH] D18540: [Sema] Note when we've actually encountered a failure in ExprConstant, and take that into account when looking up objects.

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 18:50:30 PDT 2016


george.burgess.iv added inline comments.

================
Comment at: include/clang/AST/Expr.h:541-546
@@ -540,1 +540,8 @@
 
+    /// \brief Whether the evaluation was unable to reduce a construct to a
+    /// value.
+    ///
+    /// For example, in foo(bar, baz, qux), if evaluating bar fails, we may
+    /// try to evaluate baz and qux anyway.
+    bool HasFailure;
+
----------------
rsmith wrote:
> I don't think this provides enough guarantees to be useful as part of the external `EvalStatus` results. Can you sink this into `EvalInfo`? Alternatively, can you merge this with `HasSideEffects`? I don't think we need to maintain a distinction between the two different ways we can get an evaluation result after skipping a subexpression.
> I don't think this provides enough guarantees to be useful as part of the external EvalStatus results. Can you sink this into EvalInfo

WFM

> Alternatively, can you merge this with `HasSideEffects`.

The result is a bit more subtle (because some things depend on `HasSideEffects` being accurate, and not being set whenever we fail), but sure.


http://reviews.llvm.org/D18540





More information about the cfe-commits mailing list