[clang] [Lex] Use llvm::make_second_range (NFC) (PR #135902)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 15 23:30:41 PDT 2025
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/135902
>From 48a5e79784e0cc9a4084878712d36864bcd17cde Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 15 Apr 2025 09:40:23 -0700
Subject: [PATCH] [Lex] Use llvm::make_second_range (NFC)
---
clang/lib/Lex/HeaderSearch.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 9283a0f4fce55..2665580e5afce 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -1932,8 +1932,7 @@ void HeaderSearch::collectAllModules(SmallVectorImpl<Module *> &Modules) {
}
// Populate the list of modules.
- llvm::transform(ModMap.modules(), std::back_inserter(Modules),
- [](const auto &NameAndMod) { return NameAndMod.second; });
+ llvm::append_range(Modules, llvm::make_second_range(ModMap.modules()));
}
void HeaderSearch::loadTopLevelSystemModules() {
More information about the cfe-commits
mailing list