[cfe-dev] new -Wuninitialized implementation in Clang

David Walthall walthall at stanfordalumni.org
Tue Feb 8 17:21:23 PST 2011


On 2/3/2011 6:35 PM, Ted Kremenek wrote:
>   int x;
>   ...
>   if (flag)
>     x = ...
>   ...
>   if (flag)
>     use(x);

This comes up fairly frequently in code that I work on.  Is it possible
to recognize and analyze this case in the special case that 'flag' is a
const?

Thank you,
David




More information about the cfe-dev mailing list