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