diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-09-10 10:07:11 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-09-10 10:07:11 +0000 |
commit | 11d4d6446e097ef12ee106446486276e8a8c79b0 (patch) | |
tree | fbc3710e85328ba618c458b545bccd74fd7a8049 /clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp | |
parent | 1d7f0faf93eefa7624b611cd0636a2f62f44efe9 (diff) | |
download | bcm5719-llvm-11d4d6446e097ef12ee106446486276e8a8c79b0.tar.gz bcm5719-llvm-11d4d6446e097ef12ee106446486276e8a8c79b0.zip |
[clang-tidy] Add inconsistent declaration parameter name check
This is first of series of patches, porting code from my project colobot-lint,
as I mentioned recently in cfe-dev mailing list.
This patch adds a new check in readability module:
readability-inconsistent-declaration-parameter-name. I also added appropriate
testcases and documentation.
I chose readability module, as it seems it is the best place for it.
I think I followed the rules of LLVM coding guideline, but I may have missed
something, as I usually use other code formatting style.
http://reviews.llvm.org/D12462
Patch by Piotr Dziwinski!
llvm-svn: 247261
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 6efcbfa7d58..40c00d4f45c 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 "InconsistentDeclarationParameterNameCheck.h" #include "NamedParameterCheck.h" #include "RedundantSmartptrGetCheck.h" #include "RedundantStringCStrCheck.h" @@ -37,6 +38,8 @@ public: "readability-function-size"); CheckFactories.registerCheck<IdentifierNamingCheck>( "readability-identifier-naming"); + CheckFactories.registerCheck<InconsistentDeclarationParameterNameCheck>( + "readability-inconsistent-declaration-parameter-name"); CheckFactories.registerCheck<readability::NamedParameterCheck>( "readability-named-parameter"); CheckFactories.registerCheck<RedundantSmartptrGetCheck>( |