diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-16 14:16:56 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-07-16 14:16:56 +0000 |
commit | 2252cbf4e89d76b1c39da89b01d67b3e2b73154b (patch) | |
tree | 972a4a9393e381d401b0fd4acd64c20e6e1c0cb5 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 73ef216c73164e1012c22a8813e7543637163996 (diff) | |
download | bcm5719-llvm-2252cbf4e89d76b1c39da89b01d67b3e2b73154b.tar.gz bcm5719-llvm-2252cbf4e89d76b1c39da89b01d67b3e2b73154b.zip |
[clang-tidy] Add namespaces checkers.
This change contains of two checkers that warn about
1. anonymous namespaces in header files.
2. 'using namespace' directives everywhere.
Differential Revision: http://reviews.llvm.org/D4523
llvm-svn: 213153
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index 43eacfc39e2..416f48d1fa3 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -16,6 +16,8 @@ #include "NamedParameterCheck.h" #include "OverloadedUnaryAndCheck.h" #include "StringReferenceMemberCheck.h" +#include "UnnamedNamespaceInHeaderCheck.h" +#include "UsingNamespaceDirectiveCheck.h" using namespace clang::ast_matchers; @@ -29,6 +31,12 @@ public: "google-build-explicit-make-pair", new ClangTidyCheckFactory<build::ExplicitMakePairCheck>()); CheckFactories.addCheckFactory( + "google-build-namespaces", + new ClangTidyCheckFactory<build::UnnamedNamespaceInHeaderCheck>()); + CheckFactories.addCheckFactory( + "google-build-using-namespace", + new ClangTidyCheckFactory<build::UsingNamespaceDirectiveCheck>()); + CheckFactories.addCheckFactory( "google-explicit-constructor", new ClangTidyCheckFactory<ExplicitConstructorCheck>()); CheckFactories.addCheckFactory( |