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

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 10:28:44 PDT 2016


Prazek added a comment.

In http://reviews.llvm.org/D18821#399079, @alexfh wrote:

> In http://reviews.llvm.org/D18821#399064, @Prazek wrote:
>
> > In http://reviews.llvm.org/D18821#398843, @alexfh wrote:
> >
> > > BTW, why is the check in the 'modernize' module? It doesn't seem to make anything more modern. I would guess, the pattern it detects is most likely to result from a programming error. Also, the fix, though it retains the behavior, has a high chance to be incorrect. Can you share the results of running this check on LLVM? At least, how many problems it found and how many times the suggested fix was correct.
> > >
> > > I'd suggest to move the check to `misc` or maybe it's time to create a separate directory for checks targeting various bug-prone patterns.
> >
> >
> > There were many places.
>
>
> Would be nice, if you could tell the number and provide a list of locations. Have any of these been fixed since then?


No, I didn't know that I can do that - I always heard that I can't format code that I didn't change, so I though the same thing is here. I will try do post review of changes in clang/llvm soon.


http://reviews.llvm.org/D18821





More information about the cfe-commits mailing list