aboutsummaryrefslogtreecommitdiff
path: root/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-01 02:01:34 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-11-01 02:01:34 +0000
commite4a990f34904eb572c8d6aa1deef19465214359c (patch)
tree9c7bf79a737d86e06432da8272545c1faf6858af /tools/c-index-test/c-index-test.c
parent3cdd84318a3ae43fa31da849f1a6d3eeb8a39d2d (diff)
[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType for
the receiver of an ObjC message expression. rdar://12578643 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/c-index-test/c-index-test.c')
-rw-r--r--tools/c-index-test/c-index-test.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/c-index-test/c-index-test.c b/tools/c-index-test/c-index-test.c
index 2df2e4be3e..3e4404cbaa 100644
--- a/tools/c-index-test/c-index-test.c
+++ b/tools/c-index-test/c-index-test.c
@@ -1955,6 +1955,12 @@ static int inspect_cursor_at(int argc, const char **argv) {
printf(" Selector index=%d",clang_Cursor_getObjCSelectorIndex(Cursor));
if (clang_Cursor_isDynamicCall(Cursor))
printf(" Dynamic-call");
+ if (Cursor.kind == CXCursor_ObjCMessageExpr) {
+ CXType T = clang_Cursor_getReceiverType(Cursor);
+ CXString S = clang_getTypeKindSpelling(T.kind);
+ printf(" Receiver-type=%s", clang_getCString(S));
+ clang_disposeString(S);
+ }
{
CXModule mod = clang_Cursor_getModule(Cursor);