When performing an implicit from float to bool, the floating point value must be...
authorAaron Ballman <aaron@aaronballman.com>
Wed, 30 Dec 2015 14:26:07 +0000 (14:26 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Wed, 30 Dec 2015 14:26:07 +0000 (14:26 +0000)
commitdbc441eb34d41e929f4d07b16e030746f25fd344
treefc48e3065ad63f27dff1e5c63f2537afbb08bdc0
parent666761afabe5c7a36c4b326d537d00c2820644f2
When performing an implicit from float to bool, the floating point value must be *exactly* zero in order for the conversion to result in 0. This does not involve a conversion through an integer value, and so truncation of the value is not performed.

This patch address PR25876.

llvm-svn: 256643
clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/warn-literal-conversion.cpp