diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2015-10-25 15:31:25 +0000 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2015-10-25 15:31:25 +0000 |
commit | 7f1b5099d7d93da4947ec7114e95671992941f94 (patch) | |
tree | ec1ee1b887ba6258a9d5ba1fe088e5b2090667f9 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
parent | bf45e742540cd14e44a2a065d8b9a32b49e95957 (diff) | |
download | bcm5719-llvm-7f1b5099d7d93da4947ec7114e95671992941f94.tar.gz bcm5719-llvm-7f1b5099d7d93da4947ec7114e95671992941f94.zip |
[clang-tidy] Add check readability-implicit-bool-cast
Summary:
This is another check that I ported to clang-tidy from colobot-lint tool.
As previously discussed on cfe-dev mailing list, this is one of those
checks that I think is general and useful enough for contribution to
clang-tidy.
This patch contains implementation of check taken from colobot-lint, but
it is extended a great deal, including FixIt hints for automated
refactoring, exhaustive testcases, and user documentation.
Reviewers: sbenza, aaron.ballman, alexfh
Subscribers: Eugene.Zelenko
Differential Revision: http://reviews.llvm.org/D13635
llvm-svn: 251235
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp index 14c24a33130..314baefc437 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -15,6 +15,7 @@ #include "ElseAfterReturnCheck.h" #include "FunctionSizeCheck.h" #include "IdentifierNamingCheck.h" +#include "ImplicitBoolCastCheck.h" #include "InconsistentDeclarationParameterNameCheck.h" #include "NamedParameterCheck.h" #include "RedundantSmartptrGetCheck.h" @@ -39,6 +40,8 @@ public: "readability-function-size"); CheckFactories.registerCheck<IdentifierNamingCheck>( "readability-identifier-naming"); + CheckFactories.registerCheck<ImplicitBoolCastCheck>( + "readability-implicit-bool-cast"); CheckFactories.registerCheck<InconsistentDeclarationParameterNameCheck>( "readability-inconsistent-declaration-parameter-name"); CheckFactories.registerCheck<UniqueptrDeleteReleaseCheck>( |