1*67e74705SXin Li// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2*67e74705SXin Li// 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*67e74705SXin Li 4*67e74705SXin Li@protocol PROTO @end 5*67e74705SXin Li 6*67e74705SXin Li@interface empty_root @end 7*67e74705SXin Li 8*67e74705SXin Li@interface root_with_ivars 9*67e74705SXin Li{ 10*67e74705SXin Li id ROOT_IVAR; 11*67e74705SXin Li id ROOT1_IVAR; 12*67e74705SXin Li} 13*67e74705SXin Li@end 14*67e74705SXin Li 15*67e74705SXin Li@interface MAXIMAL : root_with_ivars<PROTO> 16*67e74705SXin Li{ 17*67e74705SXin Li double D_IVAR; 18*67e74705SXin Li double D_PROPERTY; 19*67e74705SXin Li} 20*67e74705SXin Li- (void) V_METH; 21*67e74705SXin Li@end 22*67e74705SXin Li 23*67e74705SXin Li@implementation MAXIMAL 24*67e74705SXin Li- (void) V_METH {} 25*67e74705SXin Li@end 26*67e74705SXin Li//========================================= 27*67e74705SXin Li@interface empty_class @end 28*67e74705SXin Li 29*67e74705SXin Li@implementation empty_class @end 30*67e74705SXin Li//========================================= 31*67e74705SXin Li@interface class_empty_root : empty_root @end 32*67e74705SXin Li 33*67e74705SXin Li@implementation class_empty_root @end 34*67e74705SXin Li//========================================= 35*67e74705SXin Li@interface class_with_ivars : empty_root 36*67e74705SXin Li{ 37*67e74705SXin Li int class_with_ivars_IVAR; 38*67e74705SXin Li} 39*67e74705SXin Li@end 40*67e74705SXin Li 41*67e74705SXin Li@implementation class_with_ivars @end 42*67e74705SXin Li//========================================= 43*67e74705SXin Li@interface class_has_no_ivar : root_with_ivars @end 44*67e74705SXin Li 45*67e74705SXin Li@implementation class_has_no_ivar @end 46*67e74705SXin Li 47*67e74705SXin Li//============================class needs to be synthesized here===================== 48*67e74705SXin Li@interface SUPER { 49*67e74705SXin Li@public 50*67e74705SXin Li double divar; 51*67e74705SXin Li SUPER *p_super; 52*67e74705SXin Li} 53*67e74705SXin Li@end 54*67e74705SXin Li 55*67e74705SXin Li@interface INTF @end 56*67e74705SXin Li 57*67e74705SXin Li@implementation INTF 58*67e74705SXin Li- (SUPER *) Meth : (SUPER *)arg { 59*67e74705SXin Li return arg->p_super; 60*67e74705SXin Li} 61*67e74705SXin Li@end 62*67e74705SXin Li 63*67e74705SXin Li@class FORM_CLASS; 64*67e74705SXin Li@interface INTF_DECL { 65*67e74705SXin Li} 66*67e74705SXin Li@end 67*67e74705SXin Li 68*67e74705SXin Lidouble Meth(INTF_DECL *p, FORM_CLASS *f) { 69*67e74705SXin Li return 1.34; 70*67e74705SXin Li} 71