From 276fc642d38bbaa4aca00f517ba2f6f7bd138fe3 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Sun, 29 Jun 2014 22:19:53 +0000 Subject: 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 --- 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 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()); + CheckFactories.addCheckFactory( + "google-readability-casting", + new ClangTidyCheckFactory()); } }; -- cgit v1.2.3