[PATCH] [analyzer] Refactor conditional expression evaluating code

Pavel Labath labath at google.com
Fri Aug 16 01:19:23 PDT 2013


Indeed, the conditional temporary destructors problem was my motivation for
this patch, I split it into two because they were somewhat independent, and
I anticipated this would not be so easy to push through. :)

Basically, I wanted to store the logical operator results in the state, so
that I could later branch consistently. After some experimentation (you can
find it in the history of the second patch) I settled for this solution.

Although it may be debatable, I actually find this implementation of
EvaluateLogicalExpressions more sensible. My impression of the ProgramState
structure is that it is supposed to contain everything needed for further
program evaluation. The current implementation seems to bypass that,
because it is looking at the exploded graph history. I agree that it is a
sensitive part and understand your caution. If you have any further
questions, I would be happy to answer them.


On 15 August 2013 09:14, Ted Kremenek <kremenek at apple.com> wrote:

> On Aug 14, 2013, at 9:06 PM, Manuel Klimek <klimek at google.com> wrote:
>
>  Specifically, what problem are you trying to solve?
>>
>
> See http://llvm-reviews.chandlerc.com/D1259 (WIP Fix for temporary
> destructors in conditionals), which this patch afaik enables.
>
>
>
> Thanks Manuel.  I’ll review both patches together.
>
> Pavel: thanks for working on this.  This is a bit more than I anticipated
> reviewing tonight, so I’ll spend more time on it tomorrow.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130816/7df4c8ab/attachment.html>


More information about the cfe-commits mailing list