Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 1 | @import redecl_merge_top; |
Douglas Gregor | a1be278 | 2011-12-17 23:38:30 +0000 | [diff] [blame] | 2 | |
3 | @interface Super | ||||
4 | @end | ||||
5 | |||||
6 | @interface A : Super | ||||
7 | - (Super*)init; | ||||
8 | @end | ||||
9 | |||||
Douglas Gregor | ecb1938 | 2011-12-19 15:27:36 +0000 | [diff] [blame] | 10 | @class B; |
11 | |||||
Douglas Gregor | 27c6da2 | 2012-01-01 20:30:41 +0000 | [diff] [blame] | 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 | |||||
Douglas Gregor | 1ca4a5c | 2012-01-03 22:46:00 +0000 | [diff] [blame] | 24 | struct S1; |
25 | struct S2; | ||||
26 | |||||
27 | void consume_S1(struct S1*); | ||||
28 | struct S2 *produce_S2(void); | ||||
29 | |||||
Douglas Gregor | 0f75323 | 2011-12-22 01:48:48 +0000 | [diff] [blame] | 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 | |||||
Douglas Gregor | cce54aa | 2011-12-22 19:44:59 +0000 | [diff] [blame] | 39 | @class C4; |
40 | @class C4; | ||||
41 | @class C4; | ||||
42 | @class C4; | ||||
43 | C4 *get_a_C4(void); | ||||
44 | |||||
Douglas Gregor | 2ccd89c | 2011-12-20 18:11:52 +0000 | [diff] [blame] | 45 | @class Explicit; |
46 | |||||
47 | int *explicit_func(void); | ||||
48 | |||||
49 | struct explicit_struct; | ||||
50 | |||||
Douglas Gregor | dba9361 | 2012-01-01 21:47:52 +0000 | [diff] [blame] | 51 | @protocol P4, P3; |
52 | @protocol P3; | ||||
53 | @protocol P3; | ||||
54 | @protocol P3; | ||||
55 | |||||
Douglas Gregor | 1ca4a5c | 2012-01-03 22:46:00 +0000 | [diff] [blame] | 56 | struct S3; |
57 | struct S4; | ||||
58 | |||||
59 | void consume_S3(struct S3*); | ||||
60 | struct S4 *produce_S4(void); | ||||
61 | |||||
Douglas Gregor | 7a53740 | 2012-01-03 23:26:26 +0000 | [diff] [blame] | 62 | typedef int T1; |
63 | typedef double T2; | ||||
64 | |||||
Douglas Gregor | 7076281 | 2012-01-04 17:13:46 +0000 | [diff] [blame] | 65 | int func0(int); |
66 | int func1(int); | ||||
67 | int func1(int); | ||||
Douglas Gregor | 5456b0fe | 2012-10-09 17:21:28 +0000 | [diff] [blame] | 68 | int func1(int x) { return x; } |
Douglas Gregor | 7076281 | 2012-01-04 17:13:46 +0000 | [diff] [blame] | 69 | int func1(int); |
70 | static int func2(int); | ||||
71 | |||||
Douglas Gregor | 4791fa2 | 2012-01-04 17:21:36 +0000 | [diff] [blame] | 72 | |
73 | |||||
74 | |||||
75 | // Spacing matters! | ||||
76 | extern int var1; | ||||
77 | extern int var2; | ||||
78 | |||||
79 | static double var3; | ||||
80 | |||||
Douglas Gregor | 1d4c113 | 2011-12-20 22:06:13 +0000 | [diff] [blame] | 81 | int ONE; |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 82 | @import redecl_merge_top.Explicit; |
Douglas Gregor | 1d4c113 | 2011-12-20 22:06:13 +0000 | [diff] [blame] | 83 | const int one = ONE; |
Douglas Gregor | cc32b44 | 2012-01-15 18:08:05 +0000 | [diff] [blame] | 84 | |
85 | @interface ClassWithDef | ||||
86 | - (void)method; | ||||
87 | @end |