diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-27 19:36:56 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-27 19:36:56 +0000 |
commit | c6a59e4bf225c7f8152faca72897321f0f6cabd1 (patch) | |
tree | 743e88ed65481afd096241a4f5a4371b4f8abe02 /lib/Analysis/CFRefCount.cpp | |
parent | e798e7c5a107ff5262005431817409a855a67922 (diff) |
Add two new checker-specific attributes: 'objc_ownership_release' and
'objc_ownership_cfrelease'. These are the 'release' equivalents of
'objc_ownership_retain' and 'objc_ownership_cfretain' respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 8f07b2c9f4..538f4f2722 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -1112,7 +1112,15 @@ RetainSummaryManager::getMethodSummaryFromAnnotations(ObjCMethodDecl *MD) { else if ((*I)->getAttr<ObjCOwnershipCFRetainAttr>()) { ScratchArgs.push_back(std::make_pair(i, IncRef)); hasArgEffect = true; - } + } + else if ((*I)->getAttr<ObjCOwnershipReleaseAttr>()) { + ScratchArgs.push_back(std::make_pair(i, DecRefMsg)); + hasArgEffect = true; + } + else if ((*I)->getAttr<ObjCOwnershipCFReleaseAttr>()) { + ScratchArgs.push_back(std::make_pair(i, DecRef)); + hasArgEffect = true; + } } if (!hasRetEffect && !hasArgEffect) |