[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / clang / test / ARCMT / objcmt-designated-initializer.m.result
blob4c59b0cc582616ace916e69fe31b31d25d678159
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
6 #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
8 @class NSString;
10 @interface B1
11 -(id)init;
12 @end
14 @interface S1 : B1
15 -(id)initWithFoo:(NSString*)foo NS_DESIGNATED_INITIALIZER;
16 @end
18 @implementation S1
19 -(id)initWithFoo:(NSString*)foo
21   self = [super init];
22   if (self) {
23   }
24   return self;
26 @end
28 @interface B2
29 -(id)init NS_DESIGNATED_INITIALIZER;
30 @end
32 @interface S2 : B2
33 -(id)init;
34 @end
36 @implementation S2
37 -(id)init
39   self = [super init];
40   if (self) {
41   }
42   return self;
44 @end