1*f4a2713aSLionel Sambuc // Note: the run lines follow their respective tests, since line/column
2*f4a2713aSLionel Sambuc // matter in this test.
3*f4a2713aSLionel Sambuc void f(float x, float y);
4*f4a2713aSLionel Sambuc void f(int i, int j, int k);
5*f4a2713aSLionel Sambuc struct X { };
6*f4a2713aSLionel Sambuc void f(X);
7*f4a2713aSLionel Sambuc namespace N {
8*f4a2713aSLionel Sambuc struct Y {
9*f4a2713aSLionel Sambuc Y(int = 0);
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambuc operator int() const;
12*f4a2713aSLionel Sambuc };
13*f4a2713aSLionel Sambuc void f(Y y, int ZZ);
14*f4a2713aSLionel Sambuc }
15*f4a2713aSLionel Sambuc typedef N::Y Y;
16*f4a2713aSLionel Sambuc void f();
17*f4a2713aSLionel Sambuc
test()18*f4a2713aSLionel Sambuc void test() {
19*f4a2713aSLionel Sambuc f(Y(), 0, 0);
20*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
21*f4a2713aSLionel Sambuc // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
22*f4a2713aSLionel Sambuc // CHECK-CC1: f(N::Y y, <#int ZZ#>)
23*f4a2713aSLionel Sambuc // CHECK-CC1-NEXT: f(int i, <#int j#>, int k)
24*f4a2713aSLionel Sambuc // CHECK-CC1-NEXT: f(float x, <#float y#>)
25*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
26*f4a2713aSLionel Sambuc // CHECK-CC2-NOT: f(N::Y y, int ZZ)
27*f4a2713aSLionel Sambuc // CHECK-CC2: f(int i, int j, <#int k#>)
28*f4a2713aSLionel Sambuc }
29