aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-05-25 06:29:39 +0000
committerTed Kremenek <kremenek@apple.com>2011-05-25 06:29:39 +0000
commitd1e015eb441910937c74d489970322a3a3491a67 (patch)
tree64e8565ba74a905385aa608fd26207f2cd2d6e2b /lib/StaticAnalyzer/Core/CFRefCount.cpp
parentd368d71169cd87ef8ff95388be80a044fa35112f (diff)
Teach analyzer about cf_returns_not_retained for C functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/CFRefCount.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp
index 8478de5908..59fea1031f 100644
--- a/lib/StaticAnalyzer/Core/CFRefCount.cpp
+++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp
@@ -1236,6 +1236,9 @@ RetainSummaryManager::updateSummaryFromAnnotations(RetainSummary &Summ,
if (FD->getAttr<CFReturnsRetainedAttr>()) {
Summ.setRetEffect(RetEffect::MakeOwned(RetEffect::CF, true));
}
+ else if (FD->getAttr<CFReturnsNotRetainedAttr>()) {
+ Summ.setRetEffect(RetEffect::MakeNotOwned(RetEffect::CF));
+ }
}
}