1 int f(int i, int j = 2, int k = 5);
2 int f(float x, float y...);
3 
4 class A {
5  public:
6   A(int, int, int);
7 };
8 
test()9 void test() {
10   A a(f(1, 2, 3, 4), 2, 3);
11 }
12 
13 
14 namespace NS {
15   struct X { };
16   struct Y { Y(X); };
17   template <class T = int>
18   void g(X, Y);
19 }
20 
test_adl()21 void test_adl() {
22   NS::X x;
23   g(x, x);
24   (void)(f)(1, 2, 3);
25   (void)(test, test, test, f)(1, 2, 3);
26 }
27 
28 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:9 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
29 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:10 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
30 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:17 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
31 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:19 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
32 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:20 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
33 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:10:21 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
34 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:23:7 %s -o - | \
35 // RUN:    FileCheck -check-prefix=CHECK-CC5 %s
36 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:24:13 %s -o - | \
37 // RUN:    FileCheck -check-prefix=CHECK-CC1 %s
38 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:25:31 %s -o - | \
39 // RUN:    FileCheck -check-prefix=CHECK-CC1 %s
40 // CHECK-CC1: OVERLOAD: [#int#]f(<#float x#>, float y)
41 // CHECK-CC1: OVERLOAD: [#int#]f(<#int i#>)
42 // CHECK-CC1-NOT, CHECK-CC2-NOT: OVERLOAD: A(
43 // CHECK-CC2: OVERLOAD: [#int#]f(float x, float y)
44 // CHECK-CC2-NOT: OVERLOAD: [#int#]f(int i)
45 // CHECK-CC3: OVERLOAD: A(<#int#>, int, int)
46 // CHECK-CC3: OVERLOAD: A(<#const A &#>)
47 // CHECK-CC3: OVERLOAD: A(<#A &&#>)
48 // CHECK-CC4: OVERLOAD: A(int, <#int#>, int)
49 // CHECK-CC5: OVERLOAD: [#void#]g(X, <#Y#>)
50