ΒΆCXSourceRange clang_getCursorReferenceNameRange(
    CXCursor C,
    unsigned int NameFlags,
    unsigned int PieceIndex)

Description

Given a cursor that references something else, return the source range covering that reference.

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

Parameters

CXCursor C
A cursor pointing to a member reference, a declaration reference, or an operator call.
unsigned int NameFlags
A bitset with three independent flags: CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and CXNameRange_WantSinglePiece.
unsigned int PieceIndex
For contiguous names or when passing the flag CXNameRange_WantSinglePiece, only one piece with index 0 is available. When the CXNameRange_WantSinglePiece flag is not passed for a non-contiguous names, this index can be used to retrieve the individual pieces of the name. See also CXNameRange_WantSinglePiece.

Returns

The piece of the name pointed to by the given cursor. If there is no name, or if the PieceIndex is out-of-range, a null-cursor will be returned.