Relational comparison with bitwise results is always true/false

Richard Smith richard at metafoo.co.uk
Thu Aug 28 18:44:12 PDT 2014


On Tue, Aug 26, 2014 at 10:21 AM, Daniel Marjamäki <
Daniel.Marjamaki at evidente.se> wrote:

>
> Hello!
>
> > 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.
>
> It is written in CFG since it makes the control flow analysis better if it
> knows that a condition is always true/false.
>

That is putting the cart before the horse. I agree it should be *used* by
the CFG builder, but it doesn't belong there.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140828/3dd97a13/attachment.html>


More information about the cfe-commits mailing list