Fariborz Jahanian | af30029 | 2012-02-20 20:09:20 +0000 | [diff] [blame] | 1 | // 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 Jahanian | 72c88f1 | 2012-02-22 18:13:25 +0000 | [diff] [blame] | 59 | return arg->p_super; |
Fariborz Jahanian | af30029 | 2012-02-20 20:09:20 +0000 | [diff] [blame] | 60 | } |
| 61 | @end |
Fariborz Jahanian | 5731778 | 2012-02-21 23:58:41 +0000 | [diff] [blame] | 62 | |
| 63 | @class FORM_CLASS; |
| 64 | @interface INTF_DECL { |
| 65 | } |
| 66 | @end |
| 67 | |
| 68 | double Meth(INTF_DECL *p, FORM_CLASS *f) { |
| 69 | return 1.34; |
| 70 | } |