ΒΆint clang_indexTranslationUnit(
    CXIndexAction,
    CXClientData client_data,
    IndexerCallbacks* index_callbacks,
    unsigned int index_callbacks_size,
    unsigned int index_options,
    CXTranslationUnit)

Description

Index the given translation unit via callbacks implemented through #IndexerCallbacks. The order of callback invocations is not guaranteed to be the same as when indexing a source file. The high level order will be: -Preprocessor callbacks invocations -Declaration/reference callbacks invocations -Diagnostic callback invocations The parameters are the same as #clang_indexSourceFile.

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

Parameters

CXIndexAction
CXClientData client_data
IndexerCallbacks* index_callbacks
unsigned int index_callbacks_size
unsigned int index_options
CXTranslationUnit

Returns

If there is a failure from which there is no recovery, returns non-zero, otherwise returns 0.