blob: f06470f4cbe738afa84058a93f8e2183bb838413 [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 Gregor05944382009-09-23 00:16:58 +000013 void f(Y y, int ZZ);
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);
Douglas Gregoref9b1492010-11-09 20:03:54 +000020 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CC1 %s
Douglas Gregorc8bddde2010-05-28 00:22:41 +000021 // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
John McCall7c2342d2010-03-10 11:27:22 +000022 // CHECK-CC1: f(N::Y y, <#int ZZ#>)
Douglas Gregor5bd1a112009-09-23 14:56:09 +000023 // CHECK-CC1-NEXT: f(int i, <#int j#>, int k)
24 // CHECK-CC1-NEXT: f(float x, <#float y#>)
Douglas Gregoref9b1492010-11-09 20:03:54 +000025 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CC2 %s
John McCall7c2342d2010-03-10 11:27:22 +000026 // CHECK-CC2-NOT: f(N::Y y, int ZZ)
Douglas Gregor86d802e2009-09-23 00:34:09 +000027 // CHECK-CC2: f(int i, int j, <#int k#>)
Douglas Gregorb657f112009-09-22 21:11:38 +000028}