blob: 49f94e40d2452e1e96db3b18a3e7e2715c1a8c14 [file] [log] [blame]
Douglas Gregorf6961522010-08-27 21:18:54 +00001// The run lines are below, because this test is line- and
2// column-number sensitive.
3
4struct A {
5 virtual void foo(int x, int y);
6 virtual void bar(double x);
7 virtual void bar(float x);
8};
9
10struct B : A {
11 void foo(int a, int b);
12 void bar(float real);
13};
14
15void B::foo(int a, int b) {
16 A::foo(a, b);
17}
18
19void B::bar(float real) {
20 A::bar(real);
21}
22
23// RUN: c-index-test -code-completion-at=%s:16:3 %s | FileCheck -check-prefix=CHECK-FOO-UNQUAL %s
24// CHECK-FOO-UNQUAL: CXXMethod:{Text A::}{TypedText foo}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (8)
25
26// RUN: c-index-test -code-completion-at=%s:20:3 %s | FileCheck -check-prefix=CHECK-BAR-UNQUAL %s
27// CHECK-BAR-UNQUAL: CXXMethod:{Text A::}{TypedText bar}{LeftParen (}{Placeholder real}{RightParen )} (8)
Douglas Gregore8d7beb2010-09-03 23:30:36 +000028// CHECK-BAR-UNQUAL: CXXMethod:{ResultType void}{TypedText bar}{LeftParen (}{Placeholder float real}{RightParen )} (14)
29// CHECK-BAR-UNQUAL: CXXMethod:{ResultType void}{Text A::}{TypedText bar}{LeftParen (}{Placeholder double x}{RightParen )} (16)
Douglas Gregorf6961522010-08-27 21:18:54 +000030
31// RUN: c-index-test -code-completion-at=%s:16:6 %s | FileCheck -check-prefix=CHECK-FOO-QUAL %s
32// CHECK-FOO-QUAL: CXXMethod:{TypedText foo}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (8)
33