summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2015-09-02 16:05:21 +0000
committerAaron Ballman <aaron@aaronballman.com>2015-09-02 16:05:21 +0000
commit1f1b067036a0cdde17d11d92cf45320c63683a43 (patch)
tree46219e11377aabe003998080c83ecc17d7bae490 /clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
parent01cee3a7bdf975ceb5b10b684755afd3f65795fd (diff)
downloadbcm5719-llvm-1f1b067036a0cdde17d11d92cf45320c63683a43.tar.gz
bcm5719-llvm-1f1b067036a0cdde17d11d92cf45320c63683a43.zip
Disable clang-tidy readability 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: 246661
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
index cb10723781b..5b40d92cd4c 100644
--- a/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
@@ -74,6 +74,11 @@ void registerMatchersForGetEquals(MatchFinder *Finder,
} // namespace
void RedundantSmartptrGetCheck::registerMatchers(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;
+
registerMatchersForGetArrowStart(Finder, this);
registerMatchersForGetEquals(Finder, this);
}
OpenPOWER on IntegriCloud