[clang-tidy] Add a checker that flags all instances of overloaded unary operator&
This handles both methods and freestanding overloads.
Differential Revision: http://reviews.llvm.org/D4498
llvm-svn: 213067
diff --git a/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp b/clang-tools-extra/clang-tidy/google/GoogleTidyModule.cpp
index 248d0f1..44deb95 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 "OverloadedUnaryAndCheck.h"
using namespace clang::ast_matchers;
@@ -29,6 +30,9 @@
"google-explicit-constructor",
new ClangTidyCheckFactory<ExplicitConstructorCheck>());
CheckFactories.addCheckFactory(
+ "google-runtime-operator",
+ new ClangTidyCheckFactory<runtime::OverloadedUnaryAndCheck>());
+ CheckFactories.addCheckFactory(
"google-readability-casting",
new ClangTidyCheckFactory<readability::AvoidCStyleCastsCheck>());
}