blob: 798aa83b503947eb77b9e4e34ceb843f1815ed91 [file] [log] [blame]
Douglas Gregor5948ae12012-01-03 18:04:46 +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);
63int func1(int);
64int 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 Gregorf63b0a52011-12-19 18:19:24 +000081#ifdef __cplusplus
82template<typename T> class Vector;
83
84template<typename T> class Vector;
85#endif
Douglas Gregor91534a32012-01-13 23:49:34 +000086
87// Make sure this doesn't introduce an ambiguity-creating 'id' at the
88// top level.
89typedef void funcptr_with_id(int id);
90