<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 20, 2009, at 11:48 PM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br>On Jul 20, 2009, at 7:01 PM, Mike Stump wrote:<br><br><blockquote type="cite">On Jul 20, 2009, at 6:54 PM, Eli Friedman wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">On Mon, Jul 20, 2009 at 6:46 PM, Mike Stump<<a href="mailto:mrs@apple.com">mrs@apple.com</a>> wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">CFGBlock *CFGBuilder::VisitChooseExpr(ChooseExpr *C) {<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">+  // See if this is a known constant.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">It's a constant by definition.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Yeah, I kinda want to refactor all the cut-n-paste code with something<br></blockquote><blockquote type="cite">nicer.  If all the versions of it are identical, or nearly so, it<br></blockquote><blockquote type="cite">aides in refactoring them out mindlessly.<br></blockquote><br>Eli is pointing out that choose_expr is different than all the  <br>others.  The condition is never allowed to be variable, so this should  <br>not use Evaluate at all.<br><br>-Chris</span></blockquote></div><br><div>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).</div></body></html>