Skip to content

Commit 1ca77d6

Browse files
author
git apple-llvm automerger
committed
Merge commit 'fb14c8338a41' from llvm.org/main into next
2 parents 30f548e + fb14c83 commit 1ca77d6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -962,10 +962,8 @@ void RefLeakReport::findBindingToReport(CheckerContext &Ctx,
962962
// `AllocFirstBinding` to be one of them. In situations like this,
963963
// it would still be the easiest case to explain to our users.
964964
if (!AllVarBindings.empty() &&
965-
llvm::count_if(AllVarBindings,
966-
[this](const std::pair<const MemRegion *, SVal> Binding) {
967-
return Binding.first == AllocFirstBinding;
968-
}) == 0) {
965+
!llvm::is_contained(llvm::make_first_range(AllVarBindings),
966+
AllocFirstBinding)) {
969967
// Let's pick one of them at random (if there is something to pick from).
970968
AllocBindingToReport = AllVarBindings[0].first;
971969

0 commit comments

Comments
 (0)