<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Oct 25, 2013, at 4:42 PM, Richard Trieu <<a href="mailto:rtrieu@google.com">rtrieu@google.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: HelveticaNeue; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">If you check out -Wlogical-not-parentheses and -Wtautological-compare-out-of-range, they are in lib/Sema/SemaChecking.cpp.  Why did you use a CFG approach instead?</span></blockquote></div><br><div>Hi Richard,</div><div><br></div><div>I told Anders that modifying the CFG builder would be an interesting approach for two reasons:</div><div><br></div><div>(1) The CFG is used for a variety of dataflow analyses, thus folding this “smarts” into the CFG builder seems to have dividends for other uses.</div><div><br></div><div>(2) The CFG builder already does some branch pruning by doing some simply analysis of expressions at branches.  This seemed like a natural enhancement.</div><div><br></div><div>I did consider this to take a similar approach to -Wlogical-not-parentheses, but thought this would be a more promising direction to explore.</div><div><br></div><div>Flipping the question around, do you think it would be interesting to consider the opposite approach and move the logic to -Wlogical-not-parentheses, etc., into the CFG builder, for the same reasons I have given above?</div><div><br></div><div>Ted</div></body></html>