aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-01-31 22:36:17 +0000
committerAnna Zaks <ganna@apple.com>2013-01-31 22:36:17 +0000
commit0217b1d045ea99fe792e83ed1a785816289dd53c (patch)
tree7be265466d82a1426d13b4c75f6762926a4a0993 /lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
parente36d81b1eeab13fb1bbd15291d009a1699de6ec1 (diff)
[analyzer]RetainCount: Fix an autorelease related false positive.
The Cnt variable is adjusted (incremented) for simplification of checking logic. The increment should not be stored in the state. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174104 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 e731e034d8..533d0b8420 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -3487,7 +3487,7 @@ RetainCountChecker::handleAutoreleaseCounts(ProgramStateRef state,
else
V = V ^ RefVal::NotOwned;
} else {
- V.setCount(Cnt - ACnt);
+ V.setCount(V.getCount() - ACnt);
V.setAutoreleaseCount(0);
}
return setRefBinding(state, Sym, V);