annotate clang/test/Rewriter/rewrite-modern-class.mm @ 237:c80f45b162ad llvm-original

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