diff options
author | Douglas Gregor <dgregor@apple.com> | 2015-07-07 06:20:36 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2015-07-07 06:20:36 +0000 |
commit | cedcd9f860d7f3cfe57f15e88efd731197e88606 (patch) | |
tree | adac30df585767758dd245b104b0938c4897a503 /clang/test | |
parent | 7fa93c77303e408aa3fad7a9e3cc43849ce021ce (diff) | |
download | bcm5719-llvm-cedcd9f860d7f3cfe57f15e88efd731197e88606.tar.gz bcm5719-llvm-cedcd9f860d7f3cfe57f15e88efd731197e88606.zip |
[libclang] Implement proper code-completion in an ObjC type parameter position.
rdar://19670303
llvm-svn: 241561
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Index/complete-parameterized-classes.m | 13 |
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} |