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<[email protected]> 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).
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to