aboutsummaryrefslogtreecommitdiff
path: root/test/Index/paren-type.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Index/paren-type.c')
-rw-r--r--test/Index/paren-type.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Index/paren-type.c b/test/Index/paren-type.c
new file mode 100644
index 000000000000..14a7785e0580
--- /dev/null
+++ b/test/Index/paren-type.c
@@ -0,0 +1,16 @@
+// RUN: c-index-test -test-print-type %s | FileCheck --check-prefix=CHECK-TYPE %s
+// RUN: c-index-test -test-print-type-declaration %s | FileCheck --check-prefix=CHECK-TYPEDECL %s
+
+// CHECK-TYPE: VarDecl=VariableWithParentheses:
+// CHECK-TYPE-SAME: [type=int] [typekind=Int]
+// CHECK-TYPE-NOT: canonicaltype
+// CHECK-TYPE-SAME: isPOD
+extern int (VariableWithParentheses);
+
+typedef int MyTypedef;
+// CHECK-TYPE: VarDecl=VariableWithParentheses2:
+// CHECK-TYPE-SAME: [type=MyTypedef] [typekind=Typedef]
+// CHECK-TYPE-SAME: [canonicaltype=int] [canonicaltypekind=Int]
+// CHECK-TYPEDECL: VarDecl=VariableWithParentheses2
+// CHECK-TYPEDECL-SAME: [typedeclaration=MyTypedef] [typekind=Typedef]
+extern MyTypedef (VariableWithParentheses2);