aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
diff options
context:
space:
mode:
authorNathan James <n.james93@hotmail.co.uk>2020-03-03 16:39:32 +0000
committerNathan James <n.james93@hotmail.co.uk>2020-03-03 16:43:45 +0000
commite40a742a5008c5a4cf647c0ea805486498786393 (patch)
treee22cb5a7fa2803b5a75d40469d6519d7de6568f6 /clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
parentb4b9fa5e11abab38e4f5dcd65b57c0226a0aee15 (diff)
downloadllvm-e40a742a5008c5a4cf647c0ea805486498786393.zip
llvm-e40a742a5008c5a4cf647c0ea805486498786393.tar.gz
llvm-e40a742a5008c5a4cf647c0ea805486498786393.tar.bz2
[clang-tidy] Change checks to use new isLanguageVersionSupported restriction
Summary: Modifies all checks that are language version dependent to use `isLanguageVersionSupported` Reviewers: jdoerfert, lebedev.ri, aaron.ballman, gribozavr2, Eugene.Zelenko Reviewed By: gribozavr2 Subscribers: wuzish, nemanjai, xazax.hun, hiraditya, kbarton, steven_wu, dexonsmith, arphaman, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75340
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index 6efa982..307297f 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -473,11 +473,7 @@ void UseNullptrCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
}
void UseNullptrCheck::registerMatchers(MatchFinder *Finder) {
- // Only register the matcher for C++. Because this checker is used for
- // modernization, it is reasonable to run it on any C++ standard with the
- // assumption the user is trying to modernize their codebase.
- if (getLangOpts().CPlusPlus)
- Finder->addMatcher(makeCastSequenceMatcher(), this);
+ Finder->addMatcher(makeCastSequenceMatcher(), this);
}
void UseNullptrCheck::check(const MatchFinder::MatchResult &Result) {