| Ted Kremenek | c1e4dd0 | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 1 | @__experimental_modules_import redecl_merge_top; | 
| Douglas Gregor | 05f1035 | 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 | 9f562c8 | 2011-12-19 15:27:36 +0000 | [diff] [blame] | 10 | @class B; | 
|  | 11 |  | 
| Douglas Gregor | 32c1757 | 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 | 2009cee | 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 | 022857e | 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 | 0475cd8 | 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 | 21823bf | 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 | da38930 | 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 | 2009cee | 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 | b59643b | 2012-01-03 23:26:26 +0000 | [diff] [blame] | 62 | typedef int T1; | 
|  | 63 | typedef double T2; | 
|  | 64 |  | 
| Douglas Gregor | b258569 | 2012-01-04 17:13:46 +0000 | [diff] [blame] | 65 | int func0(int); | 
|  | 66 | int func1(int); | 
|  | 67 | int func1(int); | 
|  | 68 | int func1(int); | 
|  | 69 | int func1(int); | 
|  | 70 | static int func2(int); | 
|  | 71 |  | 
| Douglas Gregor | b8c6f1e | 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 | 0abc262 | 2011-12-20 22:06:13 +0000 | [diff] [blame] | 81 | int ONE; | 
| Ted Kremenek | c1e4dd0 | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 82 | @__experimental_modules_import redecl_merge_top.Explicit; | 
| Douglas Gregor | 0abc262 | 2011-12-20 22:06:13 +0000 | [diff] [blame] | 83 | const int one = ONE; | 
| Douglas Gregor | c03c52e | 2012-01-15 18:08:05 +0000 | [diff] [blame] | 84 |  | 
|  | 85 | @interface ClassWithDef | 
|  | 86 | - (void)method; | 
|  | 87 | @end |