Add test case for PR 4596, which is already fixed due to Steve Naroff's overhaul of the Objective-C type system, but isn't in a checker build yet.
llvm-svn: 76648
This commit is contained in:
parent
6dec002981
commit
f0951f6d41
|
@ -817,11 +817,14 @@ void IOServiceAddMatchingNotification_wrapper(IONotificationPortRef notifyPort,
|
||||||
|
|
||||||
typedef NSString* MyStringTy;
|
typedef NSString* MyStringTy;
|
||||||
|
|
||||||
|
@protocol FooP;
|
||||||
|
|
||||||
@interface TestOwnershipAttr : NSObject
|
@interface TestOwnershipAttr : NSObject
|
||||||
- (NSString*) returnsAnOwnedString NS_RETURNS_RETAINED; // no-warning
|
- (NSString*) returnsAnOwnedString NS_RETURNS_RETAINED; // no-warning
|
||||||
- (NSString*) returnsAnOwnedCFString CF_RETURNS_RETAINED; // no-warning
|
- (NSString*) returnsAnOwnedCFString CF_RETURNS_RETAINED; // no-warning
|
||||||
- (MyStringTy) returnsAnOwnedTypedString NS_RETURNS_RETAINED; // no-warning
|
- (MyStringTy) returnsAnOwnedTypedString NS_RETURNS_RETAINED; // no-warning
|
||||||
- (int) returnsAnOwnedInt NS_RETURNS_RETAINED; // expected-warning{{'ns_returns_retained' attribute only applies to functions or methods that return a pointer or Objective-C object}}
|
- (int) returnsAnOwnedInt NS_RETURNS_RETAINED; // expected-warning{{'ns_returns_retained' attribute only applies to functions or methods that return a pointer or Objective-C object}}
|
||||||
|
- (id<FooP>) returnsOwnedProt NS_RETURNS_RETAINED; // no-warning
|
||||||
@end
|
@end
|
||||||
|
|
||||||
static int ownership_attribute_doesnt_go_here NS_RETURNS_RETAINED; // expected-warning{{'ns_returns_retained' attribute only applies to function or method types}}
|
static int ownership_attribute_doesnt_go_here NS_RETURNS_RETAINED; // expected-warning{{'ns_returns_retained' attribute only applies to function or method types}}
|
||||||
|
|
Loading…
Reference in New Issue