1@interface Other { 2@private 3 int other_private; 4@protected 5 int other_protected; 6@public 7 int other_public; 8} 9@end 10 11@interface Super { 12@private 13 int super_private; 14@protected 15 int super_protected; 16@public 17 int super_public; 18} 19@end 20 21@interface Super () { 22@private 23 int super_ext_private; 24@protected 25 int super_ext_protected; 26@public 27 int super_ext_public; 28} 29@end 30 31@interface Sub : Super { 32@private 33 int sub_private; 34@protected 35 int sub_protected; 36@public 37 int sub_public; 38} 39@end 40 41@implementation Sub 42- (void)method:(Sub *)sub with:(Other *)other { 43 sub->super_protected = 1; 44 other->other_public = 1; 45} 46 47void f(Sub *sub, Other *other) { 48 sub->super_protected = 1; 49 other->other_public = 1; 50} 51@end 52 53// RUN: c-index-test -code-completion-at=%s:43:8 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-SUB %s 54// RUN: c-index-test -code-completion-at=%s:48:8 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-SUB %s 55// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_private} (35) 56// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_protected} (35) 57// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText sub_public} (35) 58// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_private} (35) (inaccessible) 59// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_protected} (35) 60// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_ext_public} (35) 61// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_private} (37) (inaccessible) 62// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_protected} (37) 63// CHECK-SUB: ObjCIvarDecl:{ResultType int}{TypedText super_public} (37) 64 65// RUN: c-index-test -code-completion-at=%s:44:10 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-OTHER %s 66// RUN: c-index-test -code-completion-at=%s:49:10 -fobjc-nonfragile-abi %s | FileCheck -check-prefix=CHECK-OTHER %s 67// CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_private} (35) (inaccessible) 68// CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_protected} (35) (inaccessible) 69// CHECK-OTHER: ObjCIvarDecl:{ResultType int}{TypedText other_public} (35) 70