[cfe-commits] r76531 - in /cfe/trunk: lib/Analysis/CFG.cpp test/Analysis/dead-stores.c

Ted Kremenek kremenek at apple.com
Tue Jul 21 10:15:21 PDT 2009


On Jul 20, 2009, at 11:48 PM, Chris Lattner wrote:

>
> On Jul 20, 2009, at 7:01 PM, Mike Stump wrote:
>
>> On Jul 20, 2009, at 6:54 PM, Eli Friedman wrote:
>>> On Mon, Jul 20, 2009 at 6:46 PM, Mike Stump<mrs at apple.com> wrote:
>>>> CFGBlock *CFGBuilder::VisitChooseExpr(ChooseExpr *C) {
>>>> +  // See if this is a known constant.
>>>
>>> It's a constant by definition.
>>
>> Yeah, I kinda want to refactor all the cut-n-paste code with  
>> something
>> nicer.  If all the versions of it are identical, or nearly so, it
>> aides in refactoring them out mindlessly.
>
> Eli is pointing out that choose_expr is different than all the
> others.  The condition is never allowed to be variable, so this should
> not use Evaluate at all.
>
> -Chris

Right.  Note that we want to keep ChooseExpr in the CFG (and not just  
inline its effects) so that we maintain the structure of the control- 
flow.  This is important for clients that render diagnostics that  
incorporate control-flow (e.g., the static analyzer).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090721/3487dd67/attachment.html>


More information about the cfe-commits mailing list