Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70941 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Parse/AttributeList.h
index 24cfcb8..7693d02 100644
--- a/include/clang/Parse/AttributeList.h
+++ b/include/clang/Parse/AttributeList.h
@@ -80,7 +80,7 @@
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,
diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp
index 704d98a..d989d1d 100644
--- a/lib/Parse/AttributeList.cpp
+++ b/lib/Parse/AttributeList.cpp
@@ -144,8 +144,8 @@
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))
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 2cd9713..29a0c6b 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1552,7 +1552,7 @@
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 @@
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;
diff --git a/test/Analysis/retain-release-gc-only.m b/test/Analysis/retain-release-gc-only.m
index b409583..8e26139 100644
--- a/test/Analysis/retain-release-gc-only.m
+++ b/test/Analysis/retain-release-gc-only.m
@@ -129,7 +129,7 @@
//===----------------------------------------------------------------------===//
@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;
diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m
index 84225c7..393a99b 100644
--- a/test/Analysis/retain-release.m
+++ b/test/Analysis/retain-release.m
@@ -431,7 +431,7 @@
//===----------------------------------------------------------------------===//
@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 @@
@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