1*f4a2713aSLionel Sambuc // The run lines are below, because this test is line- and
2*f4a2713aSLionel Sambuc // column-number sensitive.
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc struct A {
5*f4a2713aSLionel Sambuc virtual void foo(int x, int y);
6*f4a2713aSLionel Sambuc virtual void bar(double x);
7*f4a2713aSLionel Sambuc virtual void bar(float x);
8*f4a2713aSLionel Sambuc };
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc struct B : A {
11*f4a2713aSLionel Sambuc void foo(int a, int b);
12*f4a2713aSLionel Sambuc void bar(float real);
13*f4a2713aSLionel Sambuc };
14*f4a2713aSLionel Sambuc
foo(int a,int b)15*f4a2713aSLionel Sambuc void B::foo(int a, int b) {
16*f4a2713aSLionel Sambuc A::foo(a, b);
17*f4a2713aSLionel Sambuc }
18*f4a2713aSLionel Sambuc
bar(float real)19*f4a2713aSLionel Sambuc void B::bar(float real) {
20*f4a2713aSLionel Sambuc A::bar(real);
21*f4a2713aSLionel Sambuc }
22*f4a2713aSLionel Sambuc
23*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:16:3 %s | FileCheck -check-prefix=CHECK-FOO-UNQUAL %s
24*f4a2713aSLionel Sambuc // CHECK-FOO-UNQUAL: CXXMethod:{Text A::}{TypedText foo}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (20)
25*f4a2713aSLionel Sambuc
26*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:20:3 %s | FileCheck -check-prefix=CHECK-BAR-UNQUAL %s
27*f4a2713aSLionel Sambuc // CHECK-BAR-UNQUAL: CXXMethod:{Text A::}{TypedText bar}{LeftParen (}{Placeholder real}{RightParen )} (20)
28*f4a2713aSLionel Sambuc // CHECK-BAR-UNQUAL: CXXMethod:{ResultType void}{TypedText bar}{LeftParen (}{Placeholder float real}{RightParen )} (34)
29*f4a2713aSLionel Sambuc // CHECK-BAR-UNQUAL: CXXMethod:{ResultType void}{Text A::}{TypedText bar}{LeftParen (}{Placeholder double x}{RightParen )} (36)
30*f4a2713aSLionel Sambuc
31*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:16:6 %s | FileCheck -check-prefix=CHECK-FOO-QUAL %s
32*f4a2713aSLionel Sambuc // CHECK-FOO-QUAL: CXXMethod:{TypedText foo}{LeftParen (}{Placeholder a}{Comma , }{Placeholder b}{RightParen )} (20)
33*f4a2713aSLionel Sambuc
34*f4a2713aSLionel Sambuc // RUN: c-index-test -code-completion-at=%s:5:1 %s | FileCheck -check-prefix=CHECK-ACCESS %s
35*f4a2713aSLionel Sambuc // CHECK-ACCESS: NotImplemented:{TypedText private} (40)
36*f4a2713aSLionel Sambuc // CHECK-ACCESS: NotImplemented:{TypedText protected} (40)
37*f4a2713aSLionel Sambuc // CHECK-ACCESS: NotImplemented:{TypedText public} (40)
38*f4a2713aSLionel Sambuc
39*f4a2713aSLionel Sambuc // RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:5:1 %s | FileCheck -check-prefix=CHECK-ACCESS-PATTERN %s
40*f4a2713aSLionel Sambuc // CHECK-ACCESS-PATTERN: NotImplemented:{TypedText private}{Colon :} (40)
41*f4a2713aSLionel Sambuc // CHECK-ACCESS-PATTERN: NotImplemented:{TypedText protected}{Colon :} (40)
42*f4a2713aSLionel Sambuc // CHECK-ACCESS-PATTERN: NotImplemented:{TypedText public}{Colon :} (40)
43