blob: a9977339e511926d39c262857f3d6a8774eac082 [file] [log] [blame]
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
#include "Common.h"
@interface Foo : NSObject <NSCopying, NSMutableCopying> {
id bar;
}
@property (retain) id bar;
-(id)test:(NSZone *)z;
@end
@implementation Foo
@synthesize bar;
+(id)class_test:(NSZone *)z {
return [self alloc];
}
-(id)test:(NSZone *)z {
Foo *foo1 = [[Foo alloc] init];
Foo *foo2 = [[Foo alloc] init];
Foo *foo3 = [[Foo alloc] init];
Foo *foo4 = [[Foo alloc] init];
Foo *foo5 = [[Foo alloc] init];
Foo *foo6 = [[Foo alloc] init];
foo1 = [foo1 copy];
foo2 = [foo1 copy];
foo3 = [foo1 copy];
foo1 = [foo1 mutableCopy];
return foo1;
}
@end