aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-12 10:17:12 -0700
committerKazu Hirata <kazu@google.com>2022-06-12 10:17:12 -0700
commitf13019f8367a417075e70effb13dcf58024090b2 (patch)
tree07e3ef78f28cdd4cdd84bfa9c62a8a506b9cfe97 /clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
parentb8d728a098b10f0f9afdc3fe8641b4678f57f1e6 (diff)
downloadllvm-f13019f8367a417075e70effb13dcf58024090b2.zip
llvm-f13019f8367a417075e70effb13dcf58024090b2.tar.gz
llvm-f13019f8367a417075e70effb13dcf58024090b2.tar.bz2
[clang] Use any_of and none_of (NFC)
Diffstat (limited to 'clang/lib/ExtractAPI/ExtractAPIConsumer.cpp')
-rw-r--r--clang/lib/ExtractAPI/ExtractAPIConsumer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
index a7b0a1a..bffa66c 100644
--- a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
+++ b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
@@ -199,11 +199,11 @@ struct LocationFileChecker {
// Try to reduce the include name the same way we tried to include it.
bool IsQuoted = false;
if (auto IncludeName = getRelativeIncludeName(CI, FileName, &IsQuoted))
- if (llvm::find_if(KnownFiles,
- [&IsQuoted, &IncludeName](const auto &KnownFile) {
- return KnownFile.first.equals(*IncludeName) &&
- KnownFile.second == IsQuoted;
- }) != KnownFiles.end()) {
+ if (llvm::any_of(KnownFiles,
+ [&IsQuoted, &IncludeName](const auto &KnownFile) {
+ return KnownFile.first.equals(*IncludeName) &&
+ KnownFile.second == IsQuoted;
+ })) {
KnownFileEntries.insert(File);
return true;
}