Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Index / index-template-specialization.cpp
blobd50da0f2d63d86806dd688e4f2eaf286eb4302bb
1 template <typename T>
2 class Foo {
3 public:
4 void f(T t) {}
5 };
7 void g() {
8 Foo<int> foo;
9 foo.f(0);
12 template <typename T>
13 struct B {};
15 template <typename T>
16 struct D : B<T> {};
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#
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