mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 21:55:39 +08:00
[StaticAnalyzer] Use llvm::is_contained (NFC) (#141371)
This commit is contained in:
@@ -962,10 +962,8 @@ void RefLeakReport::findBindingToReport(CheckerContext &Ctx,
|
||||
// `AllocFirstBinding` to be one of them. In situations like this,
|
||||
// it would still be the easiest case to explain to our users.
|
||||
if (!AllVarBindings.empty() &&
|
||||
llvm::count_if(AllVarBindings,
|
||||
[this](const std::pair<const MemRegion *, SVal> Binding) {
|
||||
return Binding.first == AllocFirstBinding;
|
||||
}) == 0) {
|
||||
!llvm::is_contained(llvm::make_first_range(AllVarBindings),
|
||||
AllocFirstBinding)) {
|
||||
// Let's pick one of them at random (if there is something to pick from).
|
||||
AllocBindingToReport = AllVarBindings[0].first;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user