blob: 973d594a304275cb3126c6ed4e1d223177258885 [file] [log] [blame]
Douglas Gregor1b257af2012-12-11 22:11:52 +00001@import redecl_merge_top;
Douglas Gregora1be2782011-12-17 23:38:30 +00002
3@class A;
4
5@class A;
6
Douglas Gregorecb19382011-12-19 15:27:36 +00007@interface B
Douglas Gregoradafc2e2011-12-19 16:14:14 +00008+ (B*) create_a_B;
Douglas Gregorecb19382011-12-19 15:27:36 +00009@end
10
Douglas Gregora1be2782011-12-17 23:38:30 +000011@class A;
Douglas Gregorecb19382011-12-19 15:27:36 +000012
Douglas Gregor27c6da22012-01-01 20:30:41 +000013@protocol P1;
14@protocol P2
15- (void)protoMethod2;
16@end
17
Douglas Gregor1ca4a5c2012-01-03 22:46:00 +000018struct S1;
19struct S2 {
20 int field;
21};
22
23struct S1 *produce_S1(void);
24void consume_S2(struct S2*);
25
Douglas Gregor0f753232011-12-22 01:48:48 +000026// Test declarations in different modules with no common initial
27// declaration.
28@class C;
29void accept_a_C(C*);
30
31@class C2;
32void accept_a_C2(C2*);
33
34@class C3;
35void accept_a_C3(C3*);
36@class C3;
37
Douglas Gregorc3cfd2a2011-12-22 21:40:42 +000038@class C4;
39
Douglas Gregor2ccd89c2011-12-20 18:11:52 +000040@class Explicit;
41
42int *explicit_func(void);
43
44struct explicit_struct;
45
Douglas Gregordba93612012-01-01 21:47:52 +000046@protocol P3, P4;
47
48@protocol P3;
49
Douglas Gregor1ca4a5c2012-01-03 22:46:00 +000050struct S3;
51struct S3;
52struct S4 {
53 int field;
54};
55
56struct S3 *produce_S3(void);
57void consume_S4(struct S4*);
58
Douglas Gregor7a537402012-01-03 23:26:26 +000059typedef int T1;
60typedef float T2;
61
Douglas Gregor70762812012-01-04 17:13:46 +000062int func0(int);
Douglas Gregor5456b0fe2012-10-09 17:21:28 +000063int func1(int x) { return x; }
Douglas Gregor70762812012-01-04 17:13:46 +000064int func2(int);
65
Douglas Gregor4791fa22012-01-04 17:21:36 +000066
67
68
69
70
71
72
73
74
75// Spacing matters!
76extern int var1;
77extern float var2;
78
79extern double var3;
80
Douglas Gregor91534a32012-01-13 23:49:34 +000081// Make sure this doesn't introduce an ambiguity-creating 'id' at the
82// top level.
83typedef void funcptr_with_id(int id);
84