1*f4a2713aSLionel Sambuc @import redecl_merge_top; 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc @class A; 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc @class A; 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc @interface B 8*f4a2713aSLionel Sambuc + (B*) create_a_B; 9*f4a2713aSLionel Sambuc @end 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc @class A; 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc @protocol P1; 14*f4a2713aSLionel Sambuc @protocol P2 15*f4a2713aSLionel Sambuc - (void)protoMethod2; 16*f4a2713aSLionel Sambuc @end 17*f4a2713aSLionel Sambuc 18*f4a2713aSLionel Sambuc struct S1; 19*f4a2713aSLionel Sambuc struct S2 { 20*f4a2713aSLionel Sambuc int field; 21*f4a2713aSLionel Sambuc }; 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc struct S1 *produce_S1(void); 24*f4a2713aSLionel Sambuc void consume_S2(struct S2*); 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc // Test declarations in different modules with no common initial 27*f4a2713aSLionel Sambuc // declaration. 28*f4a2713aSLionel Sambuc @class C; 29*f4a2713aSLionel Sambuc void accept_a_C(C*); 30*f4a2713aSLionel Sambuc 31*f4a2713aSLionel Sambuc @class C2; 32*f4a2713aSLionel Sambuc void accept_a_C2(C2*); 33*f4a2713aSLionel Sambuc 34*f4a2713aSLionel Sambuc @class C3; 35*f4a2713aSLionel Sambuc void accept_a_C3(C3*); 36*f4a2713aSLionel Sambuc @class C3; 37*f4a2713aSLionel Sambuc 38*f4a2713aSLionel Sambuc @class C4; 39*f4a2713aSLionel Sambuc 40*f4a2713aSLionel Sambuc @class Explicit; 41*f4a2713aSLionel Sambuc 42*f4a2713aSLionel Sambuc int *explicit_func(void); 43*f4a2713aSLionel Sambuc 44*f4a2713aSLionel Sambuc struct explicit_struct; 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc @protocol P3, P4; 47*f4a2713aSLionel Sambuc 48*f4a2713aSLionel Sambuc @protocol P3; 49*f4a2713aSLionel Sambuc 50*f4a2713aSLionel Sambuc struct S3; 51*f4a2713aSLionel Sambuc struct S3; 52*f4a2713aSLionel Sambuc struct S4 { 53*f4a2713aSLionel Sambuc int field; 54*f4a2713aSLionel Sambuc }; 55*f4a2713aSLionel Sambuc 56*f4a2713aSLionel Sambuc struct S3 *produce_S3(void); 57*f4a2713aSLionel Sambuc void consume_S4(struct S4*); 58*f4a2713aSLionel Sambuc 59*f4a2713aSLionel Sambuc typedef int T1; 60*f4a2713aSLionel Sambuc typedef float T2; 61*f4a2713aSLionel Sambuc 62*f4a2713aSLionel Sambuc int func0(int); func1(int x)63*f4a2713aSLionel Sambucint func1(int x) { return x; } 64*f4a2713aSLionel Sambuc int func2(int); 65*f4a2713aSLionel Sambuc 66*f4a2713aSLionel Sambuc 67*f4a2713aSLionel Sambuc 68*f4a2713aSLionel Sambuc 69*f4a2713aSLionel Sambuc 70*f4a2713aSLionel Sambuc 71*f4a2713aSLionel Sambuc 72*f4a2713aSLionel Sambuc 73*f4a2713aSLionel Sambuc 74*f4a2713aSLionel Sambuc 75*f4a2713aSLionel Sambuc // Spacing matters! 76*f4a2713aSLionel Sambuc extern int var1; 77*f4a2713aSLionel Sambuc extern float var2; 78*f4a2713aSLionel Sambuc 79*f4a2713aSLionel Sambuc extern double var3; 80*f4a2713aSLionel Sambuc 81*f4a2713aSLionel Sambuc // Make sure this doesn't introduce an ambiguity-creating 'id' at the 82*f4a2713aSLionel Sambuc // top level. 83*f4a2713aSLionel Sambuc typedef void funcptr_with_id(int id); 84*f4a2713aSLionel Sambuc 85*f4a2713aSLionel Sambuc // A class that is declared in the 'bottom' module, then loaded from 86*f4a2713aSLionel Sambuc // one of the modules it depends on. 87*f4a2713aSLionel Sambuc @interface DeclaredThenLoaded 88*f4a2713aSLionel Sambuc - declaredThenLoadedMethod; 89*f4a2713aSLionel Sambuc @end 90*f4a2713aSLionel Sambuc 91*f4a2713aSLionel Sambuc @class DeclaredThenLoaded; 92*f4a2713aSLionel Sambuc 93*f4a2713aSLionel Sambuc void eventually_noreturn2(void); 94