Disable clang-tidy Google checkers when not compiling in C++ mode. None of the checkers require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct.

llvm-svn: 246663
diff --git a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
index 25d84b0..5dad36f 100644
--- a/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
+++ b/clang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.cpp
@@ -21,6 +21,11 @@
 
 void
 OverloadedUnaryAndCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
+  // Only register the matchers for C++; the functionality currently does not
+  // provide any benefit to other languages, despite being benign.
+  if (!getLangOpts().CPlusPlus)
+    return;
+
   // Match unary methods that overload operator&.
   Finder->addMatcher(methodDecl(parameterCountIs(0), hasOverloadedOperatorName(
                                                          "&")).bind("overload"),