Douglas Gregor | 9720455 | 2010-08-29 19:20:21 +0000 | [diff] [blame] | 1 | // The run lines are below, because this test is line- and |
| 2 | // column-number sensitive. |
| 3 | |
| 4 | template<typename T> |
| 5 | struct X { |
| 6 | X(T); |
| 7 | }; |
| 8 | |
| 9 | struct Virt { }; |
| 10 | struct Y : virtual Virt { }; |
| 11 | |
| 12 | struct Z : public X<int>, public Y { |
| 13 | Z(); |
| 14 | |
| 15 | int a, b, c; |
| 16 | }; |
| 17 | |
Douglas Gregor | 0c431c8 | 2010-08-29 19:27:27 +0000 | [diff] [blame] | 18 | Z::Z() : ::X<int>(0), Virt(), b(), c() { } |
Douglas Gregor | 9720455 | 2010-08-29 19:20:21 +0000 | [diff] [blame] | 19 | |
| 20 | // RUN: c-index-test -code-completion-at=%s:18:10 %s | FileCheck -check-prefix=CHECK-CC1 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame^] | 21 | // CHECK-CC1: MemberRef:{TypedText a}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 22 | // CHECK-CC1: MemberRef:{TypedText b}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 23 | // CHECK-CC1: MemberRef:{TypedText c}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 24 | // CHECK-CC1: NotImplemented:{TypedText Virt}{LeftParen (}{Placeholder args}{RightParen )} (35) |
Douglas Gregor | 0c431c8 | 2010-08-29 19:27:27 +0000 | [diff] [blame] | 25 | // CHECK-CC1: NotImplemented:{TypedText X<int>}{LeftParen (}{Placeholder args}{RightParen )} (7) |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame^] | 26 | // CHECK-CC1: NotImplemented:{TypedText Y}{LeftParen (}{Placeholder args}{RightParen )} (35) |
Douglas Gregor | 9720455 | 2010-08-29 19:20:21 +0000 | [diff] [blame] | 27 | |
| 28 | // RUN: c-index-test -code-completion-at=%s:18:23 %s | FileCheck -check-prefix=CHECK-CC2 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame^] | 29 | // CHECK-CC2: MemberRef:{TypedText a}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 30 | // CHECK-CC2: MemberRef:{TypedText b}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 31 | // CHECK-CC2: MemberRef:{TypedText c}{LeftParen (}{Placeholder args}{RightParen )} (35) |
| 32 | // CHECK-CC2: NotImplemented:{TypedText Virt}{LeftParen (}{Placeholder args}{RightParen )} (35) |
Douglas Gregor | 0c431c8 | 2010-08-29 19:27:27 +0000 | [diff] [blame] | 33 | // CHECK-CC2: NotImplemented:{TypedText Y}{LeftParen (}{Placeholder args}{RightParen )} (7) |
| 34 | |
| 35 | // RUN: c-index-test -code-completion-at=%s:18:36 %s | FileCheck -check-prefix=CHECK-CC3 %s |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame^] | 36 | // CHECK-CC3: MemberRef:{TypedText a}{LeftParen (}{Placeholder args}{RightParen )} (35) |
Douglas Gregor | a67e03f | 2010-09-09 21:42:20 +0000 | [diff] [blame] | 37 | // CHECK-CC3-NOT: MemberRef:{TypedText b}{LeftParen (}{Placeholder args}{RightParen )} |
| 38 | // CHECK-CC3: MemberRef:{TypedText c}{LeftParen (}{Placeholder args}{RightParen )} (7) |
Douglas Gregor | 0c431c8 | 2010-08-29 19:27:27 +0000 | [diff] [blame] | 39 | // CHECK-CC3-NOT: NotImplemented:{TypedText Virt}{LeftParen (}{Placeholder args}{RightParen )} |
Douglas Gregor | 8ec904c | 2010-10-19 00:03:23 +0000 | [diff] [blame^] | 40 | // CHECK-CC3: NotImplemented:{TypedText Y}{LeftParen (}{Placeholder args}{RightParen )} (35) |