From 38dbad233bfc7906e38e028707ffe5925b9ca46c Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 18 Apr 2013 23:29:12 +0000 Subject: [libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC Qualifiers' written next to the return and parameter types in an ObjC method declarations. rdar://13676977 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179816 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/c-index-test/c-index-test.c | 16 ++++++++++++++++ 1 file changed, 16 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 ab022a9d98..b8664ed75a 100644 --- a/tools/c-index-test/c-index-test.c +++ b/tools/c-index-test/c-index-test.c @@ -809,6 +809,22 @@ static void PrintCursor(CXCursor Cursor, printf("]"); } } + + { + unsigned QT = clang_Cursor_getObjCDeclQualifiers(Cursor); + if (QT != CXObjCDeclQualifier_None) { + printf(" ["); + #define PRINT_OBJC_QUAL(A) \ + if (QT & CXObjCDeclQualifier_##A) printf(#A ",") + PRINT_OBJC_QUAL(In); + PRINT_OBJC_QUAL(Inout); + PRINT_OBJC_QUAL(Out); + PRINT_OBJC_QUAL(Bycopy); + PRINT_OBJC_QUAL(Byref); + PRINT_OBJC_QUAL(Oneway); + printf("]"); + } + } } } -- cgit v1.2.3