diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-10-11 19:58:38 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-10-11 19:58:38 +0000 |
commit | 659837e0ce0f73c7fdd5941854be3500db2f4013 (patch) | |
tree | e554d7dbe056decd00ae557bae3a0ee0991f9e5d /tools/c-index-test | |
parent | 1d82b1a33bcfe85f4834fb6920517ed07e9355d3 (diff) | |
download | clang-659837e0ce0f73c7fdd5941854be3500db2f4013.tar.gz clang-659837e0ce0f73c7fdd5941854be3500db2f4013.tar.bz2 clang-659837e0ce0f73c7fdd5941854be3500db2f4013.tar.xz |
[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ref-qualifier information of function type.
Patch by Che-Liang Chiou!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/c-index-test')
-rw-r--r-- | tools/c-index-test/c-index-test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c index 2e8b58bff4..90a65282f4 100644 --- a/tools/c-index-test/c-index-test.c +++ b/tools/c-index-test/c-index-test.c @@ -1160,6 +1160,7 @@ static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p, CXClientData d) { if (!clang_isInvalid(clang_getCursorKind(cursor))) { CXType T = clang_getCursorType(cursor); + enum CXRefQualifierKind RQ = clang_Type_getCXXRefQualifier(T); PrintCursor(cursor, NULL); PrintTypeAndTypeKind(T, " [type=%s] [typekind=%s]"); if (clang_isConstQualifiedType(T)) @@ -1168,6 +1169,10 @@ static enum CXChildVisitResult PrintType(CXCursor cursor, CXCursor p, printf(" volatile"); if (clang_isRestrictQualifiedType(T)) printf(" restrict"); + if (RQ == CXRefQualifier_LValue) + printf(" lvalue-ref-qualifier"); + if (RQ == CXRefQualifier_RValue) + printf(" rvalue-ref-qualifier"); /* Print the canonical type if it is different. */ { CXType CT = clang_getCanonicalType(T); |