aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-06-22 22:08:09 +0000
committerAnna Zaks <ganna@apple.com>2012-06-22 22:08:09 +0000
commit3e4f65d863bff9c4bbb2e7061a5d69b8c0366d66 (patch)
tree36dc3cd686b295f8dc9da2a5c2ca3a36fb95f44f /lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parentdf19fe7cafcb02859efeb6963cddeafef4350ddf (diff)
[analyzer] Fixup to r158958.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 35c6073bca..b0fcb25079 100644
--- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -482,7 +482,7 @@ void MallocChecker::checkPostStmt(const CallExpr *CE, CheckerContext &C) const {
}
static bool isFreeWhenDoneSetToZero(CallOrObjCMessage Call, Selector &S) {
- for (unsigned i = 1; i < Call.getNumArgs(); ++i)
+ for (unsigned i = 1; i < S.getNumArgs(); ++i)
if (S.getNameForSlot(i).equals("freeWhenDone"))
if (Call.getArgSVal(i).isConstant(0))
return true;
@@ -1435,7 +1435,7 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call,
// White list the ObjC functions which do free memory.
// - Anything containing 'freeWhenDone' param set to 1.
// Ex: dataWithBytesNoCopy:length:freeWhenDone.
- for (unsigned i = 1; i < Call->getNumArgs(); ++i) {
+ for (unsigned i = 1; i < S.getNumArgs(); ++i) {
if (S.getNameForSlot(i).equals("freeWhenDone")) {
if (Call->getArgSVal(i).isConstant(1))
return false;