summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/ClangTidy.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2014-08-06 11:49:10 +0000
committerAlexander Kornienko <alexfh@google.com>2014-08-06 11:49:10 +0000
commitb3d331d18dbfdfb356b234077bc0bf14a0fdea14 (patch)
tree9cbbf1ec16f66fd95e0d44d8b7407ffe91a3962f /clang-tools-extra/clang-tidy/ClangTidy.cpp
parenta11da0c8cd79cf3945427870c95f0011da990956 (diff)
downloadbcm5719-llvm-b3d331d18dbfdfb356b234077bc0bf14a0fdea14.tar.gz
bcm5719-llvm-b3d331d18dbfdfb356b234077bc0bf14a0fdea14.zip
Rename ChecksFilter to GlobList, as there's nothing specific to checks in it.
Summary: Rename ChecksFilter to GlobList, as there's nothing specific to checks in it. It's a rather generic way to represent sets of strings (or patterns), so it may be used for something else in ClangTidy. The new name would not look strange when used to filter other entities. Reviewers: klimek Reviewed By: klimek Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4806 llvm-svn: 214961
Diffstat (limited to 'clang-tools-extra/clang-tidy/ClangTidy.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/ClangTidy.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang-tools-extra/clang-tidy/ClangTidy.cpp b/clang-tools-extra/clang-tidy/ClangTidy.cpp
index ca91842062b..ec528ba9083 100644
--- a/clang-tools-extra/clang-tidy/ClangTidy.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidy.cpp
@@ -213,7 +213,7 @@ clang::ASTConsumer *ClangTidyASTConsumerFactory::CreateASTConsumer(
Context.setASTContext(&Compiler.getASTContext());
std::vector<std::unique_ptr<ClangTidyCheck>> Checks;
- ChecksFilter &Filter = Context.getChecksFilter();
+ GlobList &Filter = Context.getChecksFilter();
CheckFactories->createChecks(Filter, Checks);
std::unique_ptr<ast_matchers::MatchFinder> Finder(
@@ -252,10 +252,10 @@ clang::ASTConsumer *ClangTidyASTConsumerFactory::CreateASTConsumer(
}
std::vector<std::string>
-ClangTidyASTConsumerFactory::getCheckNames(ChecksFilter &Filter) {
+ClangTidyASTConsumerFactory::getCheckNames(GlobList &Filter) {
std::vector<std::string> CheckNames;
for (const auto &CheckFactory : *CheckFactories) {
- if (Filter.isCheckEnabled(CheckFactory.first))
+ if (Filter.contains(CheckFactory.first))
CheckNames.push_back(CheckFactory.first);
}
@@ -267,7 +267,7 @@ ClangTidyASTConsumerFactory::getCheckNames(ChecksFilter &Filter) {
}
ClangTidyASTConsumerFactory::CheckersList
-ClangTidyASTConsumerFactory::getCheckersControlList(ChecksFilter &Filter) {
+ClangTidyASTConsumerFactory::getCheckersControlList(GlobList &Filter) {
CheckersList List;
bool AnalyzerChecksEnabled = false;
@@ -275,7 +275,7 @@ ClangTidyASTConsumerFactory::getCheckersControlList(ChecksFilter &Filter) {
std::string Checker((AnalyzerCheckNamePrefix + CheckName).str());
AnalyzerChecksEnabled =
AnalyzerChecksEnabled ||
- (!CheckName.startswith("debug") && Filter.isCheckEnabled(Checker));
+ (!CheckName.startswith("debug") && Filter.contains(Checker));
}
if (AnalyzerChecksEnabled) {
@@ -290,7 +290,7 @@ ClangTidyASTConsumerFactory::getCheckersControlList(ChecksFilter &Filter) {
std::string Checker((AnalyzerCheckNamePrefix + CheckName).str());
if (CheckName.startswith("core") ||
- (!CheckName.startswith("debug") && Filter.isCheckEnabled(Checker)))
+ (!CheckName.startswith("debug") && Filter.contains(Checker)))
List.push_back(std::make_pair(CheckName, true));
}
}
OpenPOWER on IntegriCloud