Skip to content

Commit e266d6a

Browse files
[Format] Use llvm::min_element (NFC) (#143725)
llvm::min_elements allows us to pass a range.
1 parent ebc90d5 commit e266d6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/lib/Format/MacroCallReconstructor.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,10 +528,10 @@ MacroCallReconstructor::createUnwrappedLine(const ReconstructedLine &Line,
528528
// 1. One level below the current line's level.
529529
// 2. At the correct level relative to each other.
530530
unsigned MinChildLevel =
531-
std::min_element(N->Children.begin(), N->Children.end(),
532-
[](const auto &E1, const auto &E2) {
533-
return E1->Level < E2->Level;
534-
})
531+
llvm::min_element(N->Children,
532+
[](const auto &E1, const auto &E2) {
533+
return E1->Level < E2->Level;
534+
})
535535
->get()
536536
->Level;
537537
for (const auto &Child : N->Children) {

0 commit comments

Comments
 (0)