diff options
author | Samuel Benzaquen <sbenza@google.com> | 2015-02-11 21:21:05 +0000 |
---|---|---|
committer | Samuel Benzaquen <sbenza@google.com> | 2015-02-11 21:21:05 +0000 |
commit | 59c8aa92b8933fdf1cfefdaadc877c7ad640d4cb (patch) | |
tree | e9d9fd05535a4433382744f98fad68c71c05c2e2 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 3e76643a957a2ff569b19c96a61587b1895edc84 (diff) | |
download | bcm5719-llvm-59c8aa92b8933fdf1cfefdaadc877c7ad640d4cb.tar.gz bcm5719-llvm-59c8aa92b8933fdf1cfefdaadc877c7ad640d4cb.zip |
Add clang-tidy check google-global-names-in-headers.
Summary:
google-global-names-in-headers flags global namespace pollution in header files.
Right now it only triggers on using declarations and directives.
Reviewers: alexfh
Subscribers: curdeius
Differential Revision: http://reviews.llvm.org/D7563
llvm-svn: 228875
Diffstat (limited to 'clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp index 29d94a987e5..4009f46e722 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -17,6 +17,7 @@ #include "AvoidCStyleCastsCheck.h" #include "ExplicitConstructorCheck.h" #include "ExplicitMakePairCheck.h" +#include "GlobalNamesInHeadersCheck.h" #include "IntegerTypesCheck.h" #include "MemsetZeroLengthCheck.h" #include "NamedParameterCheck.h" @@ -58,6 +59,8 @@ public: "google-readability-todo"); CheckFactories.registerCheck<readability::BracesAroundStatementsCheck>( "google-readability-braces-around-statements"); + CheckFactories.registerCheck<readability::GlobalNamesInHeadersCheck>( + "google-global-names-in-headers"); CheckFactories.registerCheck<readability::FunctionSizeCheck>( "google-readability-function-size"); CheckFactories.registerCheck<readability::NamespaceCommentCheck>( |