[cfe-commits] r160494 - /cfe/trunk/lib/Analysis/UninitializedValues.cpp

Richard Smith richard at metafoo.co.uk
Fri Jul 20 16:03:53 PDT 2012


On Wed, Jul 18, 2012 at 9:59 PM, Ted Kremenek <kremenek at apple.com> wrote:

> Author: kremenek
> Date: Wed Jul 18 23:59:05 2012
> New Revision: 160494
>
> URL: http://llvm.org/viewvc/llvm-project?rev=160494&view=rev
> Log:
> Simplify UninitializedValues.cpp by removing logic to handle the previous
> (imprecise) representation
> of '&&' and '||' in the CFG.  This is no longer needed
>

Sadly, that appears to be untrue. We now produce a bogus -Wuninitialized
warning on this:

int x(int*); int f(bool b) { int n = (b || x(&n)) ? 0 : n; return n; }

More generally, && and || as the LHS of a ?: still produce a CFG with false
edges.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120720/0cbe1db5/attachment.html>


More information about the cfe-commits mailing list