diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-27 18:27:22 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-27 18:27:22 +0000 |
commit | ebbef7d0d3bfc4e881c401b5365aca64e1f3b587 (patch) | |
tree | 333542c6abde3becc128548f9f0d32d8ba92bfd8 /clang/lib/Analysis/CFRefCount.cpp | |
parent | 21b349d5eaf0921426a6ef977d6a3eab52d06c3f (diff) | |
download | bcm5719-llvm-ebbef7d0d3bfc4e881c401b5365aca64e1f3b587.tar.gz bcm5719-llvm-ebbef7d0d3bfc4e881c401b5365aca64e1f3b587.zip |
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).
llvm-svn: 70218
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index c2369abb2cf..6223e7cdba5 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/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; |