1 // Note: the run lines follow their respective tests, since line/column
2 // matter in this test.
23 void message_id(B *b) {
25 [[b retain] B_method];
26 [[b superclass] B_method];
29 @implementation Unrelated
45 void message_qualified_id(id<P2> ip2) {
50 // RUN: c-index-test -code-completion-at=%s:24:14 %s | FileCheck -check-prefix=CHECK-CC1 %s
51 // CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText autorelease}
52 // CHECK-CC1-NOT: B_method
53 // CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText retain}
54 // RUN: c-index-test -code-completion-at=%s:25:15 %s | FileCheck -check-prefix=CHECK-CC2 %s
55 // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType id}{TypedText autorelease}
56 // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType int}{TypedText B_method}
57 // CHECK-CC2: ObjCInstanceMethodDecl:{ResultType id}{TypedText retain}
58 // RUN: c-index-test -code-completion-at=%s:26:19 %s | FileCheck -check-prefix=CHECK-CC3 %s
59 // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType id}{TypedText autorelease}
60 // CHECK-CC3-NOT: B_method
61 // CHECK-CC3: ObjCInstanceMethodDecl:{ResultType id}{TypedText retain}
64 // RUN: c-index-test -code-completion-at=%s:31:13 %s | FileCheck -check-prefix=CHECK-SELECTOR-PREF %s
65 // CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText alloc} (32)
66 // CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText class} (35)
67 // CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText init} (35)
68 // CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText new} (35)
69 // CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText superclass} (35)
71 // RUN: c-index-test -code-completion-at=%s:46:8 %s | FileCheck -check-prefix=CHECK-INSTANCE-QUAL-ID %s
72 // RUN: c-index-test -code-completion-at=%s:47:8 %s | FileCheck -check-prefix=CHECK-INSTANCE-QUAL-ID %s
73 // CHECK-INSTANCE-QUAL-ID: ObjCInstanceMethodDecl:{ResultType int}{TypedText P1_method1} (37)
74 // CHECK-INSTANCE-QUAL-ID: ObjCInstanceMethodDecl:{ResultType int}{TypedText P2_method1} (35)