clang_getCursor

\brief Map a source location to the cursor that describes the entity at that location in the source code.

clang_getCursor() maps an arbitrary source location within a translation unit down to the most specific cursor that describes the entity at that location. For example, given an expression \c x + y, invoking clang_getCursor() with a source location pointing to "x" will return the cursor for "x"; similarly for "y". If the cursor points anywhere between "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor() will return a cursor referring to the "+" expression.

\returns a cursor representing the entity at the given source location, or a NULL cursor if no such entity can be found.

extern (C)
clang_getCursor
(
CXTranslationUnit
,
)

Meta