xref: /minix3/external/bsd/llvm/dist/clang/test/Index/index-file.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 using MyTypeAlias = int;
2 
3 extern "C" {
Allocate()4   template < typename T > *Allocate() { }
5 }
6 
7 // rdar://14063074
8 namespace rdar14063074 {
9 template <typename T>
10 struct TS {};
11 struct TS<int> {};
12 
13 template <typename T>
tfoo()14 void tfoo() {}
15 void tfoo<int>() {}
16 }
17 
18 // RUN: c-index-test -index-file %s > %t
19 // RUN: FileCheck %s -input-file=%t
20 
21 // CHECK: [indexDeclaration]: kind: type-alias | name: MyTypeAlias | {{.*}} | loc: 1:7
22 // CHECK: [indexDeclaration]: kind: struct-template-spec | name: TS | {{.*}} | loc: 11:8
23 // CHECK: [indexDeclaration]: kind: function-template-spec | name: tfoo | {{.*}} | loc: 15:6
24