| 1 | @import redecl_merge_top; |
| 2 | |
| 3 | @interface Super |
| 4 | @end |
| 5 | |
| 6 | @interface A : Super |
| 7 | - (Super*)init; |
| 8 | @end |
| 9 | |
| 10 | @class B; |
| 11 | |
| 12 | @protocol P1 |
| 13 | - (void)protoMethod1; |
| 14 | @end |
| 15 | |
| 16 | @protocol P1; |
| 17 | |
| 18 | @protocol P2; |
| 19 | |
| 20 | @protocol P2; |
| 21 | |
| 22 | @protocol P2; |
| 23 | |
| 24 | struct S1; |
| 25 | struct S2; |
| 26 | |
| 27 | void consume_S1(struct S1*); |
| 28 | struct S2 *produce_S2(void); |
| 29 | |
| 30 | // Test declarations in different modules with no common initial |
| 31 | // declaration. |
| 32 | @class C; |
| 33 | C *get_a_C(void); |
| 34 | @class C2; |
| 35 | C2 *get_a_C2(void); |
| 36 | @class C3; |
| 37 | C3 *get_a_C3(void); |
| 38 | |
| 39 | @class C4; |
| 40 | @class C4; |
| 41 | @class C4; |
| 42 | @class C4; |
| 43 | C4 *get_a_C4(void); |
| 44 | |
| 45 | @class Explicit; |
| 46 | |
| 47 | int *explicit_func(void); |
| 48 | |
| 49 | struct explicit_struct; |
| 50 | |
| 51 | @protocol P4, P3; |
| 52 | @protocol P3; |
| 53 | @protocol P3; |
| 54 | @protocol P3; |
| 55 | |
| 56 | struct S3; |
| 57 | struct S4; |
| 58 | |
| 59 | void consume_S3(struct S3*); |
| 60 | struct S4 *produce_S4(void); |
| 61 | |
| 62 | typedef int T1; |
| 63 | typedef double T2; |
| 64 | |
| 65 | int func0(int); |
| 66 | int func1(int); |
| 67 | int func1(int); |
| 68 | int func1(int x) { return x; } |
| 69 | int func1(int); |
| 70 | static int func2(int); |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | // Spacing matters! |
| 76 | extern int var1; |
| 77 | extern int var2; |
| 78 | |
| 79 | static double var3; |
| 80 | |
| 81 | int ONE; |
| 82 | @import redecl_merge_top.Explicit; |
| 83 | const int one = ONE; |
| 84 | |
| 85 | @interface ClassWithDef |
| 86 | - (void)method; |
| 87 | @end |
| 88 | |
| 89 | void eventually_noreturn(void) __attribute__((noreturn)); |
| 90 | void eventually_noreturn2(void) __attribute__((noreturn)); |
| 91 | |