summaryrefslogtreecommitdiffstats
path: root/test/Index/complete-objc-message-id.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/complete-objc-message-id.m')
-rw-r--r--test/Index/complete-objc-message-id.m30
1 files changed, 25 insertions, 5 deletions
diff --git a/test/Index/complete-objc-message-id.m b/test/Index/complete-objc-message-id.m
index be42b9b..415e0ff 100644
--- a/test/Index/complete-objc-message-id.m
+++ b/test/Index/complete-objc-message-id.m
@@ -31,6 +31,22 @@ void message_id(B *b) {
return [A alloc];
}
@end
+
+@protocol P1
+- (int)P1_method1;
++ (int)P1_method2;
+@end
+
+@protocol P2 <P1>
+- (int)P2_method1;
++ (int)P2_method2;
+@end
+
+void message_qualified_id(id<P2> ip2) {
+ [ip2 P1_method];
+ ip2 P1_method];
+}
+
// RUN: c-index-test -code-completion-at=%s:24:14 %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: ObjCInstanceMethodDecl:{ResultType id}{TypedText autorelease}
// CHECK-CC1-NOT: B_method
@@ -46,9 +62,13 @@ void message_id(B *b) {
// RUN: c-index-test -code-completion-at=%s:31:13 %s | FileCheck -check-prefix=CHECK-SELECTOR-PREF %s
-// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText alloc} (17)
-// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText class} (20)
-// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText init} (20)
-// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText new} (20)
-// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText superclass} (20)
+// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText alloc} (32)
+// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText class} (35)
+// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText init} (35)
+// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType id}{TypedText new} (35)
+// CHECK-SELECTOR-PREF: ObjCClassMethodDecl:{ResultType Class}{TypedText superclass} (35)
+// RUN: c-index-test -code-completion-at=%s:46:7 %s | FileCheck -check-prefix=CHECK-INSTANCE-QUAL-ID %s
+// RUN: c-index-test -code-completion-at=%s:47:7 %s | FileCheck -check-prefix=CHECK-INSTANCE-QUAL-ID %s
+// CHECK-INSTANCE-QUAL-ID: ObjCInstanceMethodDecl:{ResultType int}{TypedText P1_method1} (37)
+// CHECK-INSTANCE-QUAL-ID: ObjCInstanceMethodDecl:{ResultType int}{TypedText P2_method1} (35)
OpenPOWER on IntegriCloud