diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-15 16:47:09 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-15 16:47:09 +0000 |
commit | 14d42d9d1ee188cd420c4835daa48c9d83bd08e6 (patch) | |
tree | e24fd6db3db19b5e99332f87cf6ca0438c1a3823 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | fc14cefeeade17a88822edd9d7ff2944067541c6 (diff) | |
download | bcm5719-llvm-14d42d9d1ee188cd420c4835daa48c9d83bd08e6.tar.gz bcm5719-llvm-14d42d9d1ee188cd420c4835daa48c9d83bd08e6.zip |
[clang-tidy] Add a checker that flags unnamed parameters.
Summary:
We still allow the escape hatch foo(int /*x*/) and also suggest this
in a fixit. This is more powerful than the corresponding cpplint.py check
it also flags functions with multiple arguments as naming all arguments is
recommended by the google style guide.
Reviewers: alexfh, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4518
llvm-svn: 213075
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index 44deb954715..36e11d4cef9 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -13,6 +13,7 @@ #include "AvoidCStyleCastsCheck.h" #include "ExplicitConstructorCheck.h" #include "ExplicitMakePairCheck.h" +#include "NamedParameterCheck.h" #include "OverloadedUnaryAndCheck.h" using namespace clang::ast_matchers; @@ -35,6 +36,9 @@ public: CheckFactories.addCheckFactory( "google-readability-casting", new ClangTidyCheckFactory<readability::AvoidCStyleCastsCheck>()); + CheckFactories.addCheckFactory( + "google-readability-function", + new ClangTidyCheckFactory<readability::NamedParameterCheck>()); } }; |