[cfe-commits] r76648 - /cfe/trunk/test/Analysis/retain-release.m

Ted Kremenek kremenek at apple.com
Tue Jul 21 14:21:04 PDT 2009


Author: kremenek
Date: Tue Jul 21 16:21:04 2009
New Revision: 76648

URL: http://llvm.org/viewvc/llvm-project?rev=76648&view=rev
Log:
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.

Modified:
    cfe/trunk/test/Analysis/retain-release.m

Modified: cfe/trunk/test/Analysis/retain-release.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/retain-release.m?rev=76648&r1=76647&r2=76648&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/retain-release.m (original)
+++ cfe/trunk/test/Analysis/retain-release.m Tue Jul 21 16:21:04 2009
@@ -817,11 +817,14 @@
 
 typedef NSString* MyStringTy;
 
+ at 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}}





More information about the cfe-commits mailing list