[clang] 3d97d71 - [Lex] Use llvm::make_second_range (NFC) (#135902)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 00:33:32 PDT 2025
Author: Kazu Hirata
Date: 2025-04-16T00:33:29-07:00
New Revision: 3d97d71e66036f51cf0b45cc7d5f3a0a14192eb4
URL: https://github.com/llvm/llvm-project/commit/3d97d71e66036f51cf0b45cc7d5f3a0a14192eb4
DIFF: https://github.com/llvm/llvm-project/commit/3d97d71e66036f51cf0b45cc7d5f3a0a14192eb4.diff
LOG: [Lex] Use llvm::make_second_range (NFC) (#135902)
Added:
Modified:
clang/lib/Lex/HeaderSearch.cpp
Removed:
################################################################################
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