summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-01-14 19:37:54 +0000
committerDaniel Jasper <djasper@google.com>2015-01-14 19:37:54 +0000
commit3b6018b9f694546a9244a5ecca06be4c56b4410b (patch)
tree77b68faf02e71b506176e4e2549661d57258b639 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
parentfd41e2f946ec70e7ef2bd702ac8a56de97957e7b (diff)
downloadbcm5719-llvm-3b6018b9f694546a9244a5ecca06be4c56b4410b.tar.gz
bcm5719-llvm-3b6018b9f694546a9244a5ecca06be4c56b4410b.zip
clang-tidy: Add initial check for "Don't use else after return".
As per the LLVM coding standards: http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return Initial version, probably still quite a bit to do until this is really useful. Review: http://reviews.llvm.org/D6927 llvm-svn: 226025
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp3
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 9e7187573c9..71bac790a58 100644
--- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
@@ -11,6 +11,7 @@
#include "../ClangTidyModule.h"
#include "../ClangTidyModuleRegistry.h"
#include "BracesAroundStatementsCheck.h"
+#include "ElseAfterReturnCheck.h"
#include "FunctionSize.h"
#include "RedundantSmartptrGet.h"
@@ -23,6 +24,8 @@ public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<BracesAroundStatementsCheck>(
"readability-braces-around-statements");
+ CheckFactories.registerCheck<ElseAfterReturnCheck>(
+ "readability-else-after-return");
CheckFactories.registerCheck<FunctionSizeCheck>(
"readability-function-size");
CheckFactories.registerCheck<RedundantSmartptrGet>(
OpenPOWER on IntegriCloud