From ddce74f6f8a73e89c7da9272ecec7a3b585ff04d Mon Sep 17 00:00:00 2001 From: Anders Waldenborg Date: Wed, 9 Apr 2014 19:16:08 +0000 Subject: 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 --- clang/tools/c-index-test/c-index-test.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/tools/c-index-test/c-index-test.c') diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 6a48196a45c..461765c13a8 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"); } -- cgit v1.2.3