annotate clang/test/Index/complete-ivar-access.m @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 @interface Other {
anatofuz
parents:
diff changeset
2 @private
anatofuz
parents:
diff changeset
3 int other_private;
anatofuz
parents:
diff changeset
4 @protected
anatofuz
parents:
diff changeset
5 int other_protected;
anatofuz
parents:
diff changeset
6 @public
anatofuz
parents:
diff changeset
7 int other_public;
anatofuz
parents:
diff changeset
8 }
anatofuz
parents:
diff changeset
9 @end
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 @interface Super {
anatofuz
parents:
diff changeset
12 @private
anatofuz
parents:
diff changeset
13 int super_private;
anatofuz
parents:
diff changeset
14 @protected
anatofuz
parents:
diff changeset
15 int super_protected;
anatofuz
parents:
diff changeset
16 @public
anatofuz
parents:
diff changeset
17 int super_public;
anatofuz
parents:
diff changeset
18 }
anatofuz
parents:
diff changeset
19 @end
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 @interface Super () {
anatofuz
parents:
diff changeset
22 @private
anatofuz
parents:
diff changeset
23 int super_ext_private;
anatofuz
parents:
diff changeset
24 @protected
anatofuz
parents:
diff changeset
25 int super_ext_protected;
anatofuz
parents:
diff changeset
26 @public
anatofuz
parents:
diff changeset
27 int super_ext_public;
anatofuz
parents:
diff changeset
28 }
anatofuz
parents:
diff changeset
29 @end
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 @interface Sub : Super {
anatofuz
parents:
diff changeset
32 @private
anatofuz
parents:
diff changeset
33 int sub_private;
anatofuz
parents:
diff changeset
34 @protected
anatofuz
parents:
diff changeset
35 int sub_protected;
anatofuz
parents:
diff changeset
36 @public
anatofuz
parents:
diff changeset
37 int sub_public;
anatofuz
parents:
diff changeset
38 }
anatofuz
parents:
diff changeset
39 @end
anatofuz
parents:
diff changeset
40
anatofuz
parents:
diff changeset
41 @implementation Sub
anatofuz
parents:
diff changeset
42 - (void)method:(Sub *)sub with:(Other *)other {
anatofuz
parents:
diff changeset
43 sub->super_protected = 1;
anatofuz
parents:
diff changeset
44 other->other_public = 1;
anatofuz
parents:
diff changeset
45 }
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 void f(Sub *sub, Other *other) {
anatofuz
parents:
diff changeset
48 sub->super_protected = 1;
anatofuz
parents:
diff changeset
49 other->other_public = 1;
anatofuz
parents:
diff changeset
50 }
anatofuz
parents:
diff changeset
51 @end
anatofuz
parents:
diff changeset
52
anatofuz
parents:
diff changeset
53 // RUN: c-index-test -code-completion-at=%s:43:8 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-SUB %s
anatofuz
parents:
diff changeset
54 // RUN: c-index-test -code-completion-at=%s:48:8 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-SUB %s
anatofuz
parents:
diff changeset
55 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_private} (35)
anatofuz
parents:
diff changeset
56 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_protected} (35)
anatofuz
parents:
diff changeset
57 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_public} (35)
anatofuz
parents:
diff changeset
58 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_private} (35) (inaccessible)
anatofuz
parents:
diff changeset
59 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_protected} (35)
anatofuz
parents:
diff changeset
60 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_public} (35)
anatofuz
parents:
diff changeset
61 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_private} (37) (inaccessible)
anatofuz
parents:
diff changeset
62 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_protected} (37)
anatofuz
parents:
diff changeset
63 // CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_public} (37)
anatofuz
parents:
diff changeset
64
anatofuz
parents:
diff changeset
65 // RUN: c-index-test -code-completion-at=%s:44:10 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-OTHER %s
anatofuz
parents:
diff changeset
66 // RUN: c-index-test -code-completion-at=%s:49:10 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-OTHER %s
anatofuz
parents:
diff changeset
67 // CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_private} (35) (inaccessible)
anatofuz
parents:
diff changeset
68 // CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_protected} (35) (inaccessible)
anatofuz
parents:
diff changeset
69 // CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_public} (35)