[cfe-commits] Patch: Warn on logical operations with constants

Richard Trieu rtrieu at google.com
Fri May 6 13:38:40 PDT 2011


The old warning that checked for logical operators with constants did not
treat 1 and 0 as it would for other constants.  Changed the warning so that
if a bool type exists, 1 and 0 will trigger the warning.

Patch is attached and available through Code Review:
http://codereview.appspot.com/4444068/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110506/ee803adc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_on_constants_logical_operations.patch
Type: text/x-patch
Size: 3764 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110506/ee803adc/attachment.bin>


More information about the cfe-commits mailing list