1 template <int, char y
> float overloaded(int);
2 template <class, int x
> bool overloaded(char);
4 auto m
= overloaded
<1, 2>(0);
5 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:21 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
6 // CHECK-CC1: OPENING_PAREN_LOC: {{.*}}4:20
7 // CHECK-CC1-DAG: OVERLOAD: [#float#]overloaded<<#int#>, char y>[#()#]
8 // CHECK-CC1-DAG: OVERLOAD: [#bool#]overloaded<<#class#>, int x>[#()#]
9 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:4:24 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
10 // CHECK-CC2-NOT: OVERLOAD: {{.*}}int x
11 // CHECK-CC2: OVERLOAD: [#float#]overloaded<int, <#char y#>>[#()#]
13 template <class T
, T
... args
> int n
= 0;
14 int val
= n
<int, 1, 2, 3>;
15 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:14:18 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s
16 // CHECK-CC3: OVERLOAD: [#int#]n<class T, <#T ...args#>>
17 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:14:24 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
18 // CHECK-CC4: OVERLOAD: [#int#]n<class T, T ...args>
20 template <typename
> struct Vector
{};
21 template <typename Element
, template <typename E
> class Container
= Vector
>
22 struct Collection
{ Container
<Element
> container
; };
23 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:22:31 %s -o - | FileCheck -check-prefix=CHECK-CC5 %s
24 // CHECK-CC5: OVERLOAD: [#class#]Container<<#typename E#>>
25 Collection
<int, Vector
> collection
;
26 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:25:12 %s -o - | FileCheck -check-prefix=CHECK-CC6 %s
27 // CHECK-CC6: OVERLOAD: [#struct#]Collection<<#typename Element#>>