blob: b6be98a51d024f5dd56f36180d2fa6b736cc101c [file] [log] [blame]
Fariborz Jahanianaf300292012-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
2// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3
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 Jahanian72c88f12012-02-22 18:13:25 +000059 return arg->p_super;
Fariborz Jahanianaf300292012-02-20 20:09:20 +000060}
61@end
Fariborz Jahanian57317782012-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}