index-file.cpp 591 B

1234567891011121314151617181920212223
  1. using MyTypeAlias = int;
  2. extern "C" {
  3. template < typename T > *Allocate() { }
  4. }
  5. // rdar://14063074
  6. namespace rdar14063074 {
  7. template <typename T>
  8. struct TS {};
  9. struct TS<int> {};
  10. template <typename T>
  11. void tfoo() {}
  12. void tfoo<int>() {}
  13. }
  14. // RUN: c-index-test -index-file %s > %t
  15. // RUN: FileCheck %s -input-file=%t
  16. // CHECK: [indexDeclaration]: kind: type-alias | name: MyTypeAlias | {{.*}} | loc: 1:7
  17. // CHECK: [indexDeclaration]: kind: struct-template-spec | name: TS | {{.*}} | loc: 11:8
  18. // CHECK: [indexDeclaration]: kind: function-template-spec | name: tfoo | {{.*}} | loc: 15:6