diff options
Diffstat (limited to 'include/clang-c/Index.h')
-rw-r--r-- | include/clang-c/Index.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 904585f108..8d7d8595bd 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -3543,6 +3543,26 @@ clang_getCompletionAnnotation(CXCompletionString completion_string, unsigned annotation_number); /** + * \brief Retrieve the parent context of the given completion string. + * + * The parent context of a completion string is the semantic parent of + * the declaration (if any) that the code completion represents. For example, + * a code completion for an Objective-C method would have the method's class + * or protocol as its context. + * + * \param completion_string The code completion string whose parent is + * being queried. + * + * \param kind If non-NULL, will be set to the kind of the parent context, + * or CXCursor_NotImplemented if there is no context. + * + * \param Returns the name of the completion parent, e.g., "NSObject" if + * the completion string represents a method in the NSObject class. + */ +CINDEX_LINKAGE CXString +clang_getCompletionParent(CXCompletionString completion_string, + enum CXCursorKind *kind); +/** * \brief Retrieve a completion string for an arbitrary declaration or macro * definition cursor. * |