On Oct 25, 2013, at 4:42 PM, Richard Trieu <[email protected]> wrote:
> 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?
Hi Richard,
I told Anders that modifying the CFG builder would be an interesting approach
for two reasons:
(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.
(2) The CFG builder already does some branch pruning by doing some simply
analysis of expressions at branches. This seemed like a natural enhancement.
I did consider this to take a similar approach to -Wlogical-not-parentheses,
but thought this would be a more promising direction to explore.
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?
Ted
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits