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 -std=gnu++98 -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 {
59  return arg->p_super;
60}
61@end
62
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}
71