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 void f() { 15 std::sort(1, 2); 16 Foo().getAs<int>(); 17 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:15:8 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s 18 // CHECK-CC1: dyn_cast<<#class X#>>(<#Y *Val#>) 19 // CHECK-CC1: sort(<#RandomAccessIterator first#>, <#RandomAccessIterator last#> 20 // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:16:9 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s 21 // CHECK-CC2: getAs<<#typename T#>>() 22 ) 23 24