diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-05 00:46:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-05 00:46:09 +0000 |
commit | e351aa10dab6eb8b9b502166c7035dc7b0e723e0 (patch) | |
tree | 3d7ef14bcfb75260c8cee6b58b272d062c986897 /lib/Analysis/CFRefCount.cpp | |
parent | a81419d0b53a40399a589a2fcc13f1ed2ec28f75 (diff) |
Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 976bfad188..07dbf10c40 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -1128,6 +1128,9 @@ RetainSummaryManager::updateSummaryFromAnnotations(RetainSummary &Summ, ? RetEffect::MakeGCNotOwned() : RetEffect::MakeOwned(RetEffect::ObjC, true)); } + else if (FD->getAttr<CFOwnershipReturnsAttr>()) { + Summ.setRetEffect(RetEffect::MakeOwned(RetEffect::CF, true)); + } } // Determine if there are any arguments with a specific ArgEffect. @@ -1150,6 +1153,9 @@ RetainSummaryManager::updateSummaryFromAnnotations(RetainSummary &Summ, ? RetEffect::MakeGCNotOwned() : RetEffect::MakeOwned(RetEffect::ObjC, true)); } + else if (MD->getAttr<CFOwnershipReturnsAttr>()) { + Summ.setRetEffect(RetEffect::MakeOwned(RetEffect::CF, true)); + } } // Determine if there are any arguments with a specific ArgEffect. |