~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/Index/complete-template-friends-defined.cpp -rw-r--r-- 919 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
24
25
26
27
28
29
30
31
32
33
// The run lines are below, because this test is line- and
// column-number sensitive.

namespace N {
  template<typename T> struct A {
    template<typename U> friend class B;
  };

  template<typename T> struct B { };
}

void foo() {
  N::A<int> a1;
  N::A<int> a2;
}

namespace M {
  template<typename T> struct C {
    template<typename U> friend struct C;
  };
}

void bar() {
  M::C<int> c1;
  M::C<int> c2;
}

// RUN: c-index-test -code-completion-at=%s:14:6 %s | FileCheck -check-prefix=CHECK-ACCESS-1 %s
// CHECK-ACCESS-1: ClassTemplate:{TypedText A}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50)
// CHECK-ACCESS-1: ClassTemplate:{TypedText B}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50)

// RUN: c-index-test -code-completion-at=%s:25:6 %s | FileCheck -check-prefix=CHECK-ACCESS-2 %s
// CHECK-ACCESS-2: ClassTemplate:{TypedText C}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50)