aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-30 02:19:19 +0000
committerAnna Zaks <ganna@apple.com>2011-09-30 02:19:19 +0000
commit0658879cc98e8cb918e2f349a59c901f74f0de11 (patch)
tree8f8636b03f54bf981cccf795db461cfed5c7c2f6 /lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
parentd30952838421ddfb9f7e346b2ba8213889a5f789 (diff)
[analyzer] Fix a bug in RetainReleaseChecker diagnostics. It gives more precise error message on the modified test case (and prevents duplicate diagnostics when we purge at block granularity).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140840 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index 7791d9d711..695cc037e8 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -3436,7 +3436,7 @@ void RetainCountChecker::checkEndPath(EndOfFunctionNodeBuilder &Builder,
const ProgramState *state = Builder.getState();
GenericNodeBuilderRefCount Bd(Builder);
RefBindings B = state->get<RefBindings>();
- ExplodedNode *Pred = 0;
+ ExplodedNode *Pred = Builder.getPredecessor();
for (RefBindings::iterator I = B.begin(), E = B.end(); I != E; ++I) {
llvm::tie(Pred, state) = handleAutoreleaseCounts(state, Bd, Pred, Eng,