| 1 |
namespace std { |
| 2 |
template<typename RandomAccessIterator> |
| 3 |
void sort(RandomAccessIterator first, RandomAccessIterator last); |
| 4 |
|
| 5 |
template<class X, class Y> |
| 6 |
X* dyn_cast(Y *Val); |
| 7 |
} |
| 8 |
|
| 9 |
class Foo { |
| 10 |
public: |
| 11 |
template<typename T> T &getAs(); |
| 12 |
}; |
| 13 |
|
| 14 |
template <typename T, typename U, typename V> |
| 15 |
V doSomething(T t, const U &u, V *v) { return V(); } |
| 16 |
|
| 17 |
void f() { |
| 18 |
std::sort(1, 2); |
| 19 |
Foo().getAs<int>(); |
| 20 |
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s |
| 21 |
// CHECK-CC1: dyn_cast<<#class X#>>(<#Y *Val#>) |
| 22 |
// CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#> |
| 23 |
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-4):9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s |
| 24 |
// CHECK-CC2: getAs<<#typename T#>>() |
| 25 |
// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-6):22 %s -o - | FileCheck -check-prefix=CHECK-CC3 %s |
| 26 |
// CHECK-CC3: [#V#]doSomething(<#T t#>, <#const U &u#>, <#V *v#>) |
| 27 |
} |