1 /* Note: the RUN lines are near the end of the file, since line/column
2 matter for this test. */
5 @property float ProtoProp;
12 @interface Int : Super<MyProtocol>
20 void test_props(Int* ptr) {
29 - (int)myOtherPropLikeThing;
30 - (int)myOtherNonPropThing:(int)value;
33 int test_more_props(Sub *s) {
34 return s.myOtherPropLikeThing;
41 int test_two_levels(Other *other) {
42 return other.sub.myProp;
45 // RUN: c-index-test -code-completion-at=%s:21:7 %s | FileCheck -check-prefix=CHECK-CC1 %s
46 // CHECK-CC1: ObjCPropertyDecl:{ResultType int}{TypedText prop1}
47 // CHECK-CC1: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp}
48 // CHECK-CC1: Completion contexts:
49 // CHECK-CC1-NEXT: Objective-C property access
50 // CHECK-CC1-NEXT: Container Kind: ObjCInterfaceDecl
51 // CHECK-CC1-NEXT: Container is complete
52 // CHECK-CC1-NEXT: Container USR: c:objc(cs)Int
53 // RUN: c-index-test -code-completion-at=%s:22:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
54 // CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText IVar} (35)
55 // CHECK-CC2: ObjCIvarDecl:{ResultType int}{TypedText SuperIVar} (37)
56 // CHECK-CC2: Completion contexts:
57 // CHECK-CC2-NEXT: Arrow member access
58 // CHECK-CC2-NEXT: Container Kind: ObjCInterfaceDecl
59 // CHECK-CC2-NEXT: Container is complete
60 // CHECK-CC2-NEXT: Container USR: c:objc(cs)Int
61 // RUN: c-index-test -code-completion-at=%s:34:12 %s | FileCheck -check-prefix=CHECK-CC3 %s
62 // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType int}{TypedText myOtherPropLikeThing} (37)
63 // CHECK-CC3: ObjCPropertyDecl:{ResultType int}{TypedText myProp} (35)
64 // CHECK-CC3: ObjCPropertyDecl:{ResultType int}{TypedText prop1} (37)
65 // CHECK-CC3: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp} (37)
66 // CHECK-CC3: Completion contexts:
67 // CHECK-CC3-NEXT: Objective-C property access
68 // CHECK-CC3-NEXT: Container Kind: ObjCInterfaceDecl
69 // CHECK-CC3-NEXT: Container is complete
70 // CHECK-CC3-NEXT: Container USR: c:objc(cs)Sub
72 // RUN: c-index-test -code-completion-at=%s:42:20 %s | FileCheck -check-prefix=CHECK-CC4 %s
73 // CHECK-CC4: ObjCInstanceMethodDecl:{ResultType int}{TypedText myOtherPropLikeThing} (37)
74 // CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType int}{TypedText myProp} (35)
75 // CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType int}{TypedText prop1} (37)
76 // CHECK-CC4-NEXT: ObjCPropertyDecl:{ResultType float}{TypedText ProtoProp} (37)