From c0fadbc7d9d4602ac41433225958fb5e22217c97 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205921 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/c-index-test/c-index-test.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/c-index-test') diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c index 6a48196a45..461765c13a 100644 --- a/tools/c-index-test/c-index-test.c +++ b/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