[PATCH] D19165: [clang-tidy] Add modernize-increment-bool check.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 15 18:25:49 PDT 2016


alexfh added a comment.

In http://reviews.llvm.org/D19165#403099, @Prazek wrote:

> In http://reviews.llvm.org/D19165#402657, @aaron.ballman wrote:
>
> > This strikes me as something the compiler should diagnose instead of a clang-tidy check. Incrementing a bool has been deprecated for some time, but it is outright removed in C++17, so I think giving users a migration path as part of the compiler would be far more beneficial. What do you think?
>
>
> clang already warns about it, but I don't think it has good fixits.


What clang diagnostic flags this issue? I'd rather make sure it provides good fixits than as a clang-tidy check that does almost the same. Clang-tidy can be configured to run Clang diagnostics and it will happily apply fixes if asked to.


http://reviews.llvm.org/D19165





More information about the cfe-commits mailing list