diff options
| author | Gabor Horvath <xazax.hun@gmail.com> | 2016-12-31 12:45:59 +0000 |
|---|---|---|
| committer | Gabor Horvath <xazax.hun@gmail.com> | 2016-12-31 12:45:59 +0000 |
| commit | 7510d9aa8a94b1985e0ac49ad5be38fcdd3c0667 (patch) | |
| tree | 9843af8b13fc55f2409353a056690e2dfe5ad2f1 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
| parent | 94e5371dde2a9f389ecfb70c91e7011c68d9f8ad (diff) | |
| download | bcm5719-llvm-7510d9aa8a94b1985e0ac49ad5be38fcdd3c0667.tar.gz bcm5719-llvm-7510d9aa8a94b1985e0ac49ad5be38fcdd3c0667.zip | |
[clang-tidy] Add delete null pointer check.
This check detects and fixes redundant null checks before deletes.
Patch by: Gergely Angeli!
Differential Revision: https://reviews.llvm.org/D21298
llvm-svn: 290784
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 57e3de507ed..0455f663456 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -13,6 +13,7 @@ #include "AvoidConstParamsInDecls.h" #include "BracesAroundStatementsCheck.h" #include "ContainerSizeEmptyCheck.h" +#include "DeleteNullPointerCheck.h" #include "DeletedDefaultCheck.h" #include "ElseAfterReturnCheck.h" #include "FunctionSizeCheck.h" @@ -46,6 +47,8 @@ public: "readability-braces-around-statements"); CheckFactories.registerCheck<ContainerSizeEmptyCheck>( "readability-container-size-empty"); + CheckFactories.registerCheck<DeleteNullPointerCheck>( + "readability-delete-null-pointer"); CheckFactories.registerCheck<DeletedDefaultCheck>( "readability-deleted-default"); CheckFactories.registerCheck<ElseAfterReturnCheck>( |

