diff options
author | Anders Waldenborg <anders@0x63.nu> | 2014-04-09 19:16:08 +0000 |
---|---|---|
committer | Anders Waldenborg <anders@0x63.nu> | 2014-04-09 19:16:08 +0000 |
commit | c0fadbc7d9d4602ac41433225958fb5e22217c97 (patch) | |
tree | b19d7e12f3b01ab2f1de40f6aa7fb1525efd35a8 /tools/c-index-test | |
parent | 1768205cd3c719373048f06d3f79a7f8048d3a93 (diff) | |
download | clang-c0fadbc7d9d4602ac41433225958fb5e22217c97.tar.gz clang-c0fadbc7d9d4602ac41433225958fb5e22217c97.tar.bz2 clang-c0fadbc7d9d4602ac41433225958fb5e22217c97.tar.xz |
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
Diffstat (limited to 'tools/c-index-test')
-rw-r--r-- | tools/c-index-test/c-index-test.c | 7 |
1 files changed, 7 insertions, 0 deletions
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"); } |