From 14d42d9d1ee188cd420c4835daa48c9d83bd08e6 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 15 Jul 2014 16:47:09 +0000 Subject: [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 --- clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp') 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()); + CheckFactories.addCheckFactory( + "google-readability-function", + new ClangTidyCheckFactory()); } }; -- cgit v1.2.1