blob: dd90083874c9ff0d8d3b660222df8d43ed3a2a30 [file] [log] [blame]
Douglas Gregorb657f112009-09-22 21:11:38 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
Douglas Gregor9c6a0e92009-09-22 15:41:20 +00003void f(float x, float y);
4void f(int i, int j, int k);
5struct X { };
6void f(X);
7namespace N {
8 struct Y {
9 Y(int = 0);
10
11 operator int() const;
12 };
Douglas Gregorb657f112009-09-22 21:11:38 +000013 void f(Y y, int);
Douglas Gregor9c6a0e92009-09-22 15:41:20 +000014}
15typedef N::Y Y;
16void f();
17
18void test() {
Douglas Gregorb657f112009-09-22 21:11:38 +000019 f(Y(), 0, 0);
20 // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s &&
21 // CHECK-CC1: f : 0 : f(<#struct N::Y y#>, <#int#>)
Douglas Gregor9c6a0e92009-09-22 15:41:20 +000022 // CHECK-NEXT-CC1: f : 0 : f(<#int i#>, <#int j#>, <#int k#>)
23 // CHECK-NEXT-CC1: f : 0 : f(<#float x#>, <#float y#>)
Douglas Gregorb657f112009-09-22 21:11:38 +000024 // RUN: clang-cc -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s &&
25 // CHECK-NOT-CC2: f : 0 : f(<#struct N::Y y#>, <#int#>)
26 // CHECK-CC2: f : 0 : f(<#int i#>, <#int j#>, <#int k#>)
27 // CHECK-NEXT-CC2: f : 0 : f(<#float x#>, <#float y#>)
28 // RUN: true
29}