1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result 2// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t 3// RUN: diff %t %s.result 4 5#define nil (void *)0 6 7@interface NSObject 8-init; 9@end 10 11@interface A : NSObject 12-init; 13-init2; 14-foo; 15+alloc; 16@end 17 18@implementation A 19-(id) init { 20 if (!(self = [self init])) return nil; 21 id a; 22 [a init]; 23 a = [[A alloc] init]; 24 25 return self; 26} 27 28-(id) init2 { 29 if (!(self = [super init])) return nil; 30 return self; 31} 32 33-(id) foo { 34 [self init]; 35 [super init]; 36 37 return self; 38} 39@end 40