[PATCH] D18821: Add modernize-bool-to-integer-conversion

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 16:21:58 PDT 2016


Prazek added a comment.

In http://reviews.llvm.org/D18821#403103, @Quuxplusone wrote:

> I would like to see a new version of http://reviews.llvm.org/D19105 with all the "1-bit-bitfield" diffs removed.
>  Right now, it's hard to see that there's *anything* in http://reviews.llvm.org/D19105 that's not a miscorrection of a 1-bit bitfield.
>
> Do you have an example of a large codebase where this check runs with few false positives and a non-zero number of true positives?


I will post fixex tomorrow. I don't think there will be any false or true positives in warnings, but the main problems with fixes are that many times developer wants to use bools, but it decalres field/return type as int.


http://reviews.llvm.org/D18821





More information about the cfe-commits mailing list