From daef16319972310b4803eb09bc62e502f695e3bb Mon Sep 17 00:00:00 2001 From: Samuel Benzaquen Date: Mon, 19 Oct 2015 21:49:51 +0000 Subject: Added check uniqueptr-delete-release to replace "delete x.release()" with "x = nullptr" Reviewers: alexfh Differential Revision: http://reviews.llvm.org/D13179 llvm-svn: 250742 --- clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp') diff --git a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp index 40c00d4f45c..14c24a33130 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -20,6 +20,7 @@ #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" #include "SimplifyBooleanExprCheck.h" +#include "UniqueptrDeleteReleaseCheck.h" namespace clang { namespace tidy { @@ -40,6 +41,8 @@ public: "readability-identifier-naming"); CheckFactories.registerCheck( "readability-inconsistent-declaration-parameter-name"); + CheckFactories.registerCheck( + "readability-uniqueptr-delete-release"); CheckFactories.registerCheck( "readability-named-parameter"); CheckFactories.registerCheck( -- cgit v1.2.3