summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-30 22:15:48 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-30 22:15:48 +0000
commit210f29f44b6055c537526f6259d9bff8deb2b7fd (patch)
tree24660d05ee3372c698fa3ea578b1ca7d908920b8 /clang/tools/c-index-test/c-index-test.c
parent913cc3072d0500667444fbfdfed6c43d431d7f3f (diff)
downloadbcm5719-llvm-210f29f44b6055c537526f6259d9bff8deb2b7fd.tar.gz
bcm5719-llvm-210f29f44b6055c537526f6259d9bff8deb2b7fd.zip
[libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.
After getting a cursor with clang_getCursor for a particular source location, allows querying the cursor in order to find out if the location points to a selector identifier in an objc method or message expression, and which selector index it is. rdar://11158946 llvm-svn: 153781
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c2
1 files changed, 2 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 e774e78086c..873233575cb 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -1464,6 +1464,8 @@ static int inspect_cursor_at(int argc, const char **argv) {
printf(")");
}
clang_disposeString(Spelling);
+ if (clang_Cursor_getObjCSelectorIndex(Cursor) != -1)
+ printf(" Selector index=%d",clang_Cursor_getObjCSelectorIndex(Cursor));
if (completionString != NULL) {
printf("\nCompletion string: ");
print_completion_string(completionString, stdout);
OpenPOWER on IntegriCloud