Ted Kremenek | 8e0ac17 | 2010-05-14 21:29:26 +0000 | [diff] [blame] | 1 | typedef int FooType; |
| 2 | int *p; |
| 3 | int *f(int *p, char *x, FooType z) { |
| 4 | FooType w = z; |
| 5 | return p + z; |
| 6 | } |
Douglas Gregor | fbcfeea | 2011-01-24 18:44:28 +0000 | [diff] [blame^] | 7 | typedef double OtherType; |
Ted Kremenek | 8e0ac17 | 2010-05-14 21:29:26 +0000 | [diff] [blame] | 8 | |
| 9 | // RUN: c-index-test -test-print-typekind %s | FileCheck %s |
Ted Kremenek | 3ce9e7d | 2010-07-30 00:14:11 +0000 | [diff] [blame] | 10 | // CHECK: TypedefDecl=FooType:1:13 (Definition) typekind=Typedef [canonical=Int] [isPOD=1] |
| 11 | // CHECK: VarDecl=p:2:6 typekind=Pointer [isPOD=1] |
| 12 | // CHECK: FunctionDecl=f:3:6 (Definition) typekind=FunctionProto [canonical=FunctionProto] [result=Pointer] [isPOD=0] |
| 13 | // CHECK: ParmDecl=p:3:13 (Definition) typekind=Pointer [isPOD=1] |
| 14 | // CHECK: ParmDecl=x:3:22 (Definition) typekind=Pointer [isPOD=1] |
| 15 | // CHECK: ParmDecl=z:3:33 (Definition) typekind=Typedef [canonical=Int] [isPOD=1] |
Douglas Gregor | 3f0fee3 | 2010-10-02 21:57:58 +0000 | [diff] [blame] | 16 | // CHECK: TypeRef=FooType:1:13 typekind=Typedef [canonical=Int] [isPOD=1] |
Ted Kremenek | 3ce9e7d | 2010-07-30 00:14:11 +0000 | [diff] [blame] | 17 | // CHECK: UnexposedStmt= typekind=Invalid [isPOD=0] |
| 18 | // CHECK: UnexposedStmt= typekind=Invalid [isPOD=0] |
| 19 | // CHECK: VarDecl=w:4:11 (Definition) typekind=Typedef [canonical=Int] [isPOD=1] |
Douglas Gregor | 3f0fee3 | 2010-10-02 21:57:58 +0000 | [diff] [blame] | 20 | // CHECK: TypeRef=FooType:1:13 typekind=Typedef [canonical=Int] [isPOD=1] |
Ted Kremenek | 3ce9e7d | 2010-07-30 00:14:11 +0000 | [diff] [blame] | 21 | // CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int] [isPOD=1] |
| 22 | // CHECK: UnexposedStmt= typekind=Invalid [isPOD=0] |
| 23 | // CHECK: UnexposedExpr= typekind=Pointer [isPOD=1] |
| 24 | // CHECK: DeclRefExpr=p:3:13 typekind=Pointer [isPOD=1] |
| 25 | // CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int] [isPOD=1] |
Douglas Gregor | fbcfeea | 2011-01-24 18:44:28 +0000 | [diff] [blame^] | 26 | // CHECK: TypedefDecl=OtherType:7:16 (Definition) typekind=Typedef [canonical=Double] [isPOD=1] |
Ted Kremenek | 8e0ac17 | 2010-05-14 21:29:26 +0000 | [diff] [blame] | 27 | |