Home | History | Annotate | Download | only in Index
      1 typedef int FooType;
      2 int *p;
      3 int *f(int *p, char *x, FooType z) {
      4   const FooType w = z;
      5   return p + z;
      6 }
      7 typedef double OtherType;
      8 typedef int ArrayType[5];
      9 
     10 // RUN: c-index-test -test-print-typekind %s | FileCheck %s
     11 // CHECK: TypedefDecl=FooType:1:13 (Definition) typekind=Typedef [canonical=Int] [isPOD=1]
     12 // CHECK: VarDecl=p:2:6 typekind=Pointer [isPOD=1]
     13 // CHECK: FunctionDecl=f:3:6 (Definition) typekind=FunctionProto [canonical=FunctionProto] [result=Pointer] [isPOD=0]
     14 // CHECK: ParmDecl=p:3:13 (Definition) typekind=Pointer [isPOD=1]
     15 // CHECK: ParmDecl=x:3:22 (Definition) typekind=Pointer [isPOD=1]
     16 // CHECK: ParmDecl=z:3:33 (Definition) typekind=Typedef [canonical=Int] [isPOD=1]
     17 // CHECK: TypeRef=FooType:1:13 typekind=Typedef [canonical=Int] [isPOD=1]
     18 // CHECK: CompoundStmt= typekind=Invalid [isPOD=0]
     19 // CHECK: DeclStmt= typekind=Invalid [isPOD=0]
     20 // CHECK: VarDecl=w:4:17 (Definition) typekind=Typedef const [canonical=Int] [isPOD=1]
     21 // CHECK: TypeRef=FooType:1:13 typekind=Typedef [canonical=Int] [isPOD=1]
     22 // CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int] [isPOD=1]
     23 // CHECK: ReturnStmt= typekind=Invalid [isPOD=0]
     24 // CHECK: BinaryOperator= typekind=Pointer [isPOD=1]
     25 // CHECK: DeclRefExpr=p:3:13 typekind=Pointer [isPOD=1]
     26 // CHECK: DeclRefExpr=z:3:33 typekind=Typedef [canonical=Int] [isPOD=1]
     27 // CHECK: TypedefDecl=OtherType:7:16 (Definition) typekind=Typedef [canonical=Double] [isPOD=1]
     28 // CHECK: TypedefDecl=ArrayType:8:13 (Definition) typekind=Typedef [canonical=ConstantArray] [isPOD=1]
     29