Skip to content

Commit 23c2f88

Browse files
[Format] Use llvm::count_if (NFC) (#141518)
1 parent 714096c commit 23c2f88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/Format/MacroCallReconstructor.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,8 @@ MacroCallReconstructor::createUnwrappedLine(const ReconstructedLine &Line,
511511
for (const auto &N : Line.Tokens) {
512512
Result.Tokens.push_back(N->Tok);
513513
UnwrappedLineNode &Current = Result.Tokens.back();
514-
auto NumChildren =
515-
std::count_if(N->Children.begin(), N->Children.end(),
516-
[](const auto &Child) { return !Child->Tokens.empty(); });
514+
auto NumChildren = llvm::count_if(
515+
N->Children, [](const auto &Child) { return !Child->Tokens.empty(); });
517516
if (NumChildren == 1 && Current.Tok->isOneOf(tok::l_paren, tok::comma)) {
518517
// If we only have one child, and the child is due to a macro expansion
519518
// (either attached to a left parenthesis or comma), merge the child into

0 commit comments

Comments
 (0)