[clang] [Analysis] Use llvm::erase_if (NFC) (PR #141446)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sun May 25 19:14:05 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141446
None
>From 5042f47e7c990892c13e4de21ae7a4ff1baec308 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 25 May 2025 10:35:44 -0700
Subject: [PATCH] [Analysis] Use llvm::erase_if (NFC)
---
clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
index 720999207083d..4e97174c17d95 100644
--- a/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
+++ b/clang/unittests/Analysis/ExprMutationAnalyzerTest.cpp
@@ -86,9 +86,7 @@ mutatedBy(const SmallVectorImpl<BoundNodes> &Results, ASTUnit *AST) {
}
std::string removeSpace(std::string s) {
- s.erase(std::remove_if(s.begin(), s.end(),
- [](char c) { return llvm::isSpace(c); }),
- s.end());
+ llvm::erase_if(s, llvm::isSpace);
return s;
}
More information about the cfe-commits
mailing list