https://github.com/kazutakahirata created 
https://github.com/llvm/llvm-project/pull/143725

llvm::min_elements allows us to pass a range.


>From d2683d8bd12296ac559e8068521700b096e84da2 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <k...@google.com>
Date: Tue, 10 Jun 2025 11:49:54 -0700
Subject: [PATCH] [Format] Use llvm::min_element (NFC)

llvm::min_elements allows us to pass a range.
---
 clang/lib/Format/MacroCallReconstructor.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clang/lib/Format/MacroCallReconstructor.cpp 
b/clang/lib/Format/MacroCallReconstructor.cpp
index 116bbad320e1f..895d9f93dfce3 100644
--- a/clang/lib/Format/MacroCallReconstructor.cpp
+++ b/clang/lib/Format/MacroCallReconstructor.cpp
@@ -528,10 +528,10 @@ MacroCallReconstructor::createUnwrappedLine(const 
ReconstructedLine &Line,
       // 1. One level below the current line's level.
       // 2. At the correct level relative to each other.
       unsigned MinChildLevel =
-          std::min_element(N->Children.begin(), N->Children.end(),
-                           [](const auto &E1, const auto &E2) {
-                             return E1->Level < E2->Level;
-                           })
+          llvm::min_element(N->Children,
+                            [](const auto &E1, const auto &E2) {
+                              return E1->Level < E2->Level;
+                            })
               ->get()
               ->Level;
       for (const auto &Child : N->Children) {

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to