summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/AttributeList.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-24 23:09:54 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-24 23:09:54 +0000
commit44e662cd4f911efaf2f645252ec1fe8577b3f52c (patch)
tree7d724e251e7129f5a61c7c301dcb94926e0c6896 /clang/lib/Parse/AttributeList.cpp
parentdefc644e065dd3d9adde7df7fdb658e271a37764 (diff)
downloadbcm5719-llvm-44e662cd4f911efaf2f645252ec1fe8577b3f52c.tar.gz
bcm5719-llvm-44e662cd4f911efaf2f645252ec1fe8577b3f52c.zip
Add new checker-specific attribute 'objc_ownership_returns'. This isn't hooked
up to the checker yet, but essentially it allows a user to specify that an Objective-C method or C function returns an owned an Objective-C object. llvm-svn: 70001
Diffstat (limited to 'clang/lib/Parse/AttributeList.cpp')
-rw-r--r--clang/lib/Parse/AttributeList.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Parse/AttributeList.cpp b/clang/lib/Parse/AttributeList.cpp
index 5797a154080..33715899c5c 100644
--- a/clang/lib/Parse/AttributeList.cpp
+++ b/clang/lib/Parse/AttributeList.cpp
@@ -133,6 +133,10 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
case 18:
if (!memcmp(Str, "warn_unused_result", 18)) return AT_warn_unused_result;
break;
+ case 22:
+ if (!memcmp(Str, "objc_ownership_returns", 22))
+ return AT_objc_ownership_returns;
+ break;
}
return UnknownAttribute;
}
OpenPOWER on IntegriCloud