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