blob: 40a72ba83602258469d30c05966bbf27ef2739fc [file] [log] [blame]
Douglas Gregorea9b03e2009-09-22 21:11:38 +00001// Note: the run lines follow their respective tests, since line/column
2// matter in this test.
Douglas Gregorcabea402009-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 Gregor05f477c2009-09-23 00:16:58 +000013 void f(Y y, int ZZ);
Douglas Gregorcabea402009-09-22 15:41:20 +000014}
15typedef N::Y Y;
16void f();
17
18void test() {
Douglas Gregorea9b03e2009-09-22 21:11:38 +000019 f(Y(), 0, 0);
Tim Northover19ae1172013-08-12 12:51:05 +000020 // RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:19:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
Douglas Gregorf4c33342010-05-28 00:22:41 +000021 // CHECK-CC1: COMPLETION: Pattern : dynamic_cast<<#type#>>(<#expression#>)
John McCall85f90552010-03-10 11:27:22 +000022 // CHECK-CC1: f(N::Y y, <#int ZZ#>)
Douglas Gregor2a920012009-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#>)
Tim Northover19ae1172013-08-12 12:51:05 +000025 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:19:13 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
John McCall85f90552010-03-10 11:27:22 +000026 // CHECK-CC2-NOT: f(N::Y y, int ZZ)
Douglas Gregorf0f51982009-09-23 00:34:09 +000027 // CHECK-CC2: f(int i, int j, <#int k#>)
Douglas Gregorea9b03e2009-09-22 21:11:38 +000028}