Skip to content

Commit 1cc9e6e

Browse files
[StaticAnalyzer] Use llvm::count (NFC) (#141370)
1 parent f093d7e commit 1cc9e6e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,7 @@ class ResultMap {
3535

3636
public:
3737
ResultMap(std::initializer_list<std::pair<CallDescription, bool>> Data)
38-
: Found(0),
39-
Total(std::count_if(Data.begin(), Data.end(),
40-
[](const std::pair<CallDescription, bool> &Pair) {
41-
return Pair.second == true;
42-
})),
38+
: Found(0), Total(llvm::count(llvm::make_second_range(Data), true)),
4339
Impl(std::move(Data)) {}
4440

4541
const bool *lookup(const CallEvent &Call) {

0 commit comments

Comments
 (0)