aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-05-26 19:43:28 -0700
committerGitHub <noreply@github.com>2025-05-26 19:43:28 -0700
commit23c2f8827b13ef8c72f09f931a70e088c35ccc77 (patch)
treeb3298c08055c7bba9098f6a4fbd40b867401e6dd /clang/lib/Format
parent714096c132662715d05af9a892b4d9552673a644 (diff)
downloadllvm-23c2f8827b13ef8c72f09f931a70e088c35ccc77.zip
llvm-23c2f8827b13ef8c72f09f931a70e088c35ccc77.tar.gz
llvm-23c2f8827b13ef8c72f09f931a70e088c35ccc77.tar.bz2
[Format] Use llvm::count_if (NFC) (#141518)
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/MacroCallReconstructor.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Format/MacroCallReconstructor.cpp b/clang/lib/Format/MacroCallReconstructor.cpp
index c9b618c..116bbad 100644
--- a/clang/lib/Format/MacroCallReconstructor.cpp
+++ b/clang/lib/Format/MacroCallReconstructor.cpp
@@ -511,9 +511,8 @@ MacroCallReconstructor::createUnwrappedLine(const ReconstructedLine &Line,
for (const auto &N : Line.Tokens) {
Result.Tokens.push_back(N->Tok);
UnwrappedLineNode &Current = Result.Tokens.back();
- auto NumChildren =
- std::count_if(N->Children.begin(), N->Children.end(),
- [](const auto &Child) { return !Child->Tokens.empty(); });
+ auto NumChildren = llvm::count_if(
+ N->Children, [](const auto &Child) { return !Child->Tokens.empty(); });
if (NumChildren == 1 && Current.Tok->isOneOf(tok::l_paren, tok::comma)) {
// If we only have one child, and the child is due to a macro expansion
// (either attached to a left parenthesis or comma), merge the child into