diff options
Diffstat (limited to 'clang/test/Index')
| -rw-r--r-- | clang/test/Index/complete-exprs.c | 4 | ||||
| -rw-r--r-- | clang/test/Index/complete-natural.m | 34 |
2 files changed, 34 insertions, 4 deletions
diff --git a/clang/test/Index/complete-exprs.c b/clang/test/Index/complete-exprs.c index 170f6d549fa..aed825e0455 100644 --- a/clang/test/Index/complete-exprs.c +++ b/clang/test/Index/complete-exprs.c @@ -52,10 +52,6 @@ void f4(const char* str) { // CHECK-CC4: FunctionDecl:{ResultType int}{TypedText f}{LeftParen (}{Placeholder int}{RightParen )} (50) // CHECK-CC4: VarDecl:{ResultType struct X}{TypedText f1} (50) (deprecated) -// RUN: c-index-test -code-completion-at=%s:13:28 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC5 %s -// CHECK-CC5: NotImplemented:{TypedText void} (65) -// CHECK-CC5: NotImplemented:{TypedText volatile} (65) - // RUN: c-index-test -code-completion-at=%s:19:3 -Xclang -code-completion-patterns %s | FileCheck -check-prefix=CHECK-CC6 %s // CHECK-CC6: FunctionDecl:{ResultType void}{TypedText f3}{LeftParen (}{Placeholder char const *}{Placeholder , ...}{Text , NULL}{RightParen )} (45) // CHECK-CC6: NotImplemented:{TypedText void} (65) diff --git a/clang/test/Index/complete-natural.m b/clang/test/Index/complete-natural.m new file mode 100644 index 00000000000..df804e64d7b --- /dev/null +++ b/clang/test/Index/complete-natural.m @@ -0,0 +1,34 @@ +// Note: the run lines follow their respective tests, since line/column +// matter in this test. + +const char *in_string = "string"; +char in_char = 'a'; +// in comment +/* in comment */ +#warning blarg +#error blarg +#pragma mark this is the spot +// RUN: c-index-test -code-completion-at=%s:4:32 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// CHECK-CC1-NOT: : +// CHECK-CC1: DONE +// RUN: c-index-test -code-completion-at=%s:5:18 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// RUN: c-index-test -code-completion-at=%s:6:7 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// RUN: c-index-test -code-completion-at=%s:7:7 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// RUN: c-index-test -code-completion-at=%s:8:10 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// RUN: c-index-test -code-completion-at=%s:9:9 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t +// RUN: c-index-test -code-completion-at=%s:10:19 %s > %t +// RUN: echo "DONE" >> %t +// RUN: FileCheck -check-prefix=CHECK-CC1 %s < %t + |

