summaryrefslogtreecommitdiff
path: root/test/Index/print-type.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-07-23 17:36:21 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-07-23 17:36:21 +0000
commit4c4f6fe2a6d6b3ffd0ce114cb8099366662b67f7 (patch)
tree4a1b455eb8fe68c635b9c90b4c13a17246c127f3 /test/Index/print-type.cpp
parentd732928074294839feebc3b8f00fbf5922d271ba (diff)
downloadclang-4c4f6fe2a6d6b3ffd0ce114cb8099366662b67f7.tar.gz
[libclang] Expose the rest of the array types.
Patch by Che-Liang Chiou! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186967 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/print-type.cpp')
-rw-r--r--test/Index/print-type.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp
index 49a05fbbdb..5a9a06cfe5 100644
--- a/test/Index/print-type.cpp
+++ b/test/Index/print-type.cpp
@@ -29,6 +29,11 @@ T tbar(int);
template <typename T>
T tbar(int[5]);
+template <typename T, int size>
+T tbar(int[size]);
+
+void foo(int i, int incomplete_array[]) { int variable_array[i]; }
+
// RUN: c-index-test -test-print-type %s | FileCheck %s
// CHECK: Namespace=outer:1:11 (Definition) [type=] [typekind=Invalid] [isPOD=0]
// CHECK: ClassTemplate=Foo:4:8 (Definition) [type=] [typekind=Invalid] [isPOD=0]
@@ -64,3 +69,7 @@ T tbar(int[5]);
// CHECK: TemplateTypeParameter=T:26:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
// CHECK: FunctionTemplate=tbar:30:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
// CHECK: ParmDecl=:30:11 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
+// CHECK: FunctionTemplate=tbar:33:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
+// CHECK: ParmDecl=:33:11 (Definition) [type=int [size]] [typekind=DependentSizedArray] [isPOD=0]
+// CHECK: ParmDecl=incomplete_array:35:21 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1]
+// CHECK: VarDecl=variable_array:35:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1]