diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-27 16:27:11 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-27 16:27:11 +0000 |
commit | 56a6380cb734a98e489940933ed590396f8e7402 (patch) | |
tree | c5500db0417ce2e5520baca739803bdc23383698 /clang/tools/c-index-test/c-index-test.c | |
parent | add754a02edaa7ab44ce1e0ed731fdf1739133ec (diff) | |
download | llvm-56a6380cb734a98e489940933ed590396f8e7402.zip llvm-56a6380cb734a98e489940933ed590396f8e7402.tar.gz llvm-56a6380cb734a98e489940933ed590396f8e7402.tar.bz2 |
Add libclang functions to determine the const/volatile/restrict
qualifiers on a CXType. Patch from Stefan Seefeld, test by me.
llvm-svn: 124377
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 6 |
1 files changed, 6 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 7238f4a..be3a0795 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -568,6 +568,12 @@ static enum CXChildVisitResult PrintTypeKind(CXCursor cursor, CXCursor p, CXString S = clang_getTypeKindSpelling(T.kind); PrintCursor(cursor); printf(" typekind=%s", clang_getCString(S)); + if (clang_isConstQualifiedType(T)) + printf(" const"); + if (clang_isVolatileQualifiedType(T)) + printf(" volatile"); + if (clang_isRestrictQualifiedType(T)) + printf(" restrict"); clang_disposeString(S); /* Print the canonical type if it is different. */ { |