| 1 |
// Note: the run lines follow their respective tests, since line/column |
| 2 |
// matter in this test. |
| 3 |
|
| 4 |
template <int...> struct B {}; |
| 5 |
template <int> class C; |
| 6 |
|
| 7 |
namespace method { |
| 8 |
struct S { |
| 9 |
template <int Z> |
| 10 |
void waldo(C<Z>); |
| 11 |
|
| 12 |
template <int... Is, int Z> |
| 13 |
void waldo(B<Is...>, C<Z>); |
| 14 |
}; |
| 15 |
|
| 16 |
void foo() { |
| 17 |
S().waldo(/*invoke completion here*/); |
| 18 |
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):15 %s -o - | FileCheck -check-prefix=CHECK-METHOD %s |
| 19 |
// CHECK-METHOD-LABEL: OPENING_PAREN_LOC: |
| 20 |
// CHECK-METHOD-NEXT: OVERLOAD: [#void#]waldo(<#C<Z>#>) |
| 21 |
// CHECK-METHOD-NEXT: OVERLOAD: [#void#]waldo(<#B<>#>, C<Z>) |
| 22 |
} |
| 23 |
} // namespace method |
| 24 |
namespace function { |
| 25 |
template <int Z> |
| 26 |
void waldo(C<Z>); |
| 27 |
|
| 28 |
template <int... Is, int Z> |
| 29 |
void waldo(B<Is...>, C<Z>); |
| 30 |
|
| 31 |
void foo() { |
| 32 |
waldo(/*invoke completion here*/); |
| 33 |
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-1):11 %s -o - | FileCheck -check-prefix=CHECK-FUNC %s |
| 34 |
// CHECK-FUNC-LABEL: OPENING_PAREN_LOC: |
| 35 |
// CHECK-FUNC-NEXT: OVERLOAD: [#void#]waldo(<#B<>#>, C<Z>) |
| 36 |
// CHECK-FUNC-NEXT: OVERLOAD: [#void#]waldo(<#C<Z>#>) |
| 37 |
} |
| 38 |
} // namespace function |