clang
7.0.0svn
|
![]() |
Classes | |
struct | CXCursorAndRangeVisitor |
struct | CXIdxLoc |
Source location passed to index callbacks. More... | |
struct | CXIdxIncludedFileInfo |
Data for ppIncludedFile callback. More... | |
struct | CXIdxImportedASTFileInfo |
Data for IndexerCallbacks::importedASTFile. More... | |
struct | CXIdxAttrInfo |
struct | CXIdxEntityInfo |
struct | CXIdxContainerInfo |
struct | CXIdxIBOutletCollectionAttrInfo |
struct | CXIdxDeclInfo |
struct | CXIdxObjCContainerDeclInfo |
struct | CXIdxBaseClassInfo |
struct | CXIdxObjCProtocolRefInfo |
struct | CXIdxObjCProtocolRefListInfo |
struct | CXIdxObjCInterfaceDeclInfo |
struct | CXIdxObjCCategoryDeclInfo |
struct | CXIdxObjCPropertyDeclInfo |
struct | CXIdxCXXClassDeclInfo |
struct | CXIdxEntityRefInfo |
Data for IndexerCallbacks::indexEntityReference. More... | |
struct | IndexerCallbacks |
A group of callbacks used by clang_indexSourceFile and clang_indexTranslationUnit. More... | |
Typedefs | |
typedef struct CXCursorAndRangeVisitor | CXCursorAndRangeVisitor |
typedef void * | CXIdxClientFile |
The client's data object that is associated with a CXFile. More... | |
typedef void * | CXIdxClientEntity |
The client's data object that is associated with a semantic entity. More... | |
typedef void * | CXIdxClientContainer |
The client's data object that is associated with a semantic container of entities. More... | |
typedef void * | CXIdxClientASTFile |
The client's data object that is associated with an AST file (PCH or module). More... | |
typedef void * | CXIndexAction |
An indexing action/session, to be applied to one or multiple translation units. More... | |
typedef enum CXVisitorResult(* | CXFieldVisitor) (CXCursor C, CXClientData client_data) |
Visitor invoked for each field found by a traversal. More... | |
Functions | |
CINDEX_LINKAGE CXResult | clang_findReferencesInFile (CXCursor cursor, CXFile file, CXCursorAndRangeVisitor visitor) |
Find references of a declaration in a specific file. More... | |
CINDEX_LINKAGE CXResult | clang_findIncludesInFile (CXTranslationUnit TU, CXFile file, CXCursorAndRangeVisitor visitor) |
Find #import/#include directives in a specific file. More... | |
CINDEX_LINKAGE int | clang_index_isEntityObjCContainerKind (CXIdxEntityKind) |
CINDEX_LINKAGE const CXIdxObjCContainerDeclInfo * | clang_index_getObjCContainerDeclInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE const CXIdxObjCInterfaceDeclInfo * | clang_index_getObjCInterfaceDeclInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE const CXIdxObjCCategoryDeclInfo * | clang_index_getObjCCategoryDeclInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE const CXIdxObjCProtocolRefListInfo * | clang_index_getObjCProtocolRefListInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE const CXIdxObjCPropertyDeclInfo * | clang_index_getObjCPropertyDeclInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE const CXIdxIBOutletCollectionAttrInfo * | clang_index_getIBOutletCollectionAttrInfo (const CXIdxAttrInfo *) |
CINDEX_LINKAGE const CXIdxCXXClassDeclInfo * | clang_index_getCXXClassDeclInfo (const CXIdxDeclInfo *) |
CINDEX_LINKAGE CXIdxClientContainer | clang_index_getClientContainer (const CXIdxContainerInfo *) |
For retrieving a custom CXIdxClientContainer attached to a container. More... | |
CINDEX_LINKAGE void | clang_index_setClientContainer (const CXIdxContainerInfo *, CXIdxClientContainer) |
For setting a custom CXIdxClientContainer attached to a container. More... | |
CINDEX_LINKAGE CXIdxClientEntity | clang_index_getClientEntity (const CXIdxEntityInfo *) |
For retrieving a custom CXIdxClientEntity attached to an entity. More... | |
CINDEX_LINKAGE void | clang_index_setClientEntity (const CXIdxEntityInfo *, CXIdxClientEntity) |
For setting a custom CXIdxClientEntity attached to an entity. More... | |
CINDEX_LINKAGE CXIndexAction | clang_IndexAction_create (CXIndex CIdx) |
An indexing action/session, to be applied to one or multiple translation units. More... | |
CINDEX_LINKAGE void | clang_IndexAction_dispose (CXIndexAction) |
Destroy the given index action. More... | |
CINDEX_LINKAGE int | clang_indexSourceFile (CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks, unsigned index_callbacks_size, unsigned index_options, const char *source_filename, const char *const *command_line_args, int num_command_line_args, struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files, CXTranslationUnit *out_TU, unsigned TU_options) |
Index the given source file and the translation unit corresponding to that file via callbacks implemented through IndexerCallbacks. More... | |
CINDEX_LINKAGE int | clang_indexSourceFileFullArgv (CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks, unsigned index_callbacks_size, unsigned index_options, const char *source_filename, const char *const *command_line_args, int num_command_line_args, struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files, CXTranslationUnit *out_TU, unsigned TU_options) |
Same as clang_indexSourceFile but requires a full command line for command_line_args including argv[0]. More... | |
CINDEX_LINKAGE int | clang_indexTranslationUnit (CXIndexAction, CXClientData client_data, IndexerCallbacks *index_callbacks, unsigned index_callbacks_size, unsigned index_options, CXTranslationUnit) |
Index the given translation unit via callbacks implemented through IndexerCallbacks. More... | |
CINDEX_LINKAGE void | clang_indexLoc_getFileLocation (CXIdxLoc loc, CXIdxClientFile *indexFile, CXFile *file, unsigned *line, unsigned *column, unsigned *offset) |
Retrieve the CXIdxFile, file, line, column, and offset represented by the given CXIdxLoc. More... | |
CINDEX_LINKAGE CXSourceLocation | clang_indexLoc_getCXSourceLocation (CXIdxLoc loc) |
Retrieve the CXSourceLocation represented by the given CXIdxLoc. More... | |
CINDEX_LINKAGE unsigned | clang_Type_visitFields (CXType T, CXFieldVisitor visitor, CXClientData client_data) |
Visit the fields of a particular type. More... | |
typedef struct CXCursorAndRangeVisitor CXCursorAndRangeVisitor |
typedef enum CXVisitorResult(* CXFieldVisitor) (CXCursor C, CXClientData client_data) |
Visitor invoked for each field found by a traversal.
This visitor function will be invoked for each field found by clang_Type_visitFields
. Its first argument is the cursor being visited, its second argument is the client data provided to clang_Type_visitFields
.
The visitor should return one of the CXVisitorResult
values to direct clang_Type_visitFields
.
typedef void* CXIdxClientASTFile |
typedef void* CXIdxClientContainer |
typedef void* CXIdxClientEntity |
typedef void* CXIdxClientFile |
typedef void* CXIndexAction |
enum CXIdxAttrKind |
enum CXIdxDeclInfoFlags |
Extra C++ template information for an entity.
This can apply to: CXIdxEntity_Function CXIdxEntity_CXXClass CXIdxEntity_CXXStaticMethod CXIdxEntity_CXXInstanceMethod CXIdxEntity_CXXConstructor CXIdxEntity_CXXConversionFunction CXIdxEntity_CXXTypeAlias
Enumerator | |
---|---|
CXIdxEntity_NonTemplate | |
CXIdxEntity_Template | |
CXIdxEntity_TemplatePartialSpecialization | |
CXIdxEntity_TemplateSpecialization |
enum CXIdxEntityKind |
enum CXIdxEntityLanguage |
enum CXIdxEntityRefKind |
Data for IndexerCallbacks::indexEntityReference.
This may be deprecated in a future version as this duplicates the CXSymbolRole_Implicit
bit in CXSymbolRole
.
Enumerator | |
---|---|
CXIdxEntityRef_Direct | The entity is referenced directly in user's code. |
CXIdxEntityRef_Implicit | An implicit reference, e.g. a reference of an Objective-C method via the dot syntax. |
enum CXIndexOptFlags |
Enumerator | |
---|---|
CXIndexOpt_None | Used to indicate that no special indexing options are needed. |
CXIndexOpt_SuppressRedundantRefs | Used to indicate that IndexerCallbacks::indexEntityReference should be invoked for only one reference of an entity per source file that does not also include a declaration/definition of the entity. |
CXIndexOpt_IndexFunctionLocalSymbols | Function-local symbols should be indexed. If this is not set function-local symbols will be ignored. |
CXIndexOpt_IndexImplicitTemplateInstantiations | Implicit function/class template instantiations should be indexed. If this is not set, implicit instantiations will be ignored. |
CXIndexOpt_SuppressWarnings | Suppress all compiler warnings when parsing for indexing. |
CXIndexOpt_SkipParsedBodiesInSession | Skip a function/method body that was already parsed during an indexing session associated with a Bodies in system headers are always skipped. |
enum CXResult |
enum CXSymbolRole |
Roles that are attributed to symbol occurrences.
Internal: this currently mirrors low 9 bits of clang::index::SymbolRole with higher bits zeroed. These high bits may be exposed in the future.
enum CXVisitorResult |
CINDEX_LINKAGE CXResult clang_findIncludesInFile | ( | CXTranslationUnit | TU, |
CXFile | file, | ||
CXCursorAndRangeVisitor | visitor | ||
) |
Find #import/#include directives in a specific file.
TU | translation unit containing the file to query. |
file | to search for #import/#include directives. |
visitor | callback that will receive pairs of CXCursor/CXSourceRange for each directive found. |
CINDEX_LINKAGE CXResult clang_findReferencesInFile | ( | CXCursor | cursor, |
CXFile | file, | ||
CXCursorAndRangeVisitor | visitor | ||
) |
Find references of a declaration in a specific file.
cursor | pointing to a declaration or a reference of one. |
file | to search for references. |
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. |
CINDEX_LINKAGE CXIdxClientContainer clang_index_getClientContainer | ( | const CXIdxContainerInfo * | ) |
For retrieving a custom CXIdxClientContainer attached to a container.
CINDEX_LINKAGE CXIdxClientEntity clang_index_getClientEntity | ( | const CXIdxEntityInfo * | ) |
For retrieving a custom CXIdxClientEntity attached to an entity.
CINDEX_LINKAGE const CXIdxCXXClassDeclInfo* clang_index_getCXXClassDeclInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE const CXIdxIBOutletCollectionAttrInfo* clang_index_getIBOutletCollectionAttrInfo | ( | const CXIdxAttrInfo * | ) |
CINDEX_LINKAGE const CXIdxObjCCategoryDeclInfo* clang_index_getObjCCategoryDeclInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE const CXIdxObjCContainerDeclInfo* clang_index_getObjCContainerDeclInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE const CXIdxObjCInterfaceDeclInfo* clang_index_getObjCInterfaceDeclInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE const CXIdxObjCPropertyDeclInfo* clang_index_getObjCPropertyDeclInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE const CXIdxObjCProtocolRefListInfo* clang_index_getObjCProtocolRefListInfo | ( | const CXIdxDeclInfo * | ) |
CINDEX_LINKAGE int clang_index_isEntityObjCContainerKind | ( | CXIdxEntityKind | ) |
CINDEX_LINKAGE void clang_index_setClientContainer | ( | const CXIdxContainerInfo * | , |
CXIdxClientContainer | |||
) |
For setting a custom CXIdxClientContainer attached to a container.
CINDEX_LINKAGE void clang_index_setClientEntity | ( | const CXIdxEntityInfo * | , |
CXIdxClientEntity | |||
) |
For setting a custom CXIdxClientEntity attached to an entity.
CINDEX_LINKAGE CXIndexAction clang_IndexAction_create | ( | CXIndex | CIdx | ) |
An indexing action/session, to be applied to one or multiple translation units.
CIdx | The index object with which the index action will be associated. |
CINDEX_LINKAGE void clang_IndexAction_dispose | ( | CXIndexAction | ) |
Destroy the given index action.
The index action must not be destroyed until all of the translation units created within that index action have been destroyed.
CINDEX_LINKAGE CXSourceLocation clang_indexLoc_getCXSourceLocation | ( | CXIdxLoc | loc | ) |
Retrieve the CXSourceLocation represented by the given CXIdxLoc.
CINDEX_LINKAGE void clang_indexLoc_getFileLocation | ( | CXIdxLoc | loc, |
CXIdxClientFile * | indexFile, | ||
CXFile * | file, | ||
unsigned * | line, | ||
unsigned * | column, | ||
unsigned * | offset | ||
) |
Retrieve the CXIdxFile, file, line, column, and offset represented by the given CXIdxLoc.
If the location refers into a macro expansion, retrieves the location of the macro expansion and if it refers into a macro argument retrieves the location of the argument.
CINDEX_LINKAGE int clang_indexSourceFile | ( | CXIndexAction | , |
CXClientData | client_data, | ||
IndexerCallbacks * | index_callbacks, | ||
unsigned | index_callbacks_size, | ||
unsigned | index_options, | ||
const char * | source_filename, | ||
const char *const * | command_line_args, | ||
int | num_command_line_args, | ||
struct CXUnsavedFile * | unsaved_files, | ||
unsigned | num_unsaved_files, | ||
CXTranslationUnit * | out_TU, | ||
unsigned | TU_options | ||
) |
Index the given source file and the translation unit corresponding to that file via callbacks implemented through IndexerCallbacks.
client_data | pointer data supplied by the client, which will be passed to the invoked callbacks. | |
index_callbacks | Pointer to indexing callbacks that the client implements. | |
index_callbacks_size | Size of IndexerCallbacks structure that gets passed in index_callbacks. | |
index_options | A bitmask of options that affects how indexing is performed. This should be a bitwise OR of the CXIndexOpt_XXX flags. | |
[out] | out_TU | pointer to store a CXTranslationUnit that can be reused after indexing is finished. Set to NULL if you do not require it. |
CXErrorCode
.The rest of the parameters are the same as clang_parseTranslationUnit.
CINDEX_LINKAGE int clang_indexSourceFileFullArgv | ( | CXIndexAction | , |
CXClientData | client_data, | ||
IndexerCallbacks * | index_callbacks, | ||
unsigned | index_callbacks_size, | ||
unsigned | index_options, | ||
const char * | source_filename, | ||
const char *const * | command_line_args, | ||
int | num_command_line_args, | ||
struct CXUnsavedFile * | unsaved_files, | ||
unsigned | num_unsaved_files, | ||
CXTranslationUnit * | out_TU, | ||
unsigned | TU_options | ||
) |
Same as clang_indexSourceFile but requires a full command line for command_line_args
including argv[0].
This is useful if the standard library paths are relative to the binary.
CINDEX_LINKAGE int clang_indexTranslationUnit | ( | CXIndexAction | , |
CXClientData | client_data, | ||
IndexerCallbacks * | index_callbacks, | ||
unsigned | index_callbacks_size, | ||
unsigned | index_options, | ||
CXTranslationUnit | |||
) |
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.
CINDEX_LINKAGE unsigned clang_Type_visitFields | ( | CXType | T, |
CXFieldVisitor | visitor, | ||
CXClientData | client_data | ||
) |
Visit the fields of a particular type.
This function visits all the direct fields of the given cursor, invoking the given visitor
function with the cursors of each visited field. The traversal may be ended prematurely, if the visitor returns CXFieldVisit_Break
.
T | the record type whose field may be visited. |
visitor | the visitor function that will be invoked for each field of T . |
client_data | pointer data supplied by the client, which will be passed to the visitor each time it is invoked. |
CXFieldVisit_Break
.