~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/CodeCompletion/function-templates.cpp -rw-r--r-- 693 bytes
461e0617Itoh Shimon re-enable tests. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace std {
  template<typename RandomAccessIterator>
  void sort(RandomAccessIterator first, RandomAccessIterator last);
  
  template<class X, class Y>
  X* dyn_cast(Y *Val);
}

class Foo {
public:
  template<typename T> T &getAs();
};

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