Douglas Gregor | 5f808c2 | 2010-08-16 21:18:39 +0000 | [diff] [blame] | 1 | // Note: the run lines follow their respective tests, since line/column |
| 2 | // matter in this test. |
| 3 | |
| 4 | struct StructA { }; |
| 5 | struct StructB { }; |
| 6 | struct StructC { }; |
| 7 | int ValueA; |
| 8 | int ValueB; |
| 9 | |
| 10 | void f() { |
| 11 | |
| 12 | int ValueA = 0; |
| 13 | int StructA = 0; |
| 14 | struct StructB { }; |
| 15 | |
| 16 | struct StructA sa = { }; |
| 17 | } |
| 18 | |
Douglas Gregor | b2ebdf9 | 2010-09-09 16:16:39 +0000 | [diff] [blame] | 19 | // RUN: c-index-test -code-completion-at=%s:16:3 %s > %t |
| 20 | // RUN: FileCheck -check-prefix=CHECK-CC1 -input-file=%t %s |
Douglas Gregor | 5f808c2 | 2010-08-16 21:18:39 +0000 | [diff] [blame] | 21 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:16:3 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame] | 22 | // CHECK-CC1: VarDecl:{ResultType int}{TypedText StructA} (34) |
| 23 | // CHECK-CC1: VarDecl:{ResultType int}{TypedText ValueA} (34) |
Douglas Gregor | 5f808c2 | 2010-08-16 21:18:39 +0000 | [diff] [blame] | 24 | // CHECK-CC1-NOT: VarDecl:{ResultType int}{TypedText ValueA} (50) |
| 25 | // CHECK-CC1: VarDecl:{ResultType int}{TypedText ValueB} (50) |
Douglas Gregor | b2ebdf9 | 2010-09-09 16:16:39 +0000 | [diff] [blame] | 26 | // RUN: c-index-test -code-completion-at=%s:16:10 %s > %t |
| 27 | // RUN: FileCheck -check-prefix=CHECK-CC2 -input-file=%t %s |
Douglas Gregor | 08f43cd | 2010-09-20 23:11:55 +0000 | [diff] [blame] | 28 | // CHECK-CC2: StructDecl:{TypedText StructA} (50) |
| 29 | // CHECK-CC2-NOT: StructDecl:{TypedText StructB} (50) |
| 30 | // CHECK-CC2: StructDecl:{TypedText StructC} (50) |
Douglas Gregor | b2ebdf9 | 2010-09-09 16:16:39 +0000 | [diff] [blame] | 31 | // RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:16:10 %s > %t |
| 32 | // RUN: FileCheck -check-prefix=CHECK-CC2 -input-file=%t %s |