summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:13:59 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2019-01-10 18:13:59 +0000
commit585a210e5f69d960e6a6e25601d6576fa47cb397 (patch)
tree4876935a6ba8657ed6de7b12239a58d19510017c /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp
parent7e3016dec4abd700e8e0828f1e20c86b0a04510b (diff)
downloadbcm5719-llvm-585a210e5f69d960e6a6e25601d6576fa47cb397.tar.gz
bcm5719-llvm-585a210e5f69d960e6a6e25601d6576fa47cb397.zip
[analyzer] [NFC] Track object type with ArgEffect in RetainCountChecker.
This would be needed in the future. https://reviews.llvm.org/D56040 llvm-svn: 350858
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