diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-02-01 15:31:15 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-02-01 15:31:15 +0000 |
commit | c3975b7d6af5970598db272f9b13423d2e09d5ab (patch) | |
tree | 62f4218c507699e26ed1270536422870938496fa /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
parent | a052037034df09335b964ef9dae91bb9b54c94fa (diff) | |
download | bcm5719-llvm-c3975b7d6af5970598db272f9b13423d2e09d5ab.tar.gz bcm5719-llvm-c3975b7d6af5970598db272f9b13423d2e09d5ab.zip |
Add a new check, readability-redundant-control-flow, that check for some forms of redundant control flow statements. Currently checks for return statements at the end of a function with a void return type and continue statements at the end of looping statements.
Patch by Richard Thomson.
llvm-svn: 259362
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 314baefc437..93b925ec0c2 100644 --- a/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp @@ -18,6 +18,7 @@ #include "ImplicitBoolCastCheck.h" #include "InconsistentDeclarationParameterNameCheck.h" #include "NamedParameterCheck.h" +#include "RedundantControlFlowCheck.h" #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" #include "SimplifyBooleanExprCheck.h" @@ -44,6 +45,8 @@ public: "readability-implicit-bool-cast"); CheckFactories.registerCheck<InconsistentDeclarationParameterNameCheck>( "readability-inconsistent-declaration-parameter-name"); + CheckFactories.registerCheck<RedundantControlFlowCheck>( + "readability-redundant-control-flow"); CheckFactories.registerCheck<UniqueptrDeleteReleaseCheck>( "readability-uniqueptr-delete-release"); CheckFactories.registerCheck<readability::NamedParameterCheck>( |