blob: cf2143e86463b7d625304238e9b6007f34e62156 [file] [log] [blame]
Fariborz Jahaniana7765fe2012-02-20 20:09:20 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
Paul Robinsone9492f72016-12-09 01:20:40 +00002// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahaniana7765fe2012-02-20 20:09:20 +00003
4@protocol PROTO @end
5
6@interface empty_root @end
7
8@interface root_with_ivars
9{
10 id ROOT_IVAR;
11 id ROOT1_IVAR;
12}
13@end
14
15@interface MAXIMAL : root_with_ivars<PROTO>
16{
17 double D_IVAR;
18 double D_PROPERTY;
19}
20- (void) V_METH;
21@end
22
23@implementation MAXIMAL
24- (void) V_METH {}
25@end
26//=========================================
27@interface empty_class @end
28
29@implementation empty_class @end
30//=========================================
31@interface class_empty_root : empty_root @end
32
33@implementation class_empty_root @end
34//=========================================
35@interface class_with_ivars : empty_root
36{
37 int class_with_ivars_IVAR;
38}
39@end
40
41@implementation class_with_ivars @end
42//=========================================
43@interface class_has_no_ivar : root_with_ivars @end
44
45@implementation class_has_no_ivar @end
46
47//============================class needs to be synthesized here=====================
48@interface SUPER {
49@public
50 double divar;
51 SUPER *p_super;
52}
53@end
54
55@interface INTF @end
56
57@implementation INTF
58- (SUPER *) Meth : (SUPER *)arg {
Fariborz Jahanian5e49eb92012-02-22 18:13:25 +000059 return arg->p_super;
Fariborz Jahaniana7765fe2012-02-20 20:09:20 +000060}
61@end
Fariborz Jahanian8e1118cbd2012-02-21 23:58:41 +000062
63@class FORM_CLASS;
64@interface INTF_DECL {
65}
66@end
67
68double Meth(INTF_DECL *p, FORM_CLASS *f) {
69 return 1.34;
70}