blob: 52daed619e82110faad30a7d67d46ef890cd782d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -arch x86_64 %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
|