http://llvm.org/bugs/show_bug.cgi?id=18328

Jordan Rose <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from Jordan Rose <[email protected]> ---
alpha.core.BoolAssignment was intended to catch unsafe uses of fake boolean
variables, like Boolean or BOOL, which are actually typedef'd to some form of
char. These are dangerous because (BOOL)256 performs a truncation, not a truth
test, and so the value you get is 0 (false). (bool)256, on the other hand, will
actually compare 256 to 0, and correctly record the value 'true'.

You could argue that there should be a warning for any sort of int-to-bool
conversion where the int isn't known a priori to be 1 or 0, but that wasn't
really the motivation for the checker.

Finally, though, alpha checkers aren't considered real shipping products, so
it's not really worth filing bugs on them unless someone is actively working on
them.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to