aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2014-04-09 19:16:08 +0000
committerAnders Waldenborg <anders@0x63.nu>2014-04-09 19:16:08 +0000
commitddce74f6f8a73e89c7da9272ecec7a3b585ff04d (patch)
treee52e4c8dbf28072c18c3e3078869d571f057dc88 /clang/tools/c-index-test/c-index-test.c
parent0e011f201d2305630eef47510048378e55010d34 (diff)
downloadllvm-ddce74f6f8a73e89c7da9272ecec7a3b585ff04d.zip
llvm-ddce74f6f8a73e89c7da9272ecec7a3b585ff04d.tar.gz
llvm-ddce74f6f8a73e89c7da9272ecec7a3b585ff04d.tar.bz2
Make c-index-test -test-print-type include pointeekind for pointer types
The idea is to give visibility to more type kinds, especially for getting a better grasp of what appears as unexposed type kind with libclang. Differential Revision: http://reviews.llvm.org/D3325 llvm-svn: 205921
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 6a48196..461765c 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -1295,6 +1295,13 @@ static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p,
}
/* Print if this is a non-POD type. */
printf(" [isPOD=%d]", clang_isPODType(T));
+ /* Print the pointee type. */
+ {
+ CXType PT = clang_getPointeeType(T);
+ if (PT.kind != CXType_Invalid) {
+ PrintTypeAndTypeKind(PT, " [pointeetype=%s] [pointeekind=%s]");
+ }
+ }
printf("\n");
}