clang.c.Index

Undocumented in source.

Public Imports

clang.c.CXErrorCode
public import clang.c.CXErrorCode;
Undocumented in source.
clang.c.CXString
public import clang.c.CXString;
Undocumented in source.

Members

Aliases

CINDEX_VERSION_STRINGIZE
alias CINDEX_VERSION_STRINGIZE = CINDEX_VERSION_STRINGIZE_
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXClientData
alias CXClientData = void*

Opaque pointer representing client data that will be passed through to various callbacks and visitors.

CXCompletionString
alias CXCompletionString = void*

A semantic string that describes a code-completion result.

CXCursorSet
alias CXCursorSet = CXCursorSetImpl*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXCursorVisitor
alias CXCursorVisitor = CXChildVisitResult function(CXCursor cursor, CXCursor parent, CXClientData client_data)

Visitor invoked for each cursor found by a traversal.

CXDiagnostic
alias CXDiagnostic = void*

A single diagnostic, containing the diagnostic's severity, location, text, source ranges, and fix-it hints.

CXDiagnosticSet
alias CXDiagnosticSet = void*

A group of CXDiagnostics.

CXEvalResult
alias CXEvalResult = void*

Evaluation result of a cursor

CXFieldVisitor
alias CXFieldVisitor = CXVisitorResult function(CXCursor C, CXClientData client_data)

Visitor invoked for each field found by a traversal.

CXFile
alias CXFile = void*

A particular source file that is part of a translation unit.

CXIdxClientASTFile
alias CXIdxClientASTFile = void*

The client's data object that is associated with an AST file (PCH or module).

CXIdxClientContainer
alias CXIdxClientContainer = void*

The client's data object that is associated with a semantic container of entities.

CXIdxClientEntity
alias CXIdxClientEntity = void*

The client's data object that is associated with a semantic entity.

CXIdxClientFile
alias CXIdxClientFile = void*

The client's data object that is associated with a CXFile.

CXInclusionVisitor
alias CXInclusionVisitor = void function(CXFile included_file, CXSourceLocation* inclusion_stack, uint include_len, CXClientData client_data)

Visitor invoked for each file in a translation unit (used with clang_getInclusions()).

CXIndex
alias CXIndex = void*

An "index" that consists of a set of translation units that would typically be linked together into an executable or library.

CXIndexAction
alias CXIndexAction = void*

An indexing action/session, to be applied to one or multiple translation units.

CXModule
alias CXModule = void*

\defgroup CINDEX_MODULE Module introspection

CXPrintingPolicy
alias CXPrintingPolicy = void*

Opaque pointer representing a policy that controls pretty printing for \c clang_getCursorPrettyPrinted.

CXRemapping
alias CXRemapping = void*

A remapping of original source files and their translated files.

CXTargetInfo
alias CXTargetInfo = CXTargetInfoImpl*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXTranslationUnit
alias CXTranslationUnit = CXTranslationUnitImpl*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

CXAvailabilityKind
enum CXAvailabilityKind

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.

CXCallingConv
enum CXCallingConv

Describes the calling convention of a function type

CXChildVisitResult
enum CXChildVisitResult

Describes how the traversal of the children of a particular cursor should proceed after visiting a particular child cursor.

CXCodeComplete_Flags
enum CXCodeComplete_Flags

Flags that can be passed to \c clang_codeCompleteAt() to modify its behavior.

CXCompletionChunkKind
enum CXCompletionChunkKind

Describes a single piece of text within a code-completion string.

CXCompletionContext
enum CXCompletionContext

Bits that represent the context under which completion is occurring.

CXCursorKind
enum CXCursorKind

Describes the kind of entity that a cursor refers to.

CXCursor_ExceptionSpecificationKind
enum CXCursor_ExceptionSpecificationKind

Describes the exception specification of a cursor.

CXDiagnosticDisplayOptions
enum CXDiagnosticDisplayOptions

Options to control the display of diagnostics.

CXDiagnosticSeverity
enum CXDiagnosticSeverity

Describes the severity of a particular diagnostic.

CXEvalResultKind
enum CXEvalResultKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXGlobalOptFlags
enum CXGlobalOptFlags
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxAttrKind
enum CXIdxAttrKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxDeclInfoFlags
enum CXIdxDeclInfoFlags
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxEntityCXXTemplateKind
enum CXIdxEntityCXXTemplateKind

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

CXIdxEntityKind
enum CXIdxEntityKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxEntityLanguage
enum CXIdxEntityLanguage
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxEntityRefKind
enum CXIdxEntityRefKind

Data for IndexerCallbacks#indexEntityReference.

CXIdxObjCContainerKind
enum CXIdxObjCContainerKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIndexOptFlags
enum CXIndexOptFlags
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXLanguageKind
enum CXLanguageKind

Describe the "language" of the entity referred to by a cursor.

CXLinkageKind
enum CXLinkageKind

Describe the linkage of the entity referred to by a cursor.

CXLoadDiag_Error
enum CXLoadDiag_Error

Describes the kind of error that occurred (if any) in a call to \c clang_loadDiagnostics.

CXNameRefFlags
enum CXNameRefFlags
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXObjCDeclQualifierKind
enum CXObjCDeclQualifierKind

'Qualifiers' written next to the return and parameter types in Objective-C method declarations.

CXObjCPropertyAttrKind
enum CXObjCPropertyAttrKind

Property attributes for a \c CXCursor_ObjCPropertyDecl.

CXPrintingPolicyProperty
enum CXPrintingPolicyProperty

Properties for the printing policy.

CXRefQualifierKind
enum CXRefQualifierKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXReparse_Flags
enum CXReparse_Flags

Flags that control the reparsing of translation units.

CXResult
enum CXResult
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXSaveError
enum CXSaveError

Describes the kind of error that occurred (if any) in a call to \c clang_saveTranslationUnit().

CXSaveTranslationUnit_Flags
enum CXSaveTranslationUnit_Flags

Flags that control how translation units are saved.

CXSymbolRole
enum CXSymbolRole

Roles that are attributed to symbol occurrences.

CXTLSKind
enum CXTLSKind

Describe the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.

CXTUResourceUsageKind
enum CXTUResourceUsageKind

Categorizes how memory is being used by a translation unit.

CXTemplateArgumentKind
enum CXTemplateArgumentKind

Describes the kind of a template argument.

CXTokenKind
enum CXTokenKind

Describes a kind of token.

CXTranslationUnit_Flags
enum CXTranslationUnit_Flags

Flags that control the creation of translation units.

CXTypeKind
enum CXTypeKind

Describes the kind of type

CXTypeLayoutError
enum CXTypeLayoutError

List the possible error codes for \c clang_Type_getSizeOf, \c clang_Type_getAlignOf, \c clang_Type_getOffsetOf and \c clang_Cursor_getOffsetOf.

CXTypeNullabilityKind
enum CXTypeNullabilityKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXVisibilityKind
enum CXVisibilityKind
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXVisitorResult
enum CXVisitorResult

\defgroup CINDEX_HIGH Higher level API functions

CX_CXXAccessSpecifier
enum CX_CXXAccessSpecifier

Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.

CX_StorageClass
enum CX_StorageClass

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.

Functions

CINDEX_VERSION_ENCODE
auto CINDEX_VERSION_ENCODE(T0 major, T1 minor)
Undocumented in source. Be warned that the author may not have intended to support it.
CINDEX_VERSION_STRINGIZE_
string CINDEX_VERSION_STRINGIZE_(T0 major, T1 minor)
Undocumented in source. Be warned that the author may not have intended to support it.
clang_CXCursorSet_contains
uint clang_CXCursorSet_contains(CXCursorSet cset, CXCursor cursor)

Queries a CXCursorSet to see if it contains a specific CXCursor.

clang_CXCursorSet_insert
uint clang_CXCursorSet_insert(CXCursorSet cset, CXCursor cursor)

Inserts a CXCursor into a CXCursorSet.

clang_CXIndex_getGlobalOptions
uint clang_CXIndex_getGlobalOptions(CXIndex )

Gets the general options associated with a CXIndex.

clang_CXIndex_setGlobalOptions
void clang_CXIndex_setGlobalOptions(CXIndex , uint options)

Sets general options associated with a CXIndex.

clang_CXIndex_setInvocationEmissionPathOption
void clang_CXIndex_setInvocationEmissionPathOption(CXIndex , const(char)* Path)

Sets the invocation emission path option in a CXIndex.

clang_CXXConstructor_isConvertingConstructor
uint clang_CXXConstructor_isConvertingConstructor(CXCursor C)

Determine if a C++ constructor is a converting constructor.

clang_CXXConstructor_isCopyConstructor
uint clang_CXXConstructor_isCopyConstructor(CXCursor C)

Determine if a C++ constructor is a copy constructor.

clang_CXXConstructor_isDefaultConstructor
uint clang_CXXConstructor_isDefaultConstructor(CXCursor C)

Determine if a C++ constructor is the default constructor.

clang_CXXConstructor_isMoveConstructor
uint clang_CXXConstructor_isMoveConstructor(CXCursor C)

Determine if a C++ constructor is a move constructor.

clang_CXXField_isMutable
uint clang_CXXField_isMutable(CXCursor C)

Determine if a C++ field is declared 'mutable'.

clang_CXXMethod_isConst
uint clang_CXXMethod_isConst(CXCursor C)

Determine if a C++ member function or member function template is declared 'const'.

clang_CXXMethod_isDefaulted
uint clang_CXXMethod_isDefaulted(CXCursor C)

Determine if a C++ method is declared '= default'.

clang_CXXMethod_isPureVirtual
uint clang_CXXMethod_isPureVirtual(CXCursor C)

Determine if a C++ member function or member function template is pure virtual.

clang_CXXMethod_isStatic
uint clang_CXXMethod_isStatic(CXCursor C)

Determine if a C++ member function or member function template is declared 'static'.

clang_CXXMethod_isVirtual
uint clang_CXXMethod_isVirtual(CXCursor C)

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.

clang_CXXRecord_isAbstract
uint clang_CXXRecord_isAbstract(CXCursor C)

Determine if a C++ record is abstract, i.e. whether a class or struct has a pure virtual member function.

clang_Cursor_Evaluate
CXEvalResult clang_Cursor_Evaluate(CXCursor C)

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.

clang_Cursor_getArgument
CXCursor clang_Cursor_getArgument(CXCursor C, uint i)

Retrieve the argument cursor of a function or method.

clang_Cursor_getBriefCommentText
CXString clang_Cursor_getBriefCommentText(CXCursor C)

Given a cursor that represents a documentable entity (e.g., declaration), return the associated \paragraph; otherwise return the first paragraph.

clang_Cursor_getCXXManglings
CXStringSet* clang_Cursor_getCXXManglings(CXCursor )

Retrieve the CXStrings representing the mangled symbols of the C++ constructor or destructor at the cursor.

clang_Cursor_getCommentRange
CXSourceRange clang_Cursor_getCommentRange(CXCursor C)

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.

clang_Cursor_getMangling
CXString clang_Cursor_getMangling(CXCursor )

Retrieve the CXString representing the mangled name of the cursor.

clang_Cursor_getModule
CXModule clang_Cursor_getModule(CXCursor C)

Given a CXCursor_ModuleImportDecl cursor, return the associated module.

clang_Cursor_getNumArguments
int clang_Cursor_getNumArguments(CXCursor C)

Retrieve the number of non-variadic arguments associated with a given cursor.

clang_Cursor_getNumTemplateArguments
int clang_Cursor_getNumTemplateArguments(CXCursor C)

Returns the number of template args of a function decl representing a template specialization.

clang_Cursor_getObjCDeclQualifiers
uint clang_Cursor_getObjCDeclQualifiers(CXCursor C)

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.

clang_Cursor_getObjCManglings
CXStringSet* clang_Cursor_getObjCManglings(CXCursor )

Retrieve the CXStrings representing the mangled symbols of the ObjC class interface or implementation at the cursor.

clang_Cursor_getObjCPropertyAttributes
uint clang_Cursor_getObjCPropertyAttributes(CXCursor C, uint reserved)

Given a cursor that represents a property declaration, return the associated property attributes. The bits are formed from \c CXObjCPropertyAttrKind.

clang_Cursor_getObjCPropertyGetterName
CXString clang_Cursor_getObjCPropertyGetterName(CXCursor C)

Given a cursor that represents a property declaration, return the name of the method that implements the getter.

clang_Cursor_getObjCPropertySetterName
CXString clang_Cursor_getObjCPropertySetterName(CXCursor C)

Given a cursor that represents a property declaration, return the name of the method that implements the setter, if any.

clang_Cursor_getObjCSelectorIndex
int clang_Cursor_getObjCSelectorIndex(CXCursor )

If the cursor points to a selector identifier in an Objective-C method or message expression, this returns the selector index.

clang_Cursor_getOffsetOfField
long clang_Cursor_getOffsetOfField(CXCursor C)

Return the offset of the field represented by the Cursor.

clang_Cursor_getRawCommentText
CXString clang_Cursor_getRawCommentText(CXCursor C)

Given a cursor that represents a declaration, return the associated comment text, including comment markers.

clang_Cursor_getReceiverType
CXType clang_Cursor_getReceiverType(CXCursor C)

Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns the CXType of the receiver.

clang_Cursor_getSpellingNameRange
CXSourceRange clang_Cursor_getSpellingNameRange(CXCursor , uint pieceIndex, uint options)

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.

clang_Cursor_getStorageClass
CX_StorageClass clang_Cursor_getStorageClass(CXCursor )

Returns the storage class for a function or variable declaration.

clang_Cursor_getTemplateArgumentKind
CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind(CXCursor C, uint I)

Retrieve the kind of the I'th template argument of the CXCursor C.

clang_Cursor_getTemplateArgumentType
CXType clang_Cursor_getTemplateArgumentType(CXCursor C, uint I)

Retrieve a CXType representing the type of a TemplateArgument of a function decl representing a template specialization.

clang_Cursor_getTemplateArgumentUnsignedValue
ulong clang_Cursor_getTemplateArgumentUnsignedValue(CXCursor C, uint I)

Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as an unsigned long long.

clang_Cursor_getTemplateArgumentValue
long clang_Cursor_getTemplateArgumentValue(CXCursor C, uint I)

Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as a signed long long.

clang_Cursor_getTranslationUnit
CXTranslationUnit clang_Cursor_getTranslationUnit(CXCursor )

Returns the translation unit that a cursor originated from.

clang_Cursor_getVarDeclInitializer
CXCursor clang_Cursor_getVarDeclInitializer(CXCursor cursor)

If cursor refers to a variable declaration and it has initializer returns cursor referring to the initializer otherwise return null cursor.

clang_Cursor_hasAttrs
uint clang_Cursor_hasAttrs(CXCursor C)

Determine whether the given cursor has any attributes.

clang_Cursor_hasVarDeclExternalStorage
int clang_Cursor_hasVarDeclExternalStorage(CXCursor cursor)

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.

clang_Cursor_hasVarDeclGlobalStorage
int clang_Cursor_hasVarDeclGlobalStorage(CXCursor cursor)

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.

clang_Cursor_isAnonymous
uint clang_Cursor_isAnonymous(CXCursor C)

Determine whether the given cursor represents an anonymous tag or namespace

clang_Cursor_isAnonymousRecordDecl
uint clang_Cursor_isAnonymousRecordDecl(CXCursor C)

Determine whether the given cursor represents an anonymous record declaration.

clang_Cursor_isBitField
uint clang_Cursor_isBitField(CXCursor C)

Returns non-zero if the cursor specifies a Record member that is a bitfield.

clang_Cursor_isDynamicCall
int clang_Cursor_isDynamicCall(CXCursor C)

Given a cursor pointing to a C++ method call or an Objective-C message, returns non-zero if the method/message is "dynamic", meaning:

clang_Cursor_isExternalSymbol
uint clang_Cursor_isExternalSymbol(CXCursor C, CXString* language, CXString* definedIn, uint* isGenerated)

Returns non-zero if the given cursor points to a symbol marked with external_source_symbol attribute.

clang_Cursor_isFunctionInlined
uint clang_Cursor_isFunctionInlined(CXCursor C)

Determine whether a CXCursor that is a function declaration, is an inline declaration.

clang_Cursor_isInlineNamespace
uint clang_Cursor_isInlineNamespace(CXCursor C)

Determine whether the given cursor represents an inline namespace declaration.

clang_Cursor_isMacroBuiltin
uint clang_Cursor_isMacroBuiltin(CXCursor C)

Determine whether a CXCursor that is a macro, is a builtin one.

clang_Cursor_isMacroFunctionLike
uint clang_Cursor_isMacroFunctionLike(CXCursor C)

Determine whether a CXCursor that is a macro, is function like.

clang_Cursor_isNull
int clang_Cursor_isNull(CXCursor cursor)

Returns non-zero if \p cursor is null.

clang_Cursor_isObjCOptional
uint clang_Cursor_isObjCOptional(CXCursor C)

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".

clang_Cursor_isVariadic
uint clang_Cursor_isVariadic(CXCursor C)

Returns non-zero if the given cursor is a variadic function or method.

clang_EnumDecl_isScoped
uint clang_EnumDecl_isScoped(CXCursor C)

Determine if an enum declaration refers to a scoped enum.

clang_EvalResult_dispose
void clang_EvalResult_dispose(CXEvalResult E)

Disposes the created Eval memory.

clang_EvalResult_getAsDouble
double clang_EvalResult_getAsDouble(CXEvalResult E)

Returns the evaluation result as double if the kind is double.

clang_EvalResult_getAsInt
int clang_EvalResult_getAsInt(CXEvalResult E)

Returns the evaluation result as integer if the kind is Int.

clang_EvalResult_getAsLongLong
long clang_EvalResult_getAsLongLong(CXEvalResult E)

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.

clang_EvalResult_getAsStr
const(char)* clang_EvalResult_getAsStr(CXEvalResult E)

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.

clang_EvalResult_getAsUnsigned
ulong clang_EvalResult_getAsUnsigned(CXEvalResult E)

Returns the evaluation result as an unsigned integer if the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.

clang_EvalResult_getKind
CXEvalResultKind clang_EvalResult_getKind(CXEvalResult E)

Returns the kind of the evaluated result.

clang_EvalResult_isUnsignedInt
uint clang_EvalResult_isUnsignedInt(CXEvalResult E)

Returns a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.

clang_File_isEqual
int clang_File_isEqual(CXFile file1, CXFile file2)

Returns non-zero if the \c file1 and \c file2 point to the same file, or they are both NULL.

clang_File_tryGetRealPathName
CXString clang_File_tryGetRealPathName(CXFile file)

Returns the real path name of \c file.

clang_IndexAction_create
CXIndexAction clang_IndexAction_create(CXIndex CIdx)

An indexing action/session, to be applied to one or multiple translation units.

clang_IndexAction_dispose
void clang_IndexAction_dispose(CXIndexAction )

Destroy the given index action.

clang_Location_isFromMainFile
int clang_Location_isFromMainFile(CXSourceLocation location)

Returns non-zero if the given source location is in the main file of the corresponding translation unit.

clang_Location_isInSystemHeader
int clang_Location_isInSystemHeader(CXSourceLocation location)

Returns non-zero if the given source location is in a system header.

clang_Module_getASTFile
CXFile clang_Module_getASTFile(CXModule Module)

\param Module a module object.

clang_Module_getFullName
CXString clang_Module_getFullName(CXModule Module)

\param Module a module object.

clang_Module_getName
CXString clang_Module_getName(CXModule Module)

\param Module a module object.

clang_Module_getNumTopLevelHeaders
uint clang_Module_getNumTopLevelHeaders(CXTranslationUnit , CXModule Module)

\param Module a module object.

clang_Module_getParent
CXModule clang_Module_getParent(CXModule Module)

\param Module a module object.

clang_Module_getTopLevelHeader
CXFile clang_Module_getTopLevelHeader(CXTranslationUnit , CXModule Module, uint Index)

\param Module a module object.

clang_Module_isSystem
int clang_Module_isSystem(CXModule Module)

\param Module a module object.

clang_PrintingPolicy_dispose
void clang_PrintingPolicy_dispose(CXPrintingPolicy Policy)

Release a printing policy.

clang_PrintingPolicy_getProperty
uint clang_PrintingPolicy_getProperty(CXPrintingPolicy Policy, CXPrintingPolicyProperty Property)

Get a property value for the given printing policy.

clang_PrintingPolicy_setProperty
void clang_PrintingPolicy_setProperty(CXPrintingPolicy Policy, CXPrintingPolicyProperty Property, uint Value)

Set a property value for the given printing policy.

clang_Range_isNull
int clang_Range_isNull(CXSourceRange range)

Returns non-zero if \p range is null.

clang_TargetInfo_dispose
void clang_TargetInfo_dispose(CXTargetInfo Info)

Destroy the CXTargetInfo object.

clang_TargetInfo_getPointerWidth
int clang_TargetInfo_getPointerWidth(CXTargetInfo Info)

Get the pointer width of the target in bits.

clang_TargetInfo_getTriple
CXString clang_TargetInfo_getTriple(CXTargetInfo Info)

Get the normalized target triple as a string.

clang_Type_getAlignOf
long clang_Type_getAlignOf(CXType T)

Return the alignment of a type in bytes as per C++expr.alignof standard.

clang_Type_getCXXRefQualifier
CXRefQualifierKind clang_Type_getCXXRefQualifier(CXType T)

Retrieve the ref-qualifier kind of a function or method.

clang_Type_getClassType
CXType clang_Type_getClassType(CXType T)

Return the class type of an member pointer type.

clang_Type_getModifiedType
CXType clang_Type_getModifiedType(CXType T)

Return the type that was modified by this attributed type.

clang_Type_getNamedType
CXType clang_Type_getNamedType(CXType T)

Retrieve the type named by the qualified-id.

clang_Type_getNullability
CXTypeNullabilityKind clang_Type_getNullability(CXType T)

Retrieve the nullability kind of a pointer type.

clang_Type_getNumObjCProtocolRefs
uint clang_Type_getNumObjCProtocolRefs(CXType T)

Retrieve the number of protocol references associated with an ObjC object/id.

clang_Type_getNumObjCTypeArgs
uint clang_Type_getNumObjCTypeArgs(CXType T)

Retrieve the number of type arguments associated with an ObjC object.

clang_Type_getNumTemplateArguments
int clang_Type_getNumTemplateArguments(CXType T)

Returns the number of template arguments for given template specialization, or -1 if type \c T is not a template specialization.

clang_Type_getObjCEncoding
CXString clang_Type_getObjCEncoding(CXType type)

Returns the Objective-C type encoding for the specified CXType.

clang_Type_getObjCObjectBaseType
CXType clang_Type_getObjCObjectBaseType(CXType T)

Retrieves the base type of the ObjCObjectType.

clang_Type_getObjCProtocolDecl
CXCursor clang_Type_getObjCProtocolDecl(CXType T, uint i)

Retrieve the decl for a protocol reference for an ObjC object/id.

clang_Type_getObjCTypeArg
CXType clang_Type_getObjCTypeArg(CXType T, uint i)

Retrieve a type argument associated with an ObjC object.

clang_Type_getOffsetOf
long clang_Type_getOffsetOf(CXType T, const(char)* S)

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]

clang_Type_getSizeOf
long clang_Type_getSizeOf(CXType T)

Return the size of a type in bytes as per C++expr.sizeof standard.

clang_Type_getTemplateArgumentAsType
CXType clang_Type_getTemplateArgumentAsType(CXType T, uint i)

Returns the type template argument of a template class specialization at given index.

clang_Type_getValueType
CXType clang_Type_getValueType(CXType CT)

Gets the type contained by this atomic type.

clang_Type_isTransparentTagTypedef
uint clang_Type_isTransparentTagTypedef(CXType T)

Determine if a typedef is 'transparent' tag.

clang_Type_visitFields
uint clang_Type_visitFields(CXType T, CXFieldVisitor visitor, CXClientData client_data)

Visit the fields of a particular type.

clang_annotateTokens
void clang_annotateTokens(CXTranslationUnit TU, CXToken* Tokens, uint NumTokens, CXCursor* Cursors)

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.

clang_codeCompleteAt
CXCodeCompleteResults* clang_codeCompleteAt(CXTranslationUnit TU, const(char)* complete_filename, uint complete_line, uint complete_column, CXUnsavedFile* unsaved_files, uint num_unsaved_files, uint options)

Perform code completion at a given location in a translation unit.

clang_codeCompleteGetContainerKind
CXCursorKind clang_codeCompleteGetContainerKind(CXCodeCompleteResults* Results, uint* IsIncomplete)

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.

clang_codeCompleteGetContainerUSR
CXString clang_codeCompleteGetContainerUSR(CXCodeCompleteResults* Results)

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.

clang_codeCompleteGetContexts
ulong clang_codeCompleteGetContexts(CXCodeCompleteResults* Results)

Determines what completions are appropriate for the context the given code completion.

clang_codeCompleteGetDiagnostic
CXDiagnostic clang_codeCompleteGetDiagnostic(CXCodeCompleteResults* Results, uint Index)

Retrieve a diagnostic associated with the given code completion.

clang_codeCompleteGetNumDiagnostics
uint clang_codeCompleteGetNumDiagnostics(CXCodeCompleteResults* Results)

Determine the number of diagnostics produced prior to the location where code completion was performed.

clang_codeCompleteGetObjCSelector
CXString clang_codeCompleteGetObjCSelector(CXCodeCompleteResults* Results)

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.

clang_constructUSR_ObjCCategory
CXString clang_constructUSR_ObjCCategory(const(char)* class_name, const(char)* category_name)

Construct a USR for a specified Objective-C category.

clang_constructUSR_ObjCClass
CXString clang_constructUSR_ObjCClass(const(char)* class_name)

Construct a USR for a specified Objective-C class.

clang_constructUSR_ObjCIvar
CXString clang_constructUSR_ObjCIvar(const(char)* name, CXString classUSR)

Construct a USR for a specified Objective-C instance variable and the USR for its containing class.

clang_constructUSR_ObjCMethod
CXString clang_constructUSR_ObjCMethod(const(char)* name, uint isInstanceMethod, CXString classUSR)

Construct a USR for a specified Objective-C method and the USR for its containing class.

clang_constructUSR_ObjCProperty
CXString clang_constructUSR_ObjCProperty(const(char)* property, CXString classUSR)

Construct a USR for a specified Objective-C property and the USR for its containing class.

clang_constructUSR_ObjCProtocol
CXString clang_constructUSR_ObjCProtocol(const(char)* protocol_name)

Construct a USR for a specified Objective-C protocol.

clang_createCXCursorSet
CXCursorSet clang_createCXCursorSet()

Creates an empty CXCursorSet.

clang_createIndex
CXIndex clang_createIndex(int excludeDeclarationsFromPCH, int displayDiagnostics)

Provides a shared context for creating translation units.

clang_createTranslationUnit
CXTranslationUnit clang_createTranslationUnit(CXIndex CIdx, const(char)* ast_filename)

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.

clang_createTranslationUnit2
CXErrorCode clang_createTranslationUnit2(CXIndex CIdx, const(char)* ast_filename, CXTranslationUnit* out_TU)

Create a translation unit from an AST file (\c -emit-ast).

clang_createTranslationUnitFromSourceFile
CXTranslationUnit clang_createTranslationUnitFromSourceFile(CXIndex CIdx, const(char)* source_filename, int num_clang_command_line_args, const(char*)* clang_command_line_args, uint num_unsaved_files, CXUnsavedFile* unsaved_files)

Return the CXTranslationUnit for a given source file and the provided command line arguments one would pass to the compiler.

clang_defaultCodeCompleteOptions
uint clang_defaultCodeCompleteOptions()

Returns a default set of code-completion options that can be passed to\c clang_codeCompleteAt().

clang_defaultDiagnosticDisplayOptions
uint clang_defaultDiagnosticDisplayOptions()

Retrieve the set of display options most similar to the default behavior of the clang compiler.

clang_defaultEditingTranslationUnitOptions
uint clang_defaultEditingTranslationUnitOptions()

Returns the set of flags that is suitable for parsing a translation unit that is being edited.

clang_defaultReparseOptions
uint clang_defaultReparseOptions(CXTranslationUnit TU)

Returns the set of flags that is suitable for reparsing a translation unit.

clang_defaultSaveOptions
uint clang_defaultSaveOptions(CXTranslationUnit TU)

Returns the set of flags that is suitable for saving a translation unit.

clang_disposeCXCursorSet
void clang_disposeCXCursorSet(CXCursorSet cset)

Disposes a CXCursorSet and releases its associated memory.

clang_disposeCXPlatformAvailability
void clang_disposeCXPlatformAvailability(CXPlatformAvailability* availability)

Free the memory associated with a \c CXPlatformAvailability structure.

clang_disposeCXTUResourceUsage
void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_disposeCodeCompleteResults
void clang_disposeCodeCompleteResults(CXCodeCompleteResults* Results)

Free the given set of code-completion results.

clang_disposeDiagnostic
void clang_disposeDiagnostic(CXDiagnostic Diagnostic)

Destroy a diagnostic.

clang_disposeDiagnosticSet
void clang_disposeDiagnosticSet(CXDiagnosticSet Diags)

Release a CXDiagnosticSet and all of its contained diagnostics.

clang_disposeIndex
void clang_disposeIndex(CXIndex index)

Destroy the given index.

clang_disposeOverriddenCursors
void clang_disposeOverriddenCursors(CXCursor* overridden)

Free the set of overridden cursors returned by \c clang_getOverriddenCursors().

clang_disposeSourceRangeList
void clang_disposeSourceRangeList(CXSourceRangeList* ranges)

Destroy the given \c CXSourceRangeList.

clang_disposeTokens
void clang_disposeTokens(CXTranslationUnit TU, CXToken* Tokens, uint NumTokens)

Free the given set of tokens.

clang_disposeTranslationUnit
void clang_disposeTranslationUnit(CXTranslationUnit )

Destroy the specified CXTranslationUnit object.

clang_enableStackTraces
void clang_enableStackTraces()
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_equalCursors
uint clang_equalCursors(CXCursor , CXCursor )

Determine whether two cursors are equivalent.

clang_equalLocations
uint clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2)

Determine whether two source locations, which must refer into the same translation unit, refer to exactly the same point in the source code.

clang_equalRanges
uint clang_equalRanges(CXSourceRange range1, CXSourceRange range2)

Determine whether two ranges are equivalent.

clang_equalTypes
uint clang_equalTypes(CXType A, CXType B)

Determine whether two CXTypes represent the same type.

clang_executeOnThread
void clang_executeOnThread(void function(void*) fn, void* user_data, uint stack_size)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_findIncludesInFile
CXResult clang_findIncludesInFile(CXTranslationUnit TU, CXFile file, CXCursorAndRangeVisitor visitor)

Find #import/#include directives in a specific file.

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

Find references of a declaration in a specific file.

clang_formatDiagnostic
CXString clang_formatDiagnostic(CXDiagnostic Diagnostic, uint Options)

Format the given diagnostic in a manner that is suitable for display.

clang_getAddressSpace
uint clang_getAddressSpace(CXType T)

Returns the address space of the given type.

clang_getAllSkippedRanges
CXSourceRangeList* clang_getAllSkippedRanges(CXTranslationUnit tu)

Retrieve all ranges from all files that were skipped by the preprocessor.

clang_getArgType
CXType clang_getArgType(CXType T, uint i)

Retrieve the type of a parameter of a function type.

clang_getArrayElementType
CXType clang_getArrayElementType(CXType T)

Return the element type of an array type.

clang_getArraySize
long clang_getArraySize(CXType T)

Return the array size of a constant array.

clang_getCXTUResourceUsage
CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU)

Return the memory usage of a translation unit. This object should be released with clang_disposeCXTUResourceUsage().

clang_getCXXAccessSpecifier
CX_CXXAccessSpecifier clang_getCXXAccessSpecifier(CXCursor )

Returns the access control level for the referenced object.

clang_getCanonicalCursor
CXCursor clang_getCanonicalCursor(CXCursor )

Retrieve the canonical cursor corresponding to the given cursor.

clang_getCanonicalType
CXType clang_getCanonicalType(CXType T)

Return the canonical type for a CXType.

clang_getChildDiagnostics
CXDiagnosticSet clang_getChildDiagnostics(CXDiagnostic D)

Retrieve the child diagnostics of a CXDiagnostic.

clang_getClangVersion
CXString clang_getClangVersion()

Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).

clang_getCompletionAnnotation
CXString clang_getCompletionAnnotation(CXCompletionString completion_string, uint annotation_number)

Retrieve the annotation associated with the given completion string.

clang_getCompletionAvailability
CXAvailabilityKind clang_getCompletionAvailability(CXCompletionString completion_string)

Determine the availability of the entity that this code-completion string refers to.

clang_getCompletionBriefComment
CXString clang_getCompletionBriefComment(CXCompletionString completion_string)

Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.

clang_getCompletionChunkCompletionString
CXCompletionString clang_getCompletionChunkCompletionString(CXCompletionString completion_string, uint chunk_number)

Retrieve the completion string associated with a particular chunk within a completion string.

clang_getCompletionChunkKind
CXCompletionChunkKind clang_getCompletionChunkKind(CXCompletionString completion_string, uint chunk_number)

Determine the kind of a particular chunk within a completion string.

clang_getCompletionChunkText
CXString clang_getCompletionChunkText(CXCompletionString completion_string, uint chunk_number)

Retrieve the text associated with a particular chunk within a completion string.

clang_getCompletionFixIt
CXString clang_getCompletionFixIt(CXCodeCompleteResults* results, uint completion_index, uint fixit_index, CXSourceRange* replacement_range)

Fix-its that *must* be applied before inserting the text for the corresponding completion.

clang_getCompletionNumAnnotations
uint clang_getCompletionNumAnnotations(CXCompletionString completion_string)

Retrieve the number of annotations associated with the given completion string.

clang_getCompletionNumFixIts
uint clang_getCompletionNumFixIts(CXCodeCompleteResults* results, uint completion_index)

Retrieve the number of fix-its for the given completion index.

clang_getCompletionParent
CXString clang_getCompletionParent(CXCompletionString completion_string, CXCursorKind* kind)

Retrieve the parent context of the given completion string.

clang_getCompletionPriority
uint clang_getCompletionPriority(CXCompletionString completion_string)

Determine the priority of this code completion.

clang_getCursor
CXCursor clang_getCursor(CXTranslationUnit , CXSourceLocation )

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

clang_getCursorAvailability
CXAvailabilityKind clang_getCursorAvailability(CXCursor cursor)

Determine the availability of the entity that this cursor refers to, taking the current target platform into account.

clang_getCursorCompletionString
CXCompletionString clang_getCursorCompletionString(CXCursor cursor)

Retrieve a completion string for an arbitrary declaration or macro definition cursor.

clang_getCursorDefinition
CXCursor clang_getCursorDefinition(CXCursor )

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.

clang_getCursorDisplayName
CXString clang_getCursorDisplayName(CXCursor )

Retrieve the display name for the entity referenced by this cursor.

clang_getCursorExceptionSpecificationType
int clang_getCursorExceptionSpecificationType(CXCursor C)

Retrieve the exception specification type associated with a given cursor. This is a value of type CXCursor_ExceptionSpecificationKind.

clang_getCursorExtent
CXSourceRange clang_getCursorExtent(CXCursor )

Retrieve the physical extent of the source construct referenced by the given cursor.

clang_getCursorKind
CXCursorKind clang_getCursorKind(CXCursor )

Retrieve the kind of the given cursor.

clang_getCursorKindSpelling
CXString clang_getCursorKindSpelling(CXCursorKind Kind)

\defgroup CINDEX_DEBUG Debugging facilities

clang_getCursorLanguage
CXLanguageKind clang_getCursorLanguage(CXCursor cursor)

Determine the "language" of the entity referred to by a given cursor.

clang_getCursorLexicalParent
CXCursor clang_getCursorLexicalParent(CXCursor cursor)

Determine the lexical parent of the given cursor.

clang_getCursorLinkage
CXLinkageKind clang_getCursorLinkage(CXCursor cursor)

Determine the linkage of the entity referred to by a given cursor.

clang_getCursorLocation
CXSourceLocation clang_getCursorLocation(CXCursor )

Retrieve the physical location of the source constructor referenced by the given cursor.

clang_getCursorPlatformAvailability
int clang_getCursorPlatformAvailability(CXCursor cursor, int* always_deprecated, CXString* deprecated_message, int* always_unavailable, CXString* unavailable_message, CXPlatformAvailability* availability, int availability_size)

Determine the availability of the entity that this cursor refers to on any platforms for which availability information is known.

clang_getCursorPrettyPrinted
CXString clang_getCursorPrettyPrinted(CXCursor Cursor, CXPrintingPolicy Policy)

Pretty print declarations.

clang_getCursorPrintingPolicy
CXPrintingPolicy clang_getCursorPrintingPolicy(CXCursor )

Retrieve the default policy for the cursor.

clang_getCursorReferenceNameRange
CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, uint NameFlags, uint PieceIndex)

Given a cursor that references something else, return the source range covering that reference.

clang_getCursorReferenced
CXCursor clang_getCursorReferenced(CXCursor )

For a cursor that is a reference, retrieve a cursor representing the entity that it references.

clang_getCursorResultType
CXType clang_getCursorResultType(CXCursor C)

Retrieve the return type associated with a given cursor.

clang_getCursorSemanticParent
CXCursor clang_getCursorSemanticParent(CXCursor cursor)

Determine the semantic parent of the given cursor.

clang_getCursorSpelling
CXString clang_getCursorSpelling(CXCursor )

Retrieve a name for the entity referenced by this cursor.

clang_getCursorTLSKind
CXTLSKind clang_getCursorTLSKind(CXCursor cursor)

Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.

clang_getCursorType
CXType clang_getCursorType(CXCursor C)

Retrieve the type of a CXCursor (if any).

clang_getCursorUSR
CXString clang_getCursorUSR(CXCursor )

Retrieve a Unified Symbol Resolution (USR) for the entity referenced by the given cursor.

clang_getCursorVisibility
CXVisibilityKind clang_getCursorVisibility(CXCursor cursor)

Describe the visibility of the entity referred to by a cursor.

clang_getDeclObjCTypeEncoding
CXString clang_getDeclObjCTypeEncoding(CXCursor C)

Returns the Objective-C type encoding for the specified declaration.

clang_getDefinitionSpellingAndExtent
void clang_getDefinitionSpellingAndExtent(CXCursor , const(char*)* startBuf, const(char*)* endBuf, uint* startLine, uint* startColumn, uint* endLine, uint* endColumn)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_getDiagnostic
CXDiagnostic clang_getDiagnostic(CXTranslationUnit Unit, uint Index)

Retrieve a diagnostic associated with the given translation unit.

clang_getDiagnosticCategory
uint clang_getDiagnosticCategory(CXDiagnostic )

Retrieve the category number for this diagnostic.

clang_getDiagnosticCategoryName
CXString clang_getDiagnosticCategoryName(uint Category)

Retrieve the name of a particular diagnostic category. This is now deprecated. Use clang_getDiagnosticCategoryText() instead.

clang_getDiagnosticCategoryText
CXString clang_getDiagnosticCategoryText(CXDiagnostic )

Retrieve the diagnostic category text for a given diagnostic.

clang_getDiagnosticFixIt
CXString clang_getDiagnosticFixIt(CXDiagnostic Diagnostic, uint FixIt, CXSourceRange* ReplacementRange)

Retrieve the replacement information for a given fix-it.

clang_getDiagnosticInSet
CXDiagnostic clang_getDiagnosticInSet(CXDiagnosticSet Diags, uint Index)

Retrieve a diagnostic associated with the given CXDiagnosticSet.

clang_getDiagnosticLocation
CXSourceLocation clang_getDiagnosticLocation(CXDiagnostic )

Retrieve the source location of the given diagnostic.

clang_getDiagnosticNumFixIts
uint clang_getDiagnosticNumFixIts(CXDiagnostic Diagnostic)

Determine the number of fix-it hints associated with the given diagnostic.

clang_getDiagnosticNumRanges
uint clang_getDiagnosticNumRanges(CXDiagnostic )

Determine the number of source ranges associated with the given diagnostic.

clang_getDiagnosticOption
CXString clang_getDiagnosticOption(CXDiagnostic Diag, CXString* Disable)

Retrieve the name of the command-line option that enabled this diagnostic.

clang_getDiagnosticRange
CXSourceRange clang_getDiagnosticRange(CXDiagnostic Diagnostic, uint Range)

Retrieve a source range associated with the diagnostic.

clang_getDiagnosticSetFromTU
CXDiagnosticSet clang_getDiagnosticSetFromTU(CXTranslationUnit Unit)

Retrieve the complete set of diagnostics associated with a translation unit.

clang_getDiagnosticSeverity
CXDiagnosticSeverity clang_getDiagnosticSeverity(CXDiagnostic )

Determine the severity of the given diagnostic.

clang_getDiagnosticSpelling
CXString clang_getDiagnosticSpelling(CXDiagnostic )

Retrieve the text of the given diagnostic.

clang_getElementType
CXType clang_getElementType(CXType T)

Return the element type of an array, complex, or vector type.

clang_getEnumConstantDeclUnsignedValue
ulong clang_getEnumConstantDeclUnsignedValue(CXCursor C)

Retrieve the integer value of an enum constant declaration as an unsigned long long.

clang_getEnumConstantDeclValue
long clang_getEnumConstantDeclValue(CXCursor C)

Retrieve the integer value of an enum constant declaration as a signed long long.

clang_getEnumDeclIntegerType
CXType clang_getEnumDeclIntegerType(CXCursor C)

Retrieve the integer type of an enum declaration.

clang_getExceptionSpecificationType
int clang_getExceptionSpecificationType(CXType T)

Retrieve the exception specification type associated with a function type. This is a value of type CXCursor_ExceptionSpecificationKind.

clang_getExpansionLocation
void clang_getExpansionLocation(CXSourceLocation location, CXFile* file, uint* line, uint* column, uint* offset)

Retrieve the file, line, column, and offset represented by the given source location.

clang_getFieldDeclBitWidth
int clang_getFieldDeclBitWidth(CXCursor C)

Retrieve the bit width of a bit field declaration as an integer.

clang_getFile
CXFile clang_getFile(CXTranslationUnit tu, const(char)* file_name)

Retrieve a file handle within the given translation unit.

clang_getFileContents
const(char)* clang_getFileContents(CXTranslationUnit tu, CXFile file, size_t* size)

Retrieve the buffer associated with the given file.

clang_getFileLocation
void clang_getFileLocation(CXSourceLocation location, CXFile* file, uint* line, uint* column, uint* offset)

Retrieve the file, line, column, and offset represented by the given source location.

clang_getFileName
CXString clang_getFileName(CXFile SFile)

Retrieve the complete file and path name of the given file.

clang_getFileTime
time_t clang_getFileTime(CXFile SFile)

Retrieve the last modification time of the given file.

clang_getFileUniqueID
int clang_getFileUniqueID(CXFile file, CXFileUniqueID* outID)

Retrieve the unique ID for the given \c file.

clang_getFunctionTypeCallingConv
CXCallingConv clang_getFunctionTypeCallingConv(CXType T)

Retrieve the calling convention associated with a function type.

clang_getIBOutletCollectionType
CXType clang_getIBOutletCollectionType(CXCursor )

For cursors representing an iboutletcollection attribute, this function returns the collection element type.

clang_getIncludedFile
CXFile clang_getIncludedFile(CXCursor cursor)

Retrieve the file that is included by the given inclusion directive cursor.

clang_getInclusions
void clang_getInclusions(CXTranslationUnit tu, CXInclusionVisitor visitor, CXClientData client_data)

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).

clang_getInstantiationLocation
void clang_getInstantiationLocation(CXSourceLocation location, CXFile* file, uint* line, uint* column, uint* offset)

Legacy API to retrieve the file, line, column, and offset represented by the given source location.

clang_getLocation
CXSourceLocation clang_getLocation(CXTranslationUnit tu, CXFile file, uint line, uint column)

Retrieves the source location associated with a given file/line/column in a particular translation unit.

clang_getLocationForOffset
CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu, CXFile file, uint offset)

Retrieves the source location associated with a given character offset in a particular translation unit.

clang_getModuleForFile
CXModule clang_getModuleForFile(CXTranslationUnit , CXFile )

Given a CXFile header file, return the module that contains it, if one exists.

clang_getNullCursor
CXCursor clang_getNullCursor()

Retrieve the NULL cursor, which represents no entity.

clang_getNullLocation
CXSourceLocation clang_getNullLocation()

Retrieve a NULL (invalid) source location.

clang_getNullRange
CXSourceRange clang_getNullRange()

Retrieve a NULL (invalid) source range.

clang_getNumArgTypes
int clang_getNumArgTypes(CXType T)

Retrieve the number of non-variadic parameters associated with a function type.

clang_getNumCompletionChunks
uint clang_getNumCompletionChunks(CXCompletionString completion_string)

Retrieve the number of chunks in the given code-completion string.

clang_getNumDiagnostics
uint clang_getNumDiagnostics(CXTranslationUnit Unit)

Determine the number of diagnostics produced for the given translation unit.

clang_getNumDiagnosticsInSet
uint clang_getNumDiagnosticsInSet(CXDiagnosticSet Diags)

Determine the number of diagnostics in a CXDiagnosticSet.

clang_getNumElements
long clang_getNumElements(CXType T)

Return the number of elements of an array or vector type.

clang_getNumOverloadedDecls
uint clang_getNumOverloadedDecls(CXCursor cursor)

Determine the number of overloaded declarations referenced by a \c CXCursor_OverloadedDeclRef cursor.

clang_getOverloadedDecl
CXCursor clang_getOverloadedDecl(CXCursor cursor, uint index)

Retrieve a cursor for one of the overloaded declarations referenced by a \c CXCursor_OverloadedDeclRef cursor.

clang_getOverriddenCursors
void clang_getOverriddenCursors(CXCursor cursor, CXCursor** overridden, uint* num_overridden)

Determine the set of methods that are overridden by the given method.

clang_getPointeeType
CXType clang_getPointeeType(CXType T)

For pointer types, returns the type of the pointee.

clang_getPresumedLocation
void clang_getPresumedLocation(CXSourceLocation location, CXString* filename, uint* line, uint* column)

Retrieve the file, line and column represented by the given source location, as specified in a # line directive.

clang_getRange
CXSourceRange clang_getRange(CXSourceLocation begin, CXSourceLocation end)

Retrieve a source range given the beginning and ending source locations.

clang_getRangeEnd
CXSourceLocation clang_getRangeEnd(CXSourceRange range)

Retrieve a source location representing the last character within a source range.

clang_getRangeStart
CXSourceLocation clang_getRangeStart(CXSourceRange range)

Retrieve a source location representing the first character within a source range.

clang_getRemappings
CXRemapping clang_getRemappings(const(char)* path)

Retrieve a remapping.

clang_getRemappingsFromFileList
CXRemapping clang_getRemappingsFromFileList(const(char*)* filePaths, uint numFiles)

Retrieve a remapping.

clang_getResultType
CXType clang_getResultType(CXType T)

Retrieve the return type associated with a function type.

clang_getSkippedRanges
CXSourceRangeList* clang_getSkippedRanges(CXTranslationUnit tu, CXFile file)

Retrieve all ranges that were skipped by the preprocessor.

clang_getSpecializedCursorTemplate
CXCursor clang_getSpecializedCursorTemplate(CXCursor C)

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.

clang_getSpellingLocation
void clang_getSpellingLocation(CXSourceLocation location, CXFile* file, uint* line, uint* column, uint* offset)

Retrieve the file, line, column, and offset represented by the given source location.

clang_getTUResourceUsageName
const(char)* clang_getTUResourceUsageName(CXTUResourceUsageKind kind)

Returns the human-readable null-terminated C string that represents the name of the memory category. This string should never be freed.

clang_getTemplateCursorKind
CXCursorKind clang_getTemplateCursorKind(CXCursor C)

Given a cursor that represents a template, determine the cursor kind of the specializations would be generated by instantiating the template.

clang_getToken
CXToken* clang_getToken(CXTranslationUnit TU, CXSourceLocation Location)

Get the raw lexical token starting with the given location.

clang_getTokenExtent
CXSourceRange clang_getTokenExtent(CXTranslationUnit , CXToken )

Retrieve a source range that covers the given token.

clang_getTokenKind
CXTokenKind clang_getTokenKind(CXToken )

Determine the kind of the given token.

clang_getTokenLocation
CXSourceLocation clang_getTokenLocation(CXTranslationUnit , CXToken )

Retrieve the source location of the given token.

clang_getTokenSpelling
CXString clang_getTokenSpelling(CXTranslationUnit , CXToken )

Determine the spelling of the given token.

clang_getTranslationUnitCursor
CXCursor clang_getTranslationUnitCursor(CXTranslationUnit )

Retrieve the cursor that represents the given translation unit.

clang_getTranslationUnitSpelling
CXString clang_getTranslationUnitSpelling(CXTranslationUnit CTUnit)

Get the original translation unit source file name.

clang_getTranslationUnitTargetInfo
CXTargetInfo clang_getTranslationUnitTargetInfo(CXTranslationUnit CTUnit)

Get target information for this translation unit.

clang_getTypeDeclaration
CXCursor clang_getTypeDeclaration(CXType T)

Return the cursor for the declaration of the given type.

clang_getTypeKindSpelling
CXString clang_getTypeKindSpelling(CXTypeKind K)

Retrieve the spelling of a given CXTypeKind.

clang_getTypeSpelling
CXString clang_getTypeSpelling(CXType CT)

Pretty-print the underlying type using the rules of the language of the translation unit from which it came.

clang_getTypedefDeclUnderlyingType
CXType clang_getTypedefDeclUnderlyingType(CXCursor C)

Retrieve the underlying type of a typedef declaration.

clang_getTypedefName
CXString clang_getTypedefName(CXType CT)

Returns the typedef name of the given type.

clang_hashCursor
uint clang_hashCursor(CXCursor )

Compute a hash value for the given cursor.

clang_indexLoc_getCXSourceLocation
CXSourceLocation clang_indexLoc_getCXSourceLocation(CXIdxLoc loc)

Retrieve the CXSourceLocation represented by the given CXIdxLoc.

clang_indexLoc_getFileLocation
void clang_indexLoc_getFileLocation(CXIdxLoc loc, CXIdxClientFile* indexFile, CXFile* file, uint* line, uint* column, uint* offset)

Retrieve the CXIdxFile, file, line, column, and offset represented by the given CXIdxLoc.

clang_indexSourceFile
int clang_indexSourceFile(CXIndexAction , CXClientData client_data, IndexerCallbacks* index_callbacks, uint index_callbacks_size, uint index_options, const(char)* source_filename, const(char*)* command_line_args, int num_command_line_args, CXUnsavedFile* unsaved_files, uint num_unsaved_files, CXTranslationUnit* out_TU, uint TU_options)

Index the given source file and the translation unit corresponding to that file via callbacks implemented through #IndexerCallbacks.

clang_indexSourceFileFullArgv
int clang_indexSourceFileFullArgv(CXIndexAction , CXClientData client_data, IndexerCallbacks* index_callbacks, uint index_callbacks_size, uint index_options, const(char)* source_filename, const(char*)* command_line_args, int num_command_line_args, CXUnsavedFile* unsaved_files, uint num_unsaved_files, CXTranslationUnit* out_TU, uint TU_options)

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.

clang_indexTranslationUnit
int clang_indexTranslationUnit(CXIndexAction , CXClientData client_data, IndexerCallbacks* index_callbacks, uint index_callbacks_size, uint index_options, CXTranslationUnit )

Index the given translation unit via callbacks implemented through #IndexerCallbacks.

clang_index_getCXXClassDeclInfo
const(CXIdxCXXClassDeclInfo)* clang_index_getCXXClassDeclInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getClientContainer
CXIdxClientContainer clang_index_getClientContainer(const(CXIdxContainerInfo)* )

For retrieving a custom CXIdxClientContainer attached to a container.

clang_index_getClientEntity
CXIdxClientEntity clang_index_getClientEntity(const(CXIdxEntityInfo)* )

For retrieving a custom CXIdxClientEntity attached to an entity.

clang_index_getIBOutletCollectionAttrInfo
const(CXIdxIBOutletCollectionAttrInfo)* clang_index_getIBOutletCollectionAttrInfo(const(CXIdxAttrInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getObjCCategoryDeclInfo
const(CXIdxObjCCategoryDeclInfo)* clang_index_getObjCCategoryDeclInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getObjCContainerDeclInfo
const(CXIdxObjCContainerDeclInfo)* clang_index_getObjCContainerDeclInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getObjCInterfaceDeclInfo
const(CXIdxObjCInterfaceDeclInfo)* clang_index_getObjCInterfaceDeclInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getObjCPropertyDeclInfo
const(CXIdxObjCPropertyDeclInfo)* clang_index_getObjCPropertyDeclInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_getObjCProtocolRefListInfo
const(CXIdxObjCProtocolRefListInfo)* clang_index_getObjCProtocolRefListInfo(const(CXIdxDeclInfo)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_isEntityObjCContainerKind
int clang_index_isEntityObjCContainerKind(CXIdxEntityKind )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
clang_index_setClientContainer
void clang_index_setClientContainer(const(CXIdxContainerInfo)* , CXIdxClientContainer )

For setting a custom CXIdxClientContainer attached to a container.

clang_index_setClientEntity
void clang_index_setClientEntity(const(CXIdxEntityInfo)* , CXIdxClientEntity )

For setting a custom CXIdxClientEntity attached to an entity.

clang_isAttribute
uint clang_isAttribute(CXCursorKind )

Determine whether the given cursor kind represents an attribute.

clang_isConstQualifiedType
uint clang_isConstQualifiedType(CXType T)

Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.

clang_isCursorDefinition
uint clang_isCursorDefinition(CXCursor )

Determine whether the declaration pointed to by this cursor is also a definition of that entity.

clang_isDeclaration
uint clang_isDeclaration(CXCursorKind )

Determine whether the given cursor kind represents a declaration.

clang_isExpression
uint clang_isExpression(CXCursorKind )

Determine whether the given cursor kind represents an expression.

clang_isFileMultipleIncludeGuarded
uint clang_isFileMultipleIncludeGuarded(CXTranslationUnit tu, CXFile file)

Determine whether the given header is guarded against multiple inclusions, either with the conventional \#ifndef/\#define/\#endif macro guards or with \#pragma once.

clang_isFunctionTypeVariadic
uint clang_isFunctionTypeVariadic(CXType T)

Return 1 if the CXType is a variadic function type, and 0 otherwise.

clang_isInvalid
uint clang_isInvalid(CXCursorKind )

Determine whether the given cursor kind represents an invalid cursor.

clang_isInvalidDeclaration
uint clang_isInvalidDeclaration(CXCursor )

Determine whether the given declaration is invalid.

clang_isPODType
uint clang_isPODType(CXType T)

Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.

clang_isPreprocessing
uint clang_isPreprocessing(CXCursorKind )

Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.

clang_isReference
uint clang_isReference(CXCursorKind )

Determine whether the given cursor kind represents a simple reference.

clang_isRestrictQualifiedType
uint clang_isRestrictQualifiedType(CXType T)

Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.

clang_isStatement
uint clang_isStatement(CXCursorKind )

Determine whether the given cursor kind represents a statement.

clang_isTranslationUnit
uint clang_isTranslationUnit(CXCursorKind )

Determine whether the given cursor kind represents a translation unit.

clang_isUnexposed
uint clang_isUnexposed(CXCursorKind )

Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).

clang_isVirtualBase
uint clang_isVirtualBase(CXCursor )

Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.

clang_isVolatileQualifiedType
uint clang_isVolatileQualifiedType(CXType T)

Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.

clang_loadDiagnostics
CXDiagnosticSet clang_loadDiagnostics(const(char)* file, CXLoadDiag_Error* error, CXString* errorString)

Deserialize a set of diagnostics from a Clang diagnostics bitcode file.

clang_parseTranslationUnit
CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx, const(char)* source_filename, const(char*)* command_line_args, int num_command_line_args, CXUnsavedFile* unsaved_files, uint num_unsaved_files, uint options)

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.

clang_parseTranslationUnit2
CXErrorCode clang_parseTranslationUnit2(CXIndex CIdx, const(char)* source_filename, const(char*)* command_line_args, int num_command_line_args, CXUnsavedFile* unsaved_files, uint num_unsaved_files, uint options, CXTranslationUnit* out_TU)

Parse the given source file and the translation unit corresponding to that file.

clang_parseTranslationUnit2FullArgv
CXErrorCode clang_parseTranslationUnit2FullArgv(CXIndex CIdx, const(char)* source_filename, const(char*)* command_line_args, int num_command_line_args, CXUnsavedFile* unsaved_files, uint num_unsaved_files, uint options, CXTranslationUnit* out_TU)

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.

clang_remap_dispose
void clang_remap_dispose(CXRemapping )

Dispose the remapping.

clang_remap_getFilenames
void clang_remap_getFilenames(CXRemapping , uint index, CXString* original, CXString* transformed)

Get the original and the associated filename from the remapping.

clang_remap_getNumFiles
uint clang_remap_getNumFiles(CXRemapping )

Determine the number of remappings.

clang_reparseTranslationUnit
int clang_reparseTranslationUnit(CXTranslationUnit TU, uint num_unsaved_files, CXUnsavedFile* unsaved_files, uint options)

Reparse the source files that produced this translation unit.

clang_saveTranslationUnit
int clang_saveTranslationUnit(CXTranslationUnit TU, const(char)* FileName, uint options)

Saves a translation unit into a serialized representation of that translation unit on disk.

clang_sortCodeCompletionResults
void clang_sortCodeCompletionResults(CXCompletionResult* Results, uint NumResults)

Sort the code-completion results in case-insensitive alphabetical order.

clang_suspendTranslationUnit
uint clang_suspendTranslationUnit(CXTranslationUnit )

Suspend a translation unit in order to free memory associated with it.

clang_toggleCrashRecovery
void clang_toggleCrashRecovery(uint isEnabled)

Enable/disable crash recovery.

clang_tokenize
void clang_tokenize(CXTranslationUnit TU, CXSourceRange Range, CXToken** Tokens, uint* NumTokens)

Tokenize the source code described by the given range into raw lexical tokens.

clang_visitChildren
uint clang_visitChildren(CXCursor parent, CXCursorVisitor visitor, CXClientData client_data)

Visit the children of a particular cursor.

Manifest constants

CINDEX_VERSION
enum CINDEX_VERSION;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CINDEX_VERSION_MAJOR
enum CINDEX_VERSION_MAJOR;

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.

CINDEX_VERSION_MINOR
enum CINDEX_VERSION_MINOR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CINDEX_VERSION_STRING
enum CINDEX_VERSION_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

CXCodeCompleteResults
struct CXCodeCompleteResults

Contains the results of code-completion.

CXCompletionResult
struct CXCompletionResult

A single result of code completion.

CXCursor
struct CXCursor

A cursor representing some element in the abstract syntax tree for a translation unit.

CXCursorAndRangeVisitor
struct CXCursorAndRangeVisitor
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXCursorSetImpl
struct CXCursorSetImpl

A fast container representing a set of CXCursors.

CXFileUniqueID
struct CXFileUniqueID

Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session.

CXIdxAttrInfo
struct CXIdxAttrInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxBaseClassInfo
struct CXIdxBaseClassInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxCXXClassDeclInfo
struct CXIdxCXXClassDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxContainerInfo
struct CXIdxContainerInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxDeclInfo
struct CXIdxDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxEntityInfo
struct CXIdxEntityInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxEntityRefInfo
struct CXIdxEntityRefInfo

Data for IndexerCallbacks#indexEntityReference.

CXIdxIBOutletCollectionAttrInfo
struct CXIdxIBOutletCollectionAttrInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxImportedASTFileInfo
struct CXIdxImportedASTFileInfo

Data for IndexerCallbacks#importedASTFile.

CXIdxIncludedFileInfo
struct CXIdxIncludedFileInfo

Data for ppIncludedFile callback.

CXIdxLoc
struct CXIdxLoc

Source location passed to index callbacks.

CXIdxObjCCategoryDeclInfo
struct CXIdxObjCCategoryDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxObjCContainerDeclInfo
struct CXIdxObjCContainerDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxObjCInterfaceDeclInfo
struct CXIdxObjCInterfaceDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxObjCPropertyDeclInfo
struct CXIdxObjCPropertyDeclInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxObjCProtocolRefInfo
struct CXIdxObjCProtocolRefInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXIdxObjCProtocolRefListInfo
struct CXIdxObjCProtocolRefListInfo
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXPlatformAvailability
struct CXPlatformAvailability

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.

CXSourceLocation
struct CXSourceLocation

Identifies a specific source location within a translation unit.

CXSourceRange
struct CXSourceRange

Identifies a half-open character range in the source code.

CXSourceRangeList
struct CXSourceRangeList

Identifies an array of ranges.

CXTUResourceUsage
struct CXTUResourceUsage

The memory usage of a CXTranslationUnit, broken into categories.

CXTUResourceUsageEntry
struct CXTUResourceUsageEntry
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CXTargetInfoImpl
struct CXTargetInfoImpl

An opaque type representing target information for a given translation unit.

CXToken
struct CXToken

Describes a single preprocessing token.

CXTranslationUnitImpl
struct CXTranslationUnitImpl

A single translation unit, which resides in an index.

CXType
struct CXType

The type of an element in the abstract syntax tree.

CXUnsavedFile
struct CXUnsavedFile

Provides the contents of a file that has not yet been saved to disk.

CXVersion
struct CXVersion

Describes a version number of the form major.minor.subminor.

IndexerCallbacks
struct IndexerCallbacks

A group of callbacks used by #clang_indexSourceFile and #clang_indexTranslationUnit.

Meta