[clang-tools-extra] 55f0a87 - [clangd] Use llvm::any_of (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 14 16:25:52 PDT 2022
Author: Kazu Hirata
Date: 2022-08-14T16:25:38-07:00
New Revision: 55f0a87ea46ee787dbef425200a718db775ef381
URL: https://github.com/llvm/llvm-project/commit/55f0a87ea46ee787dbef425200a718db775ef381
DIFF: https://github.com/llvm/llvm-project/commit/55f0a87ea46ee787dbef425200a718db775ef381.diff
LOG: [clangd] Use llvm::any_of (NFC)
Added:
Modified:
clang-tools-extra/clangd/index/CanonicalIncludes.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
index 145d98d57ca83..b0ae42a96ecf4 100644
--- a/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
+++ b/clang-tools-extra/clangd/index/CanonicalIncludes.cpp
@@ -777,12 +777,11 @@ void CanonicalIncludes::addSystemHeadersMapping(const LangOptions &Language) {
llvm::sys::path::end(Path)) <= MaxSuffixComponents;
}));
// ... and precise.
- assert(llvm::find_if(SystemHeaderMap->keys(), [](llvm::StringRef Path) {
- return std::distance(llvm::sys::path::begin(
- Path, llvm::sys::path::Style::posix),
- llvm::sys::path::end(Path)) ==
- MaxSuffixComponents;
- }) != SystemHeaderMap->keys().end());
+ assert(llvm::any_of(SystemHeaderMap->keys(), [](llvm::StringRef Path) {
+ return std::distance(
+ llvm::sys::path::begin(Path, llvm::sys::path::Style::posix),
+ llvm::sys::path::end(Path)) == MaxSuffixComponents;
+ }));
// FIXME: Suffix mapping contains invalid entries for C, so only enable it for
// CPP.
More information about the cfe-commits
mailing list