| John McCall | d70fb98 | 2011-06-15 23:25:17 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fsyntax-only -fobjc-arc -x objective-c %s.result |
| 2 | // RUN: arcmt-test --args -arch x86_64 %s > %t | ||||
| 3 | // RUN: diff %t %s.result | ||||
| 4 | |||||
| 5 | @interface NSObject | ||||
| 6 | -init; | ||||
| 7 | @end | ||||
| 8 | |||||
| 9 | @interface A : NSObject | ||||
| 10 | -init; | ||||
| 11 | -init2; | ||||
| 12 | -foo; | ||||
| 13 | +alloc; | ||||
| 14 | @end | ||||
| 15 | |||||
| 16 | @implementation A | ||||
| 17 | -(id) init { | ||||
| 18 | self = [self init]; | ||||
| 19 | id a; | ||||
| 20 | [a init]; | ||||
| 21 | a = [[A alloc] init]; | ||||
| 22 | |||||
| 23 | return self; | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | -(id) init2 { | ||||
| 27 | self = [super init]; | ||||
| 28 | return self; | ||||
| 29 | } | ||||
| 30 | |||||
| 31 | -(id) foo { | ||||
| 32 | [self init]; | ||||
| 33 | [super init]; | ||||
| 34 | |||||
| 35 | return self; | ||||
| 36 | } | ||||
| 37 | @end | ||||