On Dec 30, 2015 11:53 AM, "Aaron Ballman" wrote:
>
> On Wed, Dec 30, 2015 at 12:30 PM, Richard Smith
wrote:
> > On Dec 30, 2015 6:34 AM, "Aaron Ballman"
wrote:
> >>
> >> aaron.ballman closed this revision.
> >> aaron.ballman added a comment.
> >>
> >> Thanks! I've commit in r256643.
> >>
> >>
>
On Wed, Dec 30, 2015 at 12:30 PM, Richard Smith wrote:
> On Dec 30, 2015 6:34 AM, "Aaron Ballman" wrote:
>>
>> aaron.ballman closed this revision.
>> aaron.ballman added a comment.
>>
>> Thanks! I've commit in r256643.
>>
>>
>>
>> Comment at: test/SemaCXX/warn-literal-conversion.
On Dec 30, 2015 6:34 AM, "Aaron Ballman" wrote:
>
> aaron.ballman closed this revision.
> aaron.ballman added a comment.
>
> Thanks! I've commit in r256643.
>
>
>
> Comment at: test/SemaCXX/warn-literal-conversion.cpp:49-50
> @@ +48,4 @@
> + // values.
> + bool b3 = 0.0f;
> + b
aaron.ballman closed this revision.
aaron.ballman added a comment.
Thanks! I've commit in r256643.
Comment at: test/SemaCXX/warn-literal-conversion.cpp:49-50
@@ +48,4 @@
+ // values.
+ bool b3 = 0.0f;
+ bool b4 = 0.0;
+}
rsmith wrote:
> What about
>
> bool
rsmith accepted this revision.
This revision is now accepted and ready to land.
Comment at: test/SemaCXX/warn-literal-conversion.cpp:49-50
@@ +48,4 @@
+ // values.
+ bool b3 = 0.0f;
+ bool b4 = 0.0;
+}
What about
bool b5 = 1.0;
bool b6 = 2.0;
? Arguably a
aaron.ballman added a comment.
In http://reviews.llvm.org/D15814#317879, @Eugene.Zelenko wrote:
> This seems to me as specific case of Clang-tidy
> readability-implicit-bool-cast. May be this check should be entirely moved to
> Clang?
I think the reason why that is in clang-tidy is because it
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
This seems to me as specific case of Clang-tidy readability-implicit-bool-cast.
May be this check should be entirely moved to Clang?
http://reviews.llvm.org/D15814
_
aaron.ballman created this revision.
aaron.ballman added reviewers: rsmith, rtrieu, dblaikie.
aaron.ballman added a subscriber: cfe-commits.
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
i