[cfe-commits] [Patch] Checker for assignment of non-Boolean value to Boolean variable

Ryan Govostes rzg at apple.com
Thu Dec 8 15:35:24 PST 2011


On Dec 8, 2011, at 3:19 PM, David Blaikie wrote:

> I haven't looked through the code, but I sort of assumed since this
> was an SA warning that it would be trying to find a particular more
> bug-like code, such as looking for int->bool where the int was certain
> to be neither zero nor one, say.

Yes, this is what it does.

The checker helps avoid situations in which your program ends up in an unexpected state due to both (x == YES) and (x == NO) being false. 

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111208/14a259ed/attachment.html>


More information about the cfe-commits mailing list