summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
index 44cb7553c0d..5a687ef8d17 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
@@ -48,7 +48,9 @@ static bool shouldGenerateNote(llvm::raw_string_ostream &os,
RefVal PrevV = *PrevT;
// Specially handle -dealloc.
- if (std::find(AEffects.begin(), AEffects.end(), Dealloc) != AEffects.end()) {
+ if (std::find_if(AEffects.begin(), AEffects.end(), [](ArgEffect &E) {
+ return E.getKind() == Dealloc;
+ }) != AEffects.end()) {
// Determine if the object's reference count was pushed to zero.
assert(!PrevV.hasSameState(CurrV) && "The state should have changed.");
// We may not have transitioned to 'release' if we hit an error.
OpenPOWER on IntegriCloud