diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-06-29 22:19:53 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-06-29 22:19:53 +0000 |
commit | 276fc642d38bbaa4aca00f517ba2f6f7bd138fe3 (patch) | |
tree | cfe7d060a2bd1dca708e721216c600f9940eaa81 /clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp | |
parent | 9e41b5cc1252846b7e395cb10ebe1faaa481dbc3 (diff) | |
download | bcm5719-llvm-276fc642d38bbaa4aca00f517ba2f6f7bd138fe3.tar.gz bcm5719-llvm-276fc642d38bbaa4aca00f517ba2f6f7bd138fe3.zip |
Another attempt to add a clang-tidy check for flagging C-style casts.
Summary:
The first version failed the SubstNonTypeTempateParmExpr-related test
on some buildbots. This one uses the new substNonTypeTempateParmExpr matcher to
filter out implicit C-style casts.
This patch depends on D4327.
Reviewers: djasper
Reviewed By: djasper
Subscribers: aemerson, cfe-commits
Differential Revision: http://reviews.llvm.org/D4328
llvm-svn: 212002
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 05787cf214d..34abfb388b3 100644 --- a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp +++ b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp @@ -10,6 +10,7 @@ #include "../ClangTidy.h" #include "../ClangTidyModule.h" #include "../ClangTidyModuleRegistry.h" +#include "AvoidCStyleCastsCheck.h" #include "ExplicitConstructorCheck.h" using namespace clang::ast_matchers; @@ -23,6 +24,9 @@ public: CheckFactories.addCheckFactory( "google-explicit-constructor", new ClangTidyCheckFactory<ExplicitConstructorCheck>()); + CheckFactories.addCheckFactory( + "google-readability-casting", + new ClangTidyCheckFactory<readability::AvoidCStyleCastsCheck>()); } }; |