Relational comparison with bitwise results is always true/false

Richard Smith richard at metafoo.co.uk
Mon Aug 25 12:30:20 PDT 2014


On Mon, Aug 25, 2014 at 9:19 AM, Anders Rönnholm <
Anders.Ronnholm at evidente.se> wrote:

> Hi,
>
> I have made a new bitwise comparison always true check for relational
> comparisons i'd like to get reviewed.
>
> e.g
> if ((x & 64) < 65) // bitwise comparison always evaluates to true


I'm very surprised to see this being implemented in Analysis/CFG.cpp; this
belongs in Sema/SemaChecking.cpp. It makes no sense to me to couple this
check to building a CFG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140825/90b1a9a2/attachment.html>


More information about the cfe-commits mailing list