[clang-tools-extra] 24f03d9 - [clangd] Use llvm::erase_value (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 19 23:28:31 PDT 2023
Author: Kazu Hirata
Date: 2023-10-19T23:28:25-07:00
New Revision: 24f03d9b19dda40f757341ffa1ea89faa64cfbde
URL: https://github.com/llvm/llvm-project/commit/24f03d9b19dda40f757341ffa1ea89faa64cfbde
DIFF: https://github.com/llvm/llvm-project/commit/24f03d9b19dda40f757341ffa1ea89faa64cfbde.diff
LOG: [clangd] Use llvm::erase_value (NFC)
Added:
Modified:
clang-tools-extra/clangd/SystemIncludeExtractor.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/SystemIncludeExtractor.cpp b/clang-tools-extra/clangd/SystemIncludeExtractor.cpp
index 74bae786425c829..68b80478e1bd969 100644
--- a/clang-tools-extra/clangd/SystemIncludeExtractor.cpp
+++ b/clang-tools-extra/clangd/SystemIncludeExtractor.cpp
@@ -376,8 +376,7 @@ extractSystemIncludesAndTarget(const DriverArgs &InputArgs,
auto Path = llvm::StringRef(*BuiltinHeaders).trim();
if (!Path.empty() && llvm::sys::path::is_absolute(Path)) {
auto Size = Info->SystemIncludes.size();
- llvm::erase_if(Info->SystemIncludes,
- [&](llvm::StringRef Entry) { return Path == Entry; });
+ llvm::erase_value(Info->SystemIncludes, Path);
vlog("System includes extractor: builtin headers {0} {1}", Path,
(Info->SystemIncludes.size() != Size)
? "excluded"
More information about the cfe-commits
mailing list