commit | 0217b1d045ea99fe792e83ed1a785816289dd53c | [log] [tgz] |
---|---|---|
author | Anna Zaks <ganna@apple.com> | Thu Jan 31 22:36:17 2013 +0000 |
committer | Anna Zaks <ganna@apple.com> | Thu Jan 31 22:36:17 2013 +0000 |
tree | 7be265466d82a1426d13b4c75f6762926a4a0993 | |
parent | e36d81b1eeab13fb1bbd15291d009a1699de6ec1 [diff] [blame] |
[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
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index e731e03..533d0b8 100644 --- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -3487,7 +3487,7 @@ else V = V ^ RefVal::NotOwned; } else { - V.setCount(Cnt - ACnt); + V.setCount(V.getCount() - ACnt); V.setAutoreleaseCount(0); } return setRefBinding(state, Sym, V);