blob: 79a9965d4d85c1d4bf705ac08c63e46dc3d28105 [file] [log] [blame]
Ted Kremenek8e0ac172010-05-14 21:29:26 +00001typedef int FooType;
2int *p;
3int *f(int *p, char *x, FooType z) {
4 FooType w = z;
5 return p + z;
6}
7
8// RUN: c-index-test -test-print-typekind %s | FileCheck %s
9// CHECK: TypedefDecl=FooType:1:13 (Definition) typekind=Typedef [canonical=Int]
10// CHECK: VarDecl=p:2:6 typekind=Pointer
11// CHECK: FunctionDecl=f:3:6 (Definition) typekind=Unexposed [canonical=Unexposed]
12// CHECK: ParmDecl=p:3:13 (Definition) typekind=Pointer
13// CHECK: ParmDecl=x:3:22 (Definition) typekind=Pointer
14// CHECK: ParmDecl=z:3:33 (Definition) typekind=Typedef [canonical=Int]
15// CHECK: VarDecl=w:4:11 (Definition) typekind=Typedef [canonical=Int]
16// CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int]
17// CHECK: UnexposedExpr= typekind=Pointer
18// CHECK: DeclRefExpr=p:3:13 typekind=Pointer
19// CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int]
20