summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-18 00:05:45 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-18 00:05:45 +0000
commitd9c6663124da6d3df18d7482ce48f6b52df13175 (patch)
tree236562696ed7ae69c2b4885b6e77b9aeba85adc5 /clang/lib/Sema/SemaDeclAttr.cpp
parente164b5c2e7abf724fa379933ea727cd858b9adf6 (diff)
downloadbcm5719-llvm-d9c6663124da6d3df18d7482ce48f6b52df13175.tar.gz
bcm5719-llvm-d9c6663124da6d3df18d7482ce48f6b52df13175.zip
Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These are not yet hooked up to the static analyzer. llvm-svn: 96535
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index e0943274dac..bb47ae7ea80 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -1711,6 +1711,12 @@ static void HandleNSReturnsRetainedAttr(Decl *d, const AttributeList &Attr,
default:
assert(0 && "invalid ownership attribute");
return;
+ case AttributeList::AT_cf_returns_not_retained:
+ d->addAttr(::new (S.Context) CFReturnsNotRetainedAttr());
+ return;
+ case AttributeList::AT_ns_returns_not_retained:
+ d->addAttr(::new (S.Context) NSReturnsNotRetainedAttr());
+ return;
case AttributeList::AT_cf_returns_retained:
d->addAttr(::new (S.Context) CFReturnsRetainedAttr());
return;
@@ -1776,6 +1782,8 @@ static void ProcessDeclAttribute(Scope *scope, Decl *D,
case AttributeList::AT_override: HandleOverrideAttr (D, Attr, S); break;
// Checker-specific.
+ case AttributeList::AT_ns_returns_not_retained:
+ case AttributeList::AT_cf_returns_not_retained:
case AttributeList::AT_ns_returns_retained:
case AttributeList::AT_cf_returns_retained:
HandleNSReturnsRetainedAttr(D, Attr, S); break;
OpenPOWER on IntegriCloud