ΒΆCXString clang_getCompletionParent(
    CXCompletionString completion_string,
    enum CXCursorKind* kind)

Description

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.

Declared at: clang/include/clang-c/Index.h:5521

Parameters

CXCompletionString completion_string
The code completion string whose parent is being queried.
enum CXCursorKind* kind
DEPRECATED: always set to CXCursor_NotImplemented if non-NULL.

Returns

The name of the completion parent, e.g., "NSObject" if the completion string represents a method in the NSObject class.