[cfe-commits] r70941 - in /cfe/trunk: 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
Ted Kremenek
kremenek at apple.com
Mon May 4 16:52:59 PDT 2009
Author: kremenek
Date: Mon May 4 18:52:59 2009
New Revision: 70941
URL: http://llvm.org/viewvc/llvm-project?rev=70941&view=rev
Log:
Rename attribute 'ns_ownership_returns' to 'ns_returns_ownership'.
Modified:
cfe/trunk/include/clang/Parse/AttributeList.h
cfe/trunk/lib/Parse/AttributeList.cpp
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/test/Analysis/retain-release-gc-only.m
cfe/trunk/test/Analysis/retain-release.m
Modified: cfe/trunk/include/clang/Parse/AttributeList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/AttributeList.h?rev=70941&r1=70940&r2=70941&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/AttributeList.h (original)
+++ cfe/trunk/include/clang/Parse/AttributeList.h Mon May 4 18:52:59 2009
@@ -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,
Modified: cfe/trunk/lib/Parse/AttributeList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/AttributeList.cpp?rev=70941&r1=70940&r2=70941&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/AttributeList.cpp (original)
+++ cfe/trunk/lib/Parse/AttributeList.cpp Mon May 4 18:52:59 2009
@@ -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))
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=70941&r1=70940&r2=70941&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Mon May 4 18:52:59 2009
@@ -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;
Modified: cfe/trunk/test/Analysis/retain-release-gc-only.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release-gc-only.m?rev=70941&r1=70940&r2=70941&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release-gc-only.m (original)
+++ cfe/trunk/test/Analysis/retain-release-gc-only.m Mon May 4 18:52:59 2009
@@ -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;
Modified: cfe/trunk/test/Analysis/retain-release.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.m?rev=70941&r1=70940&r2=70941&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Mon May 4 18:52:59 2009
@@ -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
More information about the cfe-commits
mailing list