aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/clang-c/Index.h8
-rw-r--r--include/clang/AST/ExprObjC.h11
2 files changed, 18 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index 299fa8f98b..2b52c0c89c 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -24,7 +24,7 @@
#include "clang-c/CXString.h"
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 5
+#define CINDEX_VERSION_MINOR 6
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -3197,6 +3197,12 @@ CINDEX_LINKAGE int clang_Cursor_getObjCSelectorIndex(CXCursor);
CINDEX_LINKAGE int clang_Cursor_isDynamicCall(CXCursor C);
/**
+ * \brief Given a cursor pointing to an ObjC message, returns the CXType of the
+ * receiver.
+ */
+CINDEX_LINKAGE CXType clang_Cursor_getReceiverType(CXCursor C);
+
+/**
* \brief Given a cursor that represents a declaration, return the associated
* comment's source range. The range may include multiple consecutive comments
* with whitespace in between.
diff --git a/include/clang/AST/ExprObjC.h b/include/clang/AST/ExprObjC.h
index 748aaa1694..27f5da0ce7 100644
--- a/include/clang/AST/ExprObjC.h
+++ b/include/clang/AST/ExprObjC.h
@@ -1195,6 +1195,17 @@ public:
return SourceLocation();
}
+ /// \brief Retrieve the receiver type to which this message is being directed.
+ ///
+ /// This routine cross-cuts all of the different kinds of message
+ /// sends to determine what the underlying (statically known) type
+ /// of the receiver will be; use \c getReceiverKind() to determine
+ /// whether the message is a class or an instance method, whether it
+ /// is a send to super or not, etc.
+ ///
+ /// \returns The type of the receiver.
+ QualType getReceiverType() const;
+
/// \brief Retrieve the Objective-C interface to which this message
/// is being directed, if known.
///