xref: /llvm-project/clang/test/Modules/Inputs/redecl-merge-right.h (revision 6168bd2323cdf2ff1dc4174c6fc4cd6a479f001b)
1c50d4924SDouglas Gregor @import redecl_merge_top;
205f10357SDouglas Gregor 
305f10357SDouglas Gregor @interface Super
405f10357SDouglas Gregor @end
505f10357SDouglas Gregor 
605f10357SDouglas Gregor @interface A : Super
705f10357SDouglas Gregor - (Super*)init;
805f10357SDouglas Gregor @end
905f10357SDouglas Gregor 
109f562c8dSDouglas Gregor @class B;
119f562c8dSDouglas Gregor 
1232c17577SDouglas Gregor @protocol P1
1332c17577SDouglas Gregor - (void)protoMethod1;
1432c17577SDouglas Gregor @end
1532c17577SDouglas Gregor 
1632c17577SDouglas Gregor @protocol P1;
1732c17577SDouglas Gregor 
1832c17577SDouglas Gregor @protocol P2;
1932c17577SDouglas Gregor 
2032c17577SDouglas Gregor @protocol P2;
2132c17577SDouglas Gregor 
2232c17577SDouglas Gregor @protocol P2;
2332c17577SDouglas Gregor 
242009ceedSDouglas Gregor struct S1;
252009ceedSDouglas Gregor struct S2;
262009ceedSDouglas Gregor 
272009ceedSDouglas Gregor void consume_S1(struct S1*);
282009ceedSDouglas Gregor struct S2 *produce_S2(void);
292009ceedSDouglas Gregor 
30022857e0SDouglas Gregor // Test declarations in different modules with no common initial
31022857e0SDouglas Gregor // declaration.
32022857e0SDouglas Gregor @class C;
33022857e0SDouglas Gregor C *get_a_C(void);
34022857e0SDouglas Gregor @class C2;
35022857e0SDouglas Gregor C2 *get_a_C2(void);
36022857e0SDouglas Gregor @class C3;
37022857e0SDouglas Gregor C3 *get_a_C3(void);
38022857e0SDouglas Gregor 
390475cd88SDouglas Gregor @class C4;
400475cd88SDouglas Gregor @class C4;
410475cd88SDouglas Gregor @class C4;
420475cd88SDouglas Gregor @class C4;
430475cd88SDouglas Gregor C4 *get_a_C4(void);
440475cd88SDouglas Gregor 
4521823bfeSDouglas Gregor @class Explicit;
4621823bfeSDouglas Gregor 
4721823bfeSDouglas Gregor int *explicit_func(void);
4821823bfeSDouglas Gregor 
4921823bfeSDouglas Gregor struct explicit_struct;
5021823bfeSDouglas Gregor 
51da38930cSDouglas Gregor @protocol P4, P3;
52da38930cSDouglas Gregor @protocol P3;
53da38930cSDouglas Gregor @protocol P3;
54da38930cSDouglas Gregor @protocol P3;
55da38930cSDouglas Gregor 
562009ceedSDouglas Gregor struct S3;
572009ceedSDouglas Gregor struct S4;
582009ceedSDouglas Gregor 
592009ceedSDouglas Gregor void consume_S3(struct S3*);
602009ceedSDouglas Gregor struct S4 *produce_S4(void);
612009ceedSDouglas Gregor 
62b59643baSDouglas Gregor typedef int T1;
63b59643baSDouglas Gregor typedef double T2;
64b59643baSDouglas Gregor 
65b2585694SDouglas Gregor int func0(int);
66b2585694SDouglas Gregor int func1(int);
67b2585694SDouglas Gregor int func1(int);
func1(int x)68a6017bbdSDouglas Gregor int func1(int x) { return x; }
69b2585694SDouglas Gregor int func1(int);
70b2585694SDouglas Gregor static int func2(int);
71b2585694SDouglas Gregor 
72b8c6f1e9SDouglas Gregor 
73b8c6f1e9SDouglas Gregor 
74b8c6f1e9SDouglas Gregor 
75b8c6f1e9SDouglas Gregor // Spacing matters!
76b8c6f1e9SDouglas Gregor extern int var1;
77b8c6f1e9SDouglas Gregor extern int var2;
78b8c6f1e9SDouglas Gregor 
79b8c6f1e9SDouglas Gregor static double var3;
80b8c6f1e9SDouglas Gregor 
810abc262bSDouglas Gregor int ONE;
82c50d4924SDouglas Gregor @import redecl_merge_top.Explicit;
830abc262bSDouglas Gregor const int one = ONE;
84c03c52eaSDouglas Gregor 
85c03c52eaSDouglas Gregor @interface ClassWithDef
86c03c52eaSDouglas Gregor - (void)method;
87c03c52eaSDouglas Gregor @end
88*6168bd23SDouglas Gregor 
89*6168bd23SDouglas Gregor void eventually_noreturn(void) __attribute__((noreturn));
90*6168bd23SDouglas Gregor void eventually_noreturn2(void) __attribute__((noreturn));
91