Home | History | Annotate | Download | only in ARCMT
      1 // RUN: rm -rf %t
      2 // RUN: %clang_cc1 -objcmt-migrate-designated-init %s -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t.remap
      3 // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
      4 // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -x objective-c -fobjc-arc %s.result
      5 
      6 #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
      7 
      8 @class NSString;
      9 
     10 @interface B1
     11 -(id)init;
     12 @end
     13 
     14 @interface S1 : B1
     15 -(id)initWithFoo:(NSString*)foo;
     16 @end
     17 
     18 @implementation S1
     19 -(id)initWithFoo:(NSString*)foo
     20 {
     21   self = [super init];
     22   if (self) {
     23   }
     24   return self;
     25 }
     26 @end
     27 
     28 @interface B2
     29 -(id)init NS_DESIGNATED_INITIALIZER;
     30 @end
     31 
     32 @interface S2 : B2
     33 -(id)init;
     34 @end
     35 
     36 @implementation S2
     37 -(id)init
     38 {
     39   self = [super init];
     40   if (self) {
     41   }
     42   return self;
     43 }
     44 @end
     45