ΒΆCXResult clang_findReferencesInFile(
    CXCursor cursor,
    CXFile file,
    CXCursorAndRangeVisitor visitor)

Description

Find references of a declaration in a specific file.

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

Parameters

CXCursor cursor
pointing to a declaration or a reference of one.
CXFile file
to search for references.
CXCursorAndRangeVisitor visitor
callback that will receive pairs of CXCursor/CXSourceRange for each reference found. The CXSourceRange will point inside the file; if the reference is inside a macro (and not a macro argument) the CXSourceRange will be invalid.

Returns

one of the CXResult enumerators.