diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp | 5 |
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); } |