1 template <typename T>
2 class Foo {
3 public:
f(T t)4 void f(T t) {}
5 };
6
g()7 void g() {
8 Foo<int> foo;
9 foo.f(0);
10 }
11
12 template <typename T>
13 struct B {};
14
15 template <typename T>
16 struct D : B<T> {};
17
18 // FIXME: if c-index-test uses OrigD for symbol info, refererences below should
19 // refer to template specialization decls.
20 // RUN: env CINDEXTEST_INDEXIMPLICITTEMPLATEINSTANTIATIONS=1 c-index-test -index-file %s | FileCheck %s
21 // CHECK: [indexDeclaration]: kind: c++-class-template | name: Foo
22 // CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: f
23 // CHECK-NEXT: [indexDeclaration]: kind: function | name: g
24 // CHECK-NEXT: [indexEntityReference]: kind: c++-class-template | name: Foo | USR: c:@ST>1#T@Foo
25 // CHECK-NEXT: [indexEntityReference]: kind: c++-instance-method | name: f | USR: c:@ST>1#T@Foo@F@f#t0.0#
26
27 // CHECK: [indexDeclaration]: kind: c++-class-template | name: D
28 // CHECK-NEXT: <base>: kind: c++-class-template | name: B
29 // CHECK-NEXT: [indexEntityReference]: kind: c++-class-template | name: B
30