Opaque pointer representing client data that will be passed through to various callbacks and visitors.
A semantic string that describes a code-completion result.
Visitor invoked for each cursor found by a traversal.
A single diagnostic, containing the diagnostic's severity, location, text, source ranges, and fix-it hints.
A group of CXDiagnostics.
Evaluation result of a cursor
Visitor invoked for each field found by a traversal.
A particular source file that is part of a translation unit.
The client's data object that is associated with an AST file (PCH or module).
The client's data object that is associated with a semantic container of entities.
The client's data object that is associated with a semantic entity.
The client's data object that is associated with a CXFile.
Visitor invoked for each file in a translation unit (used with clang_getInclusions()).
An "index" that consists of a set of translation units that would typically be linked together into an executable or library.
An indexing action/session, to be applied to one or multiple translation units.
\defgroup CINDEX_MODULE Module introspection
Opaque pointer representing a policy that controls pretty printing for \c clang_getCursorPrettyPrinted.
A remapping of original source files and their translated files.
Describes the availability of a particular entity, which indicates whether the use of this entity will result in a warning or error due to it being deprecated or unavailable.
Describes the calling convention of a function type
Describes how the traversal of the children of a particular cursor should proceed after visiting a particular child cursor.
Flags that can be passed to \c clang_codeCompleteAt() to modify its behavior.
Describes a single piece of text within a code-completion string.
Bits that represent the context under which completion is occurring.
Describes the kind of entity that a cursor refers to.
Describes the exception specification of a cursor.
Options to control the display of diagnostics.
Describes the severity of a particular diagnostic.
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
Data for IndexerCallbacks#indexEntityReference.
Describe the "language" of the entity referred to by a cursor.
Describe the linkage of the entity referred to by a cursor.
Describes the kind of error that occurred (if any) in a call to \c clang_loadDiagnostics.
'Qualifiers' written next to the return and parameter types in Objective-C method declarations.
Property attributes for a \c CXCursor_ObjCPropertyDecl.
Properties for the printing policy.
Flags that control the reparsing of translation units.
Describes the kind of error that occurred (if any) in a call to \c clang_saveTranslationUnit().
Flags that control how translation units are saved.
Roles that are attributed to symbol occurrences.
Describe the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.
Categorizes how memory is being used by a translation unit.
Describes the kind of a template argument.
Describes a kind of token.
Flags that control the creation of translation units.
Describes the kind of type
List the possible error codes for \c clang_Type_getSizeOf, \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and \c clang_Cursor_getOffsetOf.
\defgroup CINDEX_HIGH Higher level API functions
Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.
Represents the storage classes as declared in the source. CX_SC_Invalid was added for the case that the passed cursor in not a declaration.
Queries a CXCursorSet to see if it contains a specific CXCursor.
Inserts a CXCursor into a CXCursorSet.
Gets the general options associated with a CXIndex.
Sets general options associated with a CXIndex.
Sets the invocation emission path option in a CXIndex.
Determine if a C++ constructor is a converting constructor.
Determine if a C++ constructor is a copy constructor.
Determine if a C++ constructor is the default constructor.
Determine if a C++ constructor is a move constructor.
Determine if a C++ field is declared 'mutable'.
Determine if a C++ member function or member function template is declared 'const'.
Determine if a C++ method is declared '= default'.
Determine if a C++ member function or member function template is pure virtual.
Determine if a C++ member function or member function template is declared 'static'.
Determine if a C++ member function or member function template is explicitly declared 'virtual' or if it overrides a virtual method from one of the base classes.
Determine if a C++ record is abstract, i.e. whether a class or struct has a pure virtual member function.
If cursor is a statement declaration tries to evaluate the statement and if its variable, tries to evaluate its initializer, into its corresponding type. If it's an expression, tries to evaluate the expression.
Retrieve the argument cursor of a function or method.
Given a cursor that represents a documentable entity (e.g., declaration), return the associated \paragraph; otherwise return the first paragraph.
Retrieve the CXStrings representing the mangled symbols of the C++ constructor or destructor at the cursor.
Given a cursor that represents a declaration, return the associated comment's source range. The range may include multiple consecutive comments with whitespace in between.
Retrieve the CXString representing the mangled name of the cursor.
Given a CXCursor_ModuleImportDecl cursor, return the associated module.
Retrieve the number of non-variadic arguments associated with a given cursor.
Returns the number of template args of a function decl representing a template specialization.
Given a cursor that represents an Objective-C method or parameter declaration, return the associated Objective-C qualifiers for the return type or the parameter respectively. The bits are formed from CXObjCDeclQualifierKind.
Retrieve the CXStrings representing the mangled symbols of the ObjC class interface or implementation at the cursor.
Given a cursor that represents a property declaration, return the associated property attributes. The bits are formed from \c CXObjCPropertyAttrKind.
Given a cursor that represents a property declaration, return the name of the method that implements the getter.
Given a cursor that represents a property declaration, return the name of the method that implements the setter, if any.
If the cursor points to a selector identifier in an Objective-C method or message expression, this returns the selector index.
Return the offset of the field represented by the Cursor.
Given a cursor that represents a declaration, return the associated comment text, including comment markers.
Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns the CXType of the receiver.
Retrieve a range for a piece that forms the cursors spelling name. Most of the times there is only one range for the complete spelling but for Objective-C methods and Objective-C message expressions, there are multiple pieces for each selector identifier.
Returns the storage class for a function or variable declaration.
Retrieve the kind of the I'th template argument of the CXCursor C.
Retrieve a CXType representing the type of a TemplateArgument of a function decl representing a template specialization.
Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as an unsigned long long.
Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as a signed long long.
Returns the translation unit that a cursor originated from.
If cursor refers to a variable declaration and it has initializer returns cursor referring to the initializer otherwise return null cursor.
Determine whether the given cursor has any attributes.
If cursor refers to a variable declaration that has external storage returns 1. If cursor refers to a variable declaration that doesn't have external storage returns 0. Otherwise returns -1.
If cursor refers to a variable declaration that has global storage returns 1. If cursor refers to a variable declaration that doesn't have global storage returns 0. Otherwise returns -1.
Determine whether the given cursor represents an anonymous tag or namespace
Determine whether the given cursor represents an anonymous record declaration.
Returns non-zero if the cursor specifies a Record member that is a bitfield.
Given a cursor pointing to a C++ method call or an Objective-C message, returns non-zero if the method/message is "dynamic", meaning:
Returns non-zero if the given cursor points to a symbol marked with external_source_symbol attribute.
Determine whether a CXCursor that is a function declaration, is an inline declaration.
Determine whether the given cursor represents an inline namespace declaration.
Determine whether a CXCursor that is a macro, is a builtin one.
Determine whether a CXCursor that is a macro, is function like.
Returns non-zero if \p cursor is null.
Given a cursor that represents an Objective-C method or property declaration, return non-zero if the declaration was affected by "\@optional". Returns zero if the cursor is not such a declaration or it is "\@required".
Returns non-zero if the given cursor is a variadic function or method.
Determine if an enum declaration refers to a scoped enum.
Disposes the created Eval memory.
Returns the evaluation result as double if the kind is double.
Returns the evaluation result as integer if the kind is Int.
Returns the evaluation result as a long long integer if the kind is Int. This prevents overflows that may happen if the result is returned with clang_EvalResult_getAsInt.
Returns the evaluation result as a constant string if the kind is other than Int or float. User must not free this pointer, instead call clang_EvalResult_dispose on the CXEvalResult returned by clang_Cursor_Evaluate.
Returns the evaluation result as an unsigned integer if the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.
Returns the kind of the evaluated result.
Returns a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.
Returns non-zero if the \c file1 and \c file2 point to the same file, or they are both NULL.
Returns the real path name of \c file.
An indexing action/session, to be applied to one or multiple translation units.
Destroy the given index action.
Returns non-zero if the given source location is in the main file of the corresponding translation unit.
Returns non-zero if the given source location is in a system header.
\param Module a module object.
\param Module a module object.
\param Module a module object.
\param Module a module object.
\param Module a module object.
\param Module a module object.
\param Module a module object.
Release a printing policy.
Get a property value for the given printing policy.
Set a property value for the given printing policy.
Returns non-zero if \p range is null.
Destroy the CXTargetInfo object.
Get the pointer width of the target in bits.
Get the normalized target triple as a string.
Return the alignment of a type in bytes as per C++expr.alignof standard.
Retrieve the ref-qualifier kind of a function or method.
Return the class type of an member pointer type.
Return the type that was modified by this attributed type.
Retrieve the type named by the qualified-id.
Retrieve the nullability kind of a pointer type.
Retrieve the number of protocol references associated with an ObjC object/id.
Retrieve the number of type arguments associated with an ObjC object.
Returns the number of template arguments for given template specialization, or -1 if type \c T is not a template specialization.
Returns the Objective-C type encoding for the specified CXType.
Retrieves the base type of the ObjCObjectType.
Retrieve the decl for a protocol reference for an ObjC object/id.
Retrieve a type argument associated with an ObjC object.
Return the offset of a field named S in a record of type T in bits as it would be returned by __offsetof__ as per C++11[18.2p4]
Return the size of a type in bytes as per C++expr.sizeof standard.
Returns the type template argument of a template class specialization at given index.
Gets the type contained by this atomic type.
Determine if a typedef is 'transparent' tag.
Visit the fields of a particular type.
Annotate the given set of tokens by providing cursors for each token that can be mapped to a specific entity within the abstract syntax tree.
Perform code completion at a given location in a translation unit.
Returns the cursor kind for the container for the current code completion context. The container is only guaranteed to be set for contexts where a container exists (i.e. member accesses or Objective-C message sends); if there is not a container, this function will return CXCursor_InvalidCode.
Returns the USR for the container for the current code completion context. If there is not a container for the current context, this function will return the empty string.
Determines what completions are appropriate for the context the given code completion.
Retrieve a diagnostic associated with the given code completion.
Determine the number of diagnostics produced prior to the location where code completion was performed.
Returns the currently-entered selector for an Objective-C message send, formatted like "initWithFoo:bar:". Only guaranteed to return a non-empty string for CXCompletionContext_ObjCInstanceMessage and CXCompletionContext_ObjCClassMessage.
Construct a USR for a specified Objective-C category.
Construct a USR for a specified Objective-C class.
Construct a USR for a specified Objective-C instance variable and the USR for its containing class.
Construct a USR for a specified Objective-C method and the USR for its containing class.
Construct a USR for a specified Objective-C property and the USR for its containing class.
Construct a USR for a specified Objective-C protocol.
Creates an empty CXCursorSet.
Provides a shared context for creating translation units.
Same as \c clang_createTranslationUnit2, but returns the \c CXTranslationUnit instead of an error code. In case of an error this routine returns a \c NULL \c CXTranslationUnit, without further detailed error codes.
Create a translation unit from an AST file (\c -emit-ast).
Return the CXTranslationUnit for a given source file and the provided command line arguments one would pass to the compiler.
Returns a default set of code-completion options that can be passed to\c clang_codeCompleteAt().
Retrieve the set of display options most similar to the default behavior of the clang compiler.
Returns the set of flags that is suitable for parsing a translation unit that is being edited.
Returns the set of flags that is suitable for reparsing a translation unit.
Returns the set of flags that is suitable for saving a translation unit.
Disposes a CXCursorSet and releases its associated memory.
Free the memory associated with a \c CXPlatformAvailability structure.
Free the given set of code-completion results.
Destroy a diagnostic.
Release a CXDiagnosticSet and all of its contained diagnostics.
Destroy the given index.
Free the set of overridden cursors returned by \c clang_getOverriddenCursors().
Destroy the given \c CXSourceRangeList.
Free the given set of tokens.
Destroy the specified CXTranslationUnit object.
Determine whether two cursors are equivalent.
Determine whether two source locations, which must refer into the same translation unit, refer to exactly the same point in the source code.
Determine whether two ranges are equivalent.
Determine whether two CXTypes represent the same type.
Find #import/#include directives in a specific file.
Find references of a declaration in a specific file.
Format the given diagnostic in a manner that is suitable for display.
Returns the address space of the given type.
Retrieve all ranges from all files that were skipped by the preprocessor.
Retrieve the type of a parameter of a function type.
Return the element type of an array type.
Return the array size of a constant array.
Return the memory usage of a translation unit. This object should be released with clang_disposeCXTUResourceUsage().
Returns the access control level for the referenced object.
Retrieve the canonical cursor corresponding to the given cursor.
Return the canonical type for a CXType.
Retrieve the child diagnostics of a CXDiagnostic.
Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).
Retrieve the annotation associated with the given completion string.
Determine the availability of the entity that this code-completion string refers to.
Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.
Retrieve the completion string associated with a particular chunk within a completion string.
Determine the kind of a particular chunk within a completion string.
Retrieve the text associated with a particular chunk within a completion string.
Fix-its that *must* be applied before inserting the text for the corresponding completion.
Retrieve the number of annotations associated with the given completion string.
Retrieve the number of fix-its for the given completion index.
Retrieve the parent context of the given completion string.
Determine the priority of this code completion.
Map a source location to the cursor that describes the entity at that location in the source code.
Determine the availability of the entity that this cursor refers to, taking the current target platform into account.
Retrieve a completion string for an arbitrary declaration or macro definition cursor.
For a cursor that is either a reference to or a declaration of some entity, retrieve a cursor that describes the definition of that entity.
Retrieve the display name for the entity referenced by this cursor.
Retrieve the exception specification type associated with a given cursor. This is a value of type CXCursor_ExceptionSpecificationKind.
Retrieve the physical extent of the source construct referenced by the given cursor.
Retrieve the kind of the given cursor.
\defgroup CINDEX_DEBUG Debugging facilities
Determine the "language" of the entity referred to by a given cursor.
Determine the lexical parent of the given cursor.
Determine the linkage of the entity referred to by a given cursor.
Retrieve the physical location of the source constructor referenced by the given cursor.
Determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.
Pretty print declarations.
Retrieve the default policy for the cursor.
Given a cursor that references something else, return the source range covering that reference.
For a cursor that is a reference, retrieve a cursor representing the entity that it references.
Retrieve the return type associated with a given cursor.
Determine the semantic parent of the given cursor.
Retrieve a name for the entity referenced by this cursor.
Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.
Retrieve the type of a CXCursor (if any).
Retrieve a Unified Symbol Resolution (USR) for the entity referenced by the given cursor.
Describe the visibility of the entity referred to by a cursor.
Returns the Objective-C type encoding for the specified declaration.
Retrieve a diagnostic associated with the given translation unit.
Retrieve the category number for this diagnostic.
Retrieve the name of a particular diagnostic category. This is now deprecated. Use clang_getDiagnosticCategoryText() instead.
Retrieve the diagnostic category text for a given diagnostic.
Retrieve the replacement information for a given fix-it.
Retrieve a diagnostic associated with the given CXDiagnosticSet.
Retrieve the source location of the given diagnostic.
Determine the number of fix-it hints associated with the given diagnostic.
Determine the number of source ranges associated with the given diagnostic.
Retrieve the name of the command-line option that enabled this diagnostic.
Retrieve a source range associated with the diagnostic.
Retrieve the complete set of diagnostics associated with a translation unit.
Determine the severity of the given diagnostic.
Retrieve the text of the given diagnostic.
Return the element type of an array, complex, or vector type.
Retrieve the integer value of an enum constant declaration as an unsigned long long.
Retrieve the integer value of an enum constant declaration as a signed long long.
Retrieve the integer type of an enum declaration.
Retrieve the exception specification type associated with a function type. This is a value of type CXCursor_ExceptionSpecificationKind.
Retrieve the file, line, column, and offset represented by the given source location.
Retrieve the bit width of a bit field declaration as an integer.
Retrieve a file handle within the given translation unit.
Retrieve the buffer associated with the given file.
Retrieve the file, line, column, and offset represented by the given source location.
Retrieve the complete file and path name of the given file.
Retrieve the last modification time of the given file.
Retrieve the unique ID for the given \c file.
Retrieve the calling convention associated with a function type.
For cursors representing an iboutletcollection attribute, this function returns the collection element type.
Retrieve the file that is included by the given inclusion directive cursor.
Visit the set of preprocessor inclusions in a translation unit. The visitor function is called with the provided data for every included file. This does not include headers included by the PCH file (unless one is inspecting the inclusions in the PCH file itself).
Legacy API to retrieve the file, line, column, and offset represented by the given source location.
Retrieves the source location associated with a given file/line/column in a particular translation unit.
Retrieves the source location associated with a given character offset in a particular translation unit.
Given a CXFile header file, return the module that contains it, if one exists.
Retrieve the NULL cursor, which represents no entity.
Retrieve a NULL (invalid) source location.
Retrieve a NULL (invalid) source range.
Retrieve the number of non-variadic parameters associated with a function type.
Retrieve the number of chunks in the given code-completion string.
Determine the number of diagnostics produced for the given translation unit.
Determine the number of diagnostics in a CXDiagnosticSet.
Return the number of elements of an array or vector type.
Determine the number of overloaded declarations referenced by a \c CXCursor_OverloadedDeclRef cursor.
Retrieve a cursor for one of the overloaded declarations referenced by a \c CXCursor_OverloadedDeclRef cursor.
Determine the set of methods that are overridden by the given method.
For pointer types, returns the type of the pointee.
Retrieve the file, line and column represented by the given source location, as specified in a # line directive.
Retrieve a source range given the beginning and ending source locations.
Retrieve a source location representing the last character within a source range.
Retrieve a source location representing the first character within a source range.
Retrieve a remapping.
Retrieve a remapping.
Retrieve the return type associated with a function type.
Retrieve all ranges that were skipped by the preprocessor.
Given a cursor that may represent a specialization or instantiation of a template, retrieve the cursor that represents the template that it specializes or from which it was instantiated.
Retrieve the file, line, column, and offset represented by the given source location.
Returns the human-readable null-terminated C string that represents the name of the memory category. This string should never be freed.
Given a cursor that represents a template, determine the cursor kind of the specializations would be generated by instantiating the template.
Get the raw lexical token starting with the given location.
Retrieve a source range that covers the given token.
Determine the kind of the given token.
Retrieve the source location of the given token.
Determine the spelling of the given token.
Retrieve the cursor that represents the given translation unit.
Get the original translation unit source file name.
Get target information for this translation unit.
Return the cursor for the declaration of the given type.
Retrieve the spelling of a given CXTypeKind.
Pretty-print the underlying type using the rules of the language of the translation unit from which it came.
Retrieve the underlying type of a typedef declaration.
Returns the typedef name of the given type.
Compute a hash value for the given cursor.
Retrieve the CXSourceLocation represented by the given CXIdxLoc.
Retrieve the CXIdxFile, file, line, column, and offset represented by the given CXIdxLoc.
Index the given source file and the translation unit corresponding to that file via callbacks implemented through #IndexerCallbacks.
Same as clang_indexSourceFile but requires a full command line for \c command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.
Index the given translation unit via callbacks implemented through #IndexerCallbacks.
For retrieving a custom CXIdxClientContainer attached to a container.
For retrieving a custom CXIdxClientEntity attached to an entity.
For setting a custom CXIdxClientContainer attached to a container.
For setting a custom CXIdxClientEntity attached to an entity.
Determine whether the given cursor kind represents an attribute.
Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.
Determine whether the declaration pointed to by this cursor is also a definition of that entity.
Determine whether the given cursor kind represents a declaration.
Determine whether the given cursor kind represents an expression.
Determine whether the given header is guarded against multiple inclusions, either with the conventional \#ifndef/\#define/\#endif macro guards or with \#pragma once.
Return 1 if the CXType is a variadic function type, and 0 otherwise.
Determine whether the given cursor kind represents an invalid cursor.
Determine whether the given declaration is invalid.
Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.
Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.
Determine whether the given cursor kind represents a simple reference.
Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.
Determine whether the given cursor kind represents a statement.
Determine whether the given cursor kind represents a translation unit.
Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.
Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.
Deserialize a set of diagnostics from a Clang diagnostics bitcode file.
Same as \c clang_parseTranslationUnit2, but returns the \c CXTranslationUnit instead of an error code. In case of an error this routine returns a \c NULL \c CXTranslationUnit, without further detailed error codes.
Parse the given source file and the translation unit corresponding to that file.
Same as clang_parseTranslationUnit2 but requires a full command line for \c command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.
Dispose the remapping.
Get the original and the associated filename from the remapping.
Determine the number of remappings.
Reparse the source files that produced this translation unit.
Saves a translation unit into a serialized representation of that translation unit on disk.
Sort the code-completion results in case-insensitive alphabetical order.
Suspend a translation unit in order to free memory associated with it.
Enable/disable crash recovery.
Tokenize the source code described by the given range into raw lexical tokens.
Visit the children of a particular cursor.
The version constants for the libclang API. CINDEX_VERSION_MINOR should increase when there are API additions. CINDEX_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
Contains the results of code-completion.
A single result of code completion.
A cursor representing some element in the abstract syntax tree for a translation unit.
A fast container representing a set of CXCursors.
Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session.
Data for IndexerCallbacks#indexEntityReference.
Data for IndexerCallbacks#importedASTFile.
Data for ppIncludedFile callback.
Source location passed to index callbacks.
Describes the availability of a given entity on a particular platform, e.g., a particular class might only be available on Mac OS 10.7 or newer.
Identifies a specific source location within a translation unit.
Identifies a half-open character range in the source code.
Identifies an array of ranges.
The memory usage of a CXTranslationUnit, broken into categories.
An opaque type representing target information for a given translation unit.
Describes a single preprocessing token.
A single translation unit, which resides in an index.
The type of an element in the abstract syntax tree.
Provides the contents of a file that has not yet been saved to disk.
Describes a version number of the form major.minor.subminor.
A group of callbacks used by #clang_indexSourceFile and #clang_indexTranslationUnit.