[PATCH] check for Incorrect logic in operator

Anders Rönnholm Anders.Ronnholm at evidente.se
Fri Oct 18 07:04:37 PDT 2013


Hi,

I have a new patch I like to get reviewed. It checks for incorrect logics in relational,equal and logic operators in cfgbuilder when trying to evaluate bool. A warning is emitted in Sema when an error occurs. 

eg.
if (x != 2 || x != 3) { } always true
if ((x < y) <= 10) {}  always true

Thanks,
Anders 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: incorrectoperatorlogic.diff
Type: text/x-patch
Size: 20501 bytes
Desc: incorrectoperatorlogic.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131018/097bb843/attachment.bin>


More information about the cfe-commits mailing list