summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/complete-parameterized-classes.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Index/complete-parameterized-classes.m')
-rw-r--r--clang/test/Index/complete-parameterized-classes.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Index/complete-parameterized-classes.m b/clang/test/Index/complete-parameterized-classes.m
index c7d273ac1ef..70d85885e3b 100644
--- a/clang/test/Index/complete-parameterized-classes.m
+++ b/clang/test/Index/complete-parameterized-classes.m
@@ -37,6 +37,11 @@ void test2(Test *obj) {
-(id)getit:(id)val {}
@end
+void test3() {
+ Test<> t;
+ NSObject<> n;
+}
+
// RUN: c-index-test -code-completion-at=%s:25:8 %s | FileCheck -check-prefix=CHECK-CC0 %s
// CHECK-CC0: ObjCInstanceMethodDecl:{ResultType void}{TypedText apply2:}{Placeholder ^(MyClsA *, MyClsB *)block} (35)
// CHECK-CC0: ObjCInstanceMethodDecl:{ResultType void}{TypedText apply:}{Placeholder ^(MyClsA *, MyClsB *)block} (35)
@@ -64,3 +69,11 @@ void test2(Test *obj) {
// CHECK-CC6: ObjCInstanceMethodDecl:{LeftParen (}{Text void}{RightParen )}{TypedText apply}{TypedText :}{LeftParen (}{Text void (^)(id, NSObject *)}{RightParen )}{Text block} (40)
// CHECK-CC6: ObjCInstanceMethodDecl:{LeftParen (}{Text NSObject *}{RightParen )}{TypedText getit}{TypedText :}{LeftParen (}{Text id}{RightParen )}{Text val} (40)
// CHECK-CC6: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText prop} (40)
+
+// RUN: c-index-test -code-completion-at=%s:41:8 %s | FileCheck -check-prefix=CHECK-CC7 %s
+// CHECK-CC7: ObjCInterfaceDecl:{TypedText MyClsA}
+// RUN: c-index-test -code-completion-at=%s:42:12 %s > %t.out
+// RUN: FileCheck -input-file=%t.out -check-prefix=CHECK-CC8 %s
+// RUN: FileCheck -input-file=%t.out -check-prefix=CHECK-CC9 %s
+// CHECK-CC8: ObjCProtocolDecl:{TypedText NSObject}
+// CHECK-CC9-NOT: ObjCInterfaceDecl:{TypedText MyClsA}
OpenPOWER on IntegriCloud