aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-27 18:27:22 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-27 18:27:22 +0000
commit4064de959853503d9b87065adac1b277fff8af20 (patch)
tree462ca0454b2afdedf3b9c994e656912b1191baf5 /lib/Analysis/CFRefCount.cpp
parentf331fb40fd92242980792e1af01ec72b74f3379e (diff)
Add new checker-specific attribute 'objc_ownership_cfretain'. This is the same
as 'objc_ownership_cfretain' except that the method acts like a CFRetain instead of a [... retain] (important in GC modes). Checker support is wired up, but currently only for Objective-C message expressions (not function calls). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index c2369abb2c..6223e7cdba 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1104,7 +1104,11 @@ RetainSummaryManager::getMethodSummaryFromAnnotations(ObjCMethodDecl *MD) {
ScratchArgs.push_back(std::make_pair(i, IncRefMsg));
hasArgEffect = true;
}
-}
+ else if ((*I)->getAttr<ObjCOwnershipCFRetainAttr>()) {
+ ScratchArgs.push_back(std::make_pair(i, IncRef));
+ hasArgEffect = true;
+ }
+ }
if (!hasRetEffect && !hasArgEffect)
return 0;