Clang Project

clang_source_code/test/Index/paren-type.c
1// RUN: c-index-test -test-print-type %s | FileCheck --check-prefix=CHECK-TYPE %s
2// RUN: c-index-test -test-print-type-declaration %s | FileCheck --check-prefix=CHECK-TYPEDECL %s
3
4// CHECK-TYPE: VarDecl=VariableWithParentheses:
5// CHECK-TYPE-SAME: [type=int] [typekind=Int]
6// CHECK-TYPE-NOT: canonicaltype
7// CHECK-TYPE-SAME: isPOD
8extern int (VariableWithParentheses);
9
10typedef int MyTypedef;
11// CHECK-TYPE: VarDecl=VariableWithParentheses2:
12// CHECK-TYPE-SAME: [type=MyTypedef] [typekind=Typedef]
13// CHECK-TYPE-SAME: [canonicaltype=int] [canonicaltypekind=Int]
14// CHECK-TYPEDECL: VarDecl=VariableWithParentheses2
15// CHECK-TYPEDECL-SAME: [typedeclaration=MyTypedef] [typekind=Typedef]
16extern MyTypedef (VariableWithParentheses2);
17