summaryrefslogtreecommitdiffstats
path: root/include/clang-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
commit34ebe1e1b0779bcea2f277bc6b4e9dd98bf70b7b (patch)
tree39f0e1a110cba305b8ac3555c7473327af6f21ae /include/clang-c
parent50651b951c216573175e2145f32df2c4658ba3f9 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index a65bb635b2..4568a764e0 100644
--- a/include/clang-c/Index.h
+++ b/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);
+
/**
* @}
*/