]> granicus.if.org Git - clang/commitdiff
Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.
authorTed Kremenek <kremenek@apple.com>
Mon, 4 May 2009 23:52:59 +0000 (23:52 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 4 May 2009 23:52:59 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/AttributeList.h
lib/Parse/AttributeList.cpp
lib/Sema/SemaDeclAttr.cpp
test/Analysis/retain-release-gc-only.m
test/Analysis/retain-release.m

index 24cfcb8d478b20a0f94775007e3bc90f782aa2e0..7693d02ff79ad764991cc43e8edcb386c22185ca 100644 (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,
index 704d98a07e8bca9c4f8363ea61fd6b88d2665394..d989d1de6ef682cf10e8ca95f642d9653cfdb085 100644 (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))
index 2cd9713a42fbffb11c4f47f13878e76a5fe239f0..29a0c6b977d3fd1409eafa5d283a9b578ec86d62 100644 (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;
index b4095837a927da0f392cf26e9929304cdf69467c..8e261399e4aabed67eb221f8100d427ee803df6c 100644 (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;
index 84225c7b09362b3bb9288499c26ab1e81d160a3c..393a99bfaeb9758deda9b2fa884e3402add380c4 100644 (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