Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.

llvm-svn: 70941
This commit is contained in:
Ted Kremenek 2009-05-04 23:52:59 +00:00
parent 6bdfcf47ad
commit bbec22d2b2
5 changed files with 8 additions and 8 deletions

View File

@ -80,7 +80,7 @@ public:
AT_cf_ownership_retain, // Clang-specific.
AT_ns_ownership_release, // Clang-specific.
AT_ns_ownership_retain, // Clang-specific.
AT_ns_ownership_returns, // Clang-specific.
AT_ns_returns_ownership, // Clang-specific.
AT_objc_gc,
AT_overloadable, // Clang-specific.
AT_packed,

View File

@ -144,8 +144,8 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
return AT_cf_ownership_release;
if (!memcmp(Str, "ns_ownership_release", 20))
return AT_ns_ownership_release;
if (!memcmp(Str, "ns_ownership_returns", 20))
return AT_ns_ownership_returns;
if (!memcmp(Str, "ns_returns_ownership", 20))
return AT_ns_returns_ownership;
break;
case 22:
if (!memcmp(Str, "no_instrument_function", 22))

View File

@ -1552,7 +1552,7 @@ static void HandleNSOwnershipReturnsAttr(Decl *d, const AttributeList &Attr,
if (!isa<ObjCMethodDecl>(d) && !isa<FunctionDecl>(d)) {
S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type) <<
"ns_ownership_returns" << 3 /* function or method */;
"ns_returns_ownership" << 3 /* function or method */;
return;
}
@ -1644,7 +1644,7 @@ static void ProcessDeclAttribute(Decl *D, const AttributeList &Attr, Sema &S) {
case AttributeList::AT_ns_ownership_release:
case AttributeList::AT_ns_ownership_retain:
HandleNSOwnershipAttr(D, Attr, S, true); break;
case AttributeList::AT_ns_ownership_returns:
case AttributeList::AT_ns_returns_ownership:
HandleNSOwnershipReturnsAttr(D, Attr, S); break;
case AttributeList::AT_packed: HandlePackedAttr (D, Attr, S); break;

View File

@ -129,7 +129,7 @@ void f3() {
//===----------------------------------------------------------------------===//
@interface TestOwnershipAttr : NSObject
- (NSString*) returnsAnOwnedString __attribute__((ns_ownership_returns));
- (NSString*) returnsAnOwnedString __attribute__((ns_returns_ownership));
- (void) myRetain:(id)__attribute__((ns_ownership_retain))obj;
- (void) myCFRetain:(id)__attribute__((cf_ownership_retain))obj;
- (void) myRelease:(id)__attribute__((ns_ownership_release))obj;

View File

@ -431,7 +431,7 @@ void rdar6704930(unsigned char *s, unsigned int length) {
//===----------------------------------------------------------------------===//
@interface TestOwnershipAttr : NSObject
- (NSString*) returnsAnOwnedString __attribute__((ns_ownership_returns));
- (NSString*) returnsAnOwnedString __attribute__((ns_returns_ownership));
- (void) myRetain:(id)__attribute__((ns_ownership_retain))obj;
- (void) myCFRetain:(id)__attribute__((cf_ownership_retain))obj;
- (void) myRelease:(id)__attribute__((ns_ownership_release))obj;
@ -443,7 +443,7 @@ void rdar6704930(unsigned char *s, unsigned int length) {
@interface TestAttrHelper : NSObject
- (NSString*) createString:(TestOwnershipAttr*)X;
- (NSString*) createStringAttr:(TestOwnershipAttr*)X __attribute__((ns_ownership_returns));
- (NSString*) createStringAttr:(TestOwnershipAttr*)X __attribute__((ns_returns_ownership));
@end
@implementation TestAttrHelper