[cfe-commits] r153226 - in /cfe/trunk: lib/AST/ExprConstant.cpp test/Sema/return.c
sebastian.redl at getdesigned.at
Fri Mar 23 12:15:13 PDT 2012
On 23.03.2012, at 19:19, Richard Trieu wrote:
> On Fri, Mar 23, 2012 at 8:04 AM, Sebastian Redl <sebastian.redl at getdesigned.at> wrote:
> On 22.03.2012 00:30, Richard Trieu wrote:
> > Author: rtrieu
> > Date: Wed Mar 21 18:30:30 2012
> > New Revision: 153226
> > URL: http://llvm.org/viewvc/llvm-project?rev=153226&view=rev
> > Log:
> > Change the binary operator data recursive evaluator to not stop at the first
> > non-constant value encountered. This allows the evaluator to deduce that
> > expressions like (x< 5 || true) is equal to true. Previously, it would visit
> > x and determined that the entire expression is could not evaluated to a
> > constant.
> It should still stop evaluating if the LHS has side effects. Does that
> work correctly?
> Is it the expected behavior to stop when side effects are found? I stripped out the early exit so the evaluator will fully process every entry. The regression I fixed only requires the resulting value of the binary operator and didn't care about side-effects, so an early exit would likely show the problem again.
Sorry, I was thinking about something else.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits