diff options
author | Eric Liu <ioeric@google.com> | 2018-07-20 08:08:56 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2018-07-20 08:08:56 +0000 |
commit | 3f7d4073a85d7d8be791ca7f018bd109adda0e0f (patch) | |
tree | e02754b9f16d38f74a7a7207bea35a53eb9604c2 /test/Index | |
parent | 141ca05e332ab0be507a7325313fe230a9506a7a (diff) |
[Index] Set OrigD before D is changed.
Reviewers: akyrtzi, arphaman
Reviewed By: akyrtzi
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D49476
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index')
-rw-r--r-- | test/Index/index-template-specialization.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Index/index-template-specialization.cpp b/test/Index/index-template-specialization.cpp new file mode 100644 index 0000000000..d11754113c --- /dev/null +++ b/test/Index/index-template-specialization.cpp @@ -0,0 +1,19 @@ +template <typename T> +class Foo { +public: + void f(T t) {} +}; + +void g() { + Foo<int> foo; + foo.f(0); +} + +// FIXME: if c-index-test uses OrigD for symbol info, refererences below should +// refer to template specialization decls. +// RUN: env CINDEXTEST_INDEXIMPLICITTEMPLATEINSTANTIATIONS=1 c-index-test -index-file %s | FileCheck %s +// CHECK: [indexDeclaration]: kind: c++-class-template | name: Foo +// CHECK-NEXT: [indexDeclaration]: kind: c++-instance-method | name: f +// CHECK-NEXT: [indexDeclaration]: kind: function | name: g +// CHECK-NEXT: [indexEntityReference]: kind: c++-class-template | name: Foo | USR: c:@ST>1#T@Foo +// CHECK-NEXT: [indexEntityReference]: kind: c++-instance-method | name: f | USR: c:@ST>1#T@Foo@F@f#t0.0# |