Richard Smith | 6eece29 | 2015-01-15 02:27:20 +0000 | [diff] [blame] | 1 | // The run lines are below, because this test is line- and |
| 2 | // column-number sensitive. |
| 3 | |
| 4 | namespace N { |
| 5 | template<typename T> struct A { |
| 6 | template<typename U> friend class B; |
| 7 | }; |
| 8 | |
| 9 | template<typename T> struct B { }; |
| 10 | } |
| 11 | |
| 12 | void foo() { |
| 13 | N::A<int> a1; |
| 14 | N::A<int> a2; |
| 15 | } |
| 16 | |
| 17 | namespace M { |
| 18 | template<typename T> struct C { |
| 19 | template<typename U> friend struct C; |
| 20 | }; |
| 21 | } |
| 22 | |
| 23 | void bar() { |
| 24 | M::C<int> c1; |
| 25 | M::C<int> c2; |
| 26 | } |
| 27 | |
| 28 | // RUN: c-index-test -code-completion-at=%s:14:6 %s | FileCheck -check-prefix=CHECK-ACCESS-1 %s |
| 29 | // CHECK-ACCESS-1: ClassTemplate:{TypedText A}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) |
| 30 | // CHECK-ACCESS-1: ClassTemplate:{TypedText B}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) |
| 31 | |
| 32 | // RUN: c-index-test -code-completion-at=%s:25:6 %s | FileCheck -check-prefix=CHECK-ACCESS-2 %s |
| 33 | // CHECK-ACCESS-2: ClassTemplate:{TypedText C}{LeftAngle <}{Placeholder typename T}{RightAngle >} (50) |