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 | 94c464ef2273e6a050e874ce154347acd6e420c3 (patch) | |
tree | 8685e06a8226dd70071e507463038617840bd118 /clang/lib/Analysis/CFRefCount.cpp | |
parent | 3f86b9cb069136c17baa65f63b285b3df4f5f228 (diff) | |
download | bcm5719-llvm-94c464ef2273e6a050e874ce154347acd6e420c3.tar.gz bcm5719-llvm-94c464ef2273e6a050e874ce154347acd6e420c3.zip |
Implement attribute 'cf_returns_owned' (mirrors 'ns_returns_owned').
llvm-svn: 70952
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 976bfad188d..07dbf10c408 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/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. |