diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-30 22:15:48 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-30 22:15:48 +0000 |
| commit | 210f29f44b6055c537526f6259d9bff8deb2b7fd (patch) | |
| tree | 24660d05ee3372c698fa3ea578b1ca7d908920b8 /clang/include/clang-c | |
| parent | 913cc3072d0500667444fbfdfed6c43d431d7f3f (diff) | |
| download | bcm5719-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/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index a65bb635b26..4568a764e0e 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -3001,6 +3001,20 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor); */ CINDEX_LINKAGE CXCursor clang_getCanonicalCursor(CXCursor); + +/** + * \brief If the cursor points to a selector identifier in a objc method or + * message expression, this returns the selector index. + * + * After getting a cursor with \see clang_getCursor, this can be called to + * determine if the location points to a selector identifier. + * + * \returns The selector index if the cursor is an objc method or message + * expression and the cursor is pointing to a selector identifier, or -1 + * otherwise. + */ +CINDEX_LINKAGE int clang_Cursor_getObjCSelectorIndex(CXCursor); + /** * @} */ |

