]> granicus.if.org Git - clang/commitdiff
Add test case for PR 4596, which is already fixed due to Steve Naroff's overhaul...
authorTed Kremenek <kremenek@apple.com>
Tue, 21 Jul 2009 21:21:04 +0000 (21:21 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 21 Jul 2009 21:21:04 +0000 (21:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76648 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/retain-release.m

index 005c492fc0120b5d09ee56baf060ed1471c0530a..dc3f9905866587fda9a3a01527a69e319ffe9f8f 100644 (file)
@@ -817,11 +817,14 @@ void IOServiceAddMatchingNotification_wrapper(IONotificationPortRef notifyPort,
 
 typedef NSString* MyStringTy;
 
+@protocol FooP;
+
 @interface TestOwnershipAttr : NSObject
 - (NSString*) returnsAnOwnedString  NS_RETURNS_RETAINED; // no-warning
 - (NSString*) returnsAnOwnedCFString  CF_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}}
+- (id<FooP>) returnsOwnedProt NS_RETURNS_RETAINED; // no-warning
 @end
 
 static int ownership_attribute_doesnt_go_here NS_RETURNS_RETAINED; // expected-warning{{'ns_returns_retained' attribute only applies to function or method types}}