package clangml
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=f0e0da9290a4f7e9a193754236ea028cabf2a0039f3c2e49a85e53a2cd6a2a78eade60f0c0bd73d272cd0e4bc7fba4333a645faaf14f94e4404498e4144306fc
doc/clangml/Clang/index.html
Module Clang
Source
Low-level interface
The module includes Clang__bindings
which contains the auto-generated wrappers over libclang
and some extensions defined in libclang_extensions.h
.
include module type of struct include Bindings end
include sig ... end
Return the timestamp for use with Clang's -fbuild-session-timestamp= option.
Create a CXVirtualFileOverlay object. Must be disposed with clang_VirtualFileOverlay_dispose().
Error codes returned by libclang routines.
val virtual_file_overlay_add_file_mapping :
cxvirtualfileoverlay ->
virtual_path:string ->
real_path:string ->
(unit, cxerrorcode) Stdcompat.result
Map an absolute virtual file path to an absolute real one. The virtual path must be canonicalized (not contain "."/"..").
val virtual_file_overlay_set_case_sensitivity :
cxvirtualfileoverlay ->
int ->
(unit, cxerrorcode) Stdcompat.result
Set the case sensitivity for the CXVirtualFileOverlay object. The CXVirtualFileOverlay object is case-sensitive by default, this option can be used to override the default.
val virtual_file_overlay_write_to_buffer :
cxvirtualfileoverlay ->
int ->
(string, cxerrorcode) Stdcompat.result
Write out the CXVirtualFileOverlay object to a char buffer.
Create a CXModuleMapDescriptor object. Must be disposed with clang_ModuleMapDescriptor_dispose().
val module_map_descriptor_set_framework_module_name :
cxmodulemapdescriptor ->
string ->
(unit, cxerrorcode) Stdcompat.result
Sets the framework module name that the module.map describes.
val module_map_descriptor_set_umbrella_header :
cxmodulemapdescriptor ->
string ->
(unit, cxerrorcode) Stdcompat.result
Sets the umbrella header name that the module.map describes.
val module_map_descriptor_write_to_buffer :
cxmodulemapdescriptor ->
int ->
(string, cxerrorcode) Stdcompat.result
Write out the CXModuleMapDescriptor object to a char buffer.
Provides a shared context for creating translation units.
Sets general options associated with a CXIndex.
Gets the general options associated with a CXIndex.
Sets the invocation emission path option in a CXIndex.
Retrieve the complete file and path name of the given file.
Uniquely identifies a CXFile, that refers to the same underlying file, across an indexing session.
Retrieve the unique ID for the given file.
Determine whether the given header is guarded against multiple inclusions, either with the conventional #ifndef/#define/#endif macro guards or with #pragma once.
Retrieve a file handle within the given translation unit.
Retrieve the buffer associated with the given file.
Returns non-zero if the file1 and file2 point to the same file, or they are both NULL.
Identifies a specific source location within a translation unit.
Retrieve a NULL (invalid) source location.
Determine whether two source locations, which must refer into the same translation unit, refer to exactly the same point in the source code.
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.
Returns non-zero if the given source location is in a system header.
Returns non-zero if the given source location is in the main file of the corresponding translation unit.
Identifies a half-open character range in the source code.
Retrieve a NULL (invalid) source range.
Retrieve a source range given the beginning and ending source locations.
Determine whether two ranges are equivalent.
Returns non-zero if range is null.
Retrieve the file, line, column, and offset represented by the given source location.
Retrieve the file, line and column represented by the given source location, as specified in a # line directive.
Legacy API to retrieve the file, line, column, and offset represented by the given source location.
Retrieve the file, line, column, and offset represented by the given source location.
Retrieve the file, line, column, and offset represented by the given source location.
Retrieve a source location representing the first character within a source range.
Retrieve a source location representing the last character within a source range.
Retrieve all ranges that were skipped by the preprocessor.
Retrieve all ranges from all files that were skipped by the preprocessor.
Determine the number of diagnostics in a CXDiagnosticSet.
Retrieve a diagnostic associated with the given CXDiagnosticSet.
Describes the kind of error that occurred (if any) in a call to clang_loadDiagnostics.
val load_diagnostics :
string ->
(cxdiagnosticset, cxloaddiag_error * string) Stdcompat.result
Deserialize a set of diagnostics from a Clang diagnostics bitcode file.
Retrieve the child diagnostics of a CXDiagnostic.
Determine the number of diagnostics produced for the given translation unit.
Retrieve a diagnostic associated with the given translation unit.
Retrieve the complete set of diagnostics associated with a translation unit.
Format the given diagnostic in a manner that is suitable for display.
Retrieve the set of display options most similar to the default behavior of the clang compiler.
type cxdiagnosticseverity =
| Ignored
(*A diagnostic that has been suppressed, e.g., by a command-line option.
*)| Note
(*This diagnostic is a note that should be attached to the previous (non-note) diagnostic.
*)| Warning
(*This diagnostic indicates suspicious code that may not be wrong.
*)| Error
(*This diagnostic indicates that the code is ill-formed.
*)| Fatal
(*This diagnostic indicates that the code is ill-formed such that future parser recovery is unlikely to produce useful results.
*)
Describes the severity of a particular diagnostic.
Determine the severity of the given diagnostic.
Retrieve the source location of the given diagnostic.
Retrieve the text of the given diagnostic.
Retrieve the name of the command-line option that enabled this diagnostic.
Retrieve the category number for this diagnostic.
Retrieve the diagnostic category text for a given diagnostic.
Determine the number of source ranges associated with the given diagnostic.
Retrieve a source range associated with the diagnostic.
Determine the number of fix-it hints associated with the given diagnostic.
Retrieve the replacement information for a given fix-it.
Get the original translation unit source file name.
type cxunsavedfile = {
filename : string;
(*The file whose contents have not yet been saved.
*)contents : string;
(*A buffer containing the unsaved contents of this file.
*)
}
Provides the contents of a file that has not yet been saved to disk.
val create_translation_unit_from_source_file :
cxindex ->
string ->
string array ->
cxunsavedfile array ->
cxtranslationunit
Return the CXTranslationUnit for a given source file and the provided command line arguments one would pass to the compiler.
Same as clang_createTranslationUnit2, but returns the CXTranslationUnit instead of an error code. In case of an error this routine returns a NULL CXTranslationUnit, without further detailed error codes.
val create_translation_unit2 :
cxindex ->
string ->
(cxtranslationunit, cxerrorcode) Stdcompat.result
Create a translation unit from an AST file ( -emit-ast).
Returns the set of flags that is suitable for parsing a translation unit that is being edited.
val parse_translation_unit :
cxindex ->
string ->
string array ->
cxunsavedfile array ->
Cxtranslationunit_flags.t ->
cxtranslationunit option
Same as clang_parseTranslationUnit2, but returns the CXTranslationUnit instead of an error code. In case of an error this routine returns a NULL CXTranslationUnit, without further detailed error codes.
val parse_translation_unit2 :
cxindex ->
string ->
string array ->
cxunsavedfile array ->
Cxtranslationunit_flags.t ->
(cxtranslationunit, cxerrorcode) Stdcompat.result
Parse the given source file and the translation unit corresponding to that file.
val parse_translation_unit2_full_argv :
cxindex ->
string ->
string array ->
cxunsavedfile array ->
Cxtranslationunit_flags.t ->
(cxtranslationunit, cxerrorcode) Stdcompat.result
Same as clang_parseTranslationUnit2 but requires a full command line for command_line_args including argv[0]. This is useful if the standard library paths are relative to the binary.
Returns the set of flags that is suitable for saving a translation unit.
type cxsaveerror =
| Unknown
(*Indicates that an unknown error occurred while attempting to save the file.
*)| TranslationErrors
(*Indicates that errors during translation prevented this attempt to save the translation unit.
*)| InvalidTU
(*Indicates that the translation unit to be saved was somehow invalid (e.g., NULL).
*)
Describes the kind of error that occurred (if any) in a call to clang_saveTranslationUnit().
val save_translation_unit :
cxtranslationunit ->
string ->
Cxsavetranslationunit_flags.t ->
(unit, cxsaveerror) Stdcompat.result
Saves a translation unit into a serialized representation of that translation unit on disk.
Suspend a translation unit in order to free memory associated with it.
Returns the set of flags that is suitable for reparsing a translation unit.
val reparse_translation_unit :
cxtranslationunit ->
cxunsavedfile array ->
Cxreparse_flags.t ->
(unit, cxerrorcode) Stdcompat.result
Reparse the source files that produced this translation unit.
type cxturesourceusagekind =
| AST
| Identifiers
| Selectors
| GlobalCompletionResults
| SourceManagerContentCache
| AST_SideTables
| SourceManager_Membuffer_Malloc
| SourceManager_Membuffer_MMap
| ExternalASTSource_Membuffer_Malloc
| ExternalASTSource_Membuffer_MMap
| Preprocessor
| PreprocessingRecord
| SourceManager_DataStructures
| Preprocessor_HeaderSearch
Categorizes how memory is being used by a translation unit.
Returns the human-readable null-terminated C string that represents the name of the memory category. This string should never be freed.
The memory usage of a CXTranslationUnit, broken into categories.
Return the memory usage of a translation unit. This object should be released with clang_disposeCXTUResourceUsage().
Get target information for this translation unit.
Get the normalized target triple as a string.
Get the pointer width of the target in bits.
type cxcursorkind =
| UnexposedDecl
(*A declaration whose specific kind is not exposed via this interface.
*)| StructDecl
(*A C or C++ struct.
*)| UnionDecl
(*A C or C++ union.
*)| ClassDecl
(*A C++ class.
*)| EnumDecl
(*An enumeration.
*)| FieldDecl
(*A field (in C) or non-static data member (in C++) in a struct, union, or C++ class.
*)| EnumConstantDecl
(*An enumerator constant.
*)| FunctionDecl
(*A function.
*)| VarDecl
(*A variable.
*)| ParmDecl
(*A function or method parameter.
*)| ObjCInterfaceDecl
(*An Objective-C @interface.
*)| ObjCCategoryDecl
(*An Objective-C @interface for a category.
*)| ObjCProtocolDecl
(*An Objective-C @protocol declaration.
*)| ObjCPropertyDecl
(*An Objective-C @property declaration.
*)| ObjCIvarDecl
(*An Objective-C instance variable.
*)| ObjCInstanceMethodDecl
(*An Objective-C instance method.
*)| ObjCClassMethodDecl
(*An Objective-C class method.
*)| ObjCImplementationDecl
(*An Objective-C @implementation.
*)| ObjCCategoryImplDecl
(*An Objective-C @implementation for a category.
*)| TypedefDecl
(*A typedef.
*)| CXXMethod
(*A C++ class method.
*)| Namespace
(*A C++ namespace.
*)| LinkageSpec
(*A linkage specification, e.g. 'extern "C"'.
*)| Constructor
(*A C++ constructor.
*)| Destructor
(*A C++ destructor.
*)| ConversionFunction
(*A C++ conversion function.
*)| TemplateTypeParameter
(*A C++ template type parameter.
*)| NonTypeTemplateParameter
(*A C++ non-type template parameter.
*)| TemplateTemplateParameter
(*A C++ template template parameter.
*)| FunctionTemplate
(*A C++ function template.
*)| ClassTemplate
(*A C++ class template.
*)| ClassTemplatePartialSpecialization
(*A C++ class template partial specialization.
*)| NamespaceAlias
(*A C++ namespace alias declaration.
*)| UsingDirective
(*A C++ using directive.
*)| UsingDeclaration
(*A C++ using declaration.
*)| TypeAliasDecl
(*A C++ alias declaration
*)| ObjCSynthesizeDecl
(*An Objective-C @synthesize definition.
*)| ObjCDynamicDecl
(*An Objective-C @dynamic definition.
*)| CXXAccessSpecifier
(*An access specifier.
*)| ObjCSuperClassRef
(*An access specifier.
*)| ObjCProtocolRef
(*An access specifier.
*)| ObjCClassRef
(*An access specifier.
*)| TypeRef
(*A reference to a type declaration.
*)| CXXBaseSpecifier
(*A reference to a type declaration.
*)| TemplateRef
(*A reference to a class template, function template, template template parameter, or class template partial specialization.
*)| NamespaceRef
(*A reference to a namespace or namespace alias.
*)| MemberRef
(*A reference to a member of a struct, union, or class that occurs in some non-expression context, e.g., a designated initializer.
*)| LabelRef
(*A reference to a labeled statement.
*)| OverloadedDeclRef
(*A reference to a set of overloaded functions or function templates that has not yet been resolved to a specific function or function template.
*)| VariableRef
(*A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.
*)| InvalidFile
(*A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.
*)| NoDeclFound
(*A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.
*)| NotImplemented
(*A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.
*)| InvalidCode
(*A reference to a variable that occurs in some non-expression context, e.g., a C++ lambda capture list.
*)| UnexposedExpr
(*An expression whose specific kind is not exposed via this interface.
*)| DeclRefExpr
(*An expression that refers to some value declaration, such as a function, variable, or enumerator.
*)| MemberRefExpr
(*An expression that refers to a member of a struct, union, class, Objective-C class, etc.
*)| CallExpr
(*An expression that calls a function.
*)| ObjCMessageExpr
(*An expression that sends a message to an Objective-C object or class.
*)| BlockExpr
(*An expression that represents a block literal.
*)| IntegerLiteral
(*An integer literal.
*)| FloatingLiteral
(*A floating point number literal.
*)| ImaginaryLiteral
(*An imaginary number literal.
*)| StringLiteral
(*A string literal.
*)| CharacterLiteral
(*A character literal.
*)| ParenExpr
(*A parenthesized expression, e.g. "(1)".
*)| UnaryOperator
(*This represents the unary-expression's (except sizeof and alignof).
*)| ArraySubscriptExpr
(*[C99 6.5.2.1] Array Subscripting.
*)| BinaryOperator
(*A builtin binary operation expression such as "x + y" or "x <= y".
*)| CompoundAssignOperator
(*Compound assignment such as "+=".
*)| ConditionalOperator
(*The ?: ternary operator.
*)| CStyleCastExpr
(*An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
*)| CompoundLiteralExpr
(*[C99 6.5.2.5]
*)| InitListExpr
(*Describes an C or C++ initializer list.
*)| AddrLabelExpr
(*The GNU address of label extension, representing &&label.
*)| StmtExpr
(*This is the GNU Statement Expression extension: ({int X=4; X;})
*)| GenericSelectionExpr
(*Represents a C11 generic selection.
*)| GNUNullExpr
(*Implements the GNU __null extension, which is a name for a null pointer constant that has integral type (e.g., int or long) and is the same size and alignment as a pointer.
*)| CXXStaticCastExpr
(*C++'s static_cast<> expression.
*)| CXXDynamicCastExpr
(*C++'s dynamic_cast<> expression.
*)| CXXReinterpretCastExpr
(*C++'s reinterpret_cast<> expression.
*)| CXXConstCastExpr
(*C++'s const_cast<> expression.
*)| CXXFunctionalCastExpr
(*Represents an explicit C++ type conversion that uses "functional" notion (C++ [expr.type.conv]).
*)| CXXTypeidExpr
(*A C++ typeid expression (C++ [expr.typeid]).
*)| CXXBoolLiteralExpr
(*[C++ 2.13.5] C++ Boolean Literal.
*)| CXXNullPtrLiteralExpr
(*[C++0x 2.14.7] C++ Pointer Literal.
*)| CXXThisExpr
(*Represents the "this" expression in C++
*)| CXXThrowExpr
(*[C++ 15] C++ Throw Expression.
*)| CXXNewExpr
(*A new expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
*)| CXXDeleteExpr
(*A delete expression for memory deallocation and destructor calls, e.g. "delete[] pArray".
*)| UnaryExpr
(*A unary expression. (noexcept, sizeof, or other traits)
*)| ObjCStringLiteral
(*An Objective-C string literal i.e. "foo".
*)| ObjCEncodeExpr
(*An Objective-C @encode expression.
*)| ObjCSelectorExpr
(*An Objective-C @selector expression.
*)| ObjCProtocolExpr
(*An Objective-C @protocol expression.
*)| ObjCBridgedCastExpr
(*An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers, transferring ownership in the process.
*)| PackExpansionExpr
(*Represents a C++0x pack expansion that produces a sequence of expressions.
*)| SizeOfPackExpr
(*Represents an expression that computes the length of a parameter pack.
*)| LambdaExpr
| ObjCBoolLiteralExpr
(*Objective-c Boolean Literal.
*)| ObjCSelfExpr
(*Represents the "self" expression in an Objective-C method.
*)| OMPArraySectionExpr
(*OpenMP 5.0 [2.1.5, Array Section].
*)| ObjCAvailabilityCheckExpr
(*Represents an (...) check.
*)| FixedPointLiteral
(*Fixed point literal
*)| OMPArrayShapingExpr
(*OpenMP 5.0 [2.1.4, Array Shaping].
*)| OMPIteratorExpr
(*OpenMP 5.0 [2.1.6 Iterators]
*)| CXXAddrspaceCastExpr
(*OpenCL's addrspace_cast<> expression.
*)| UnexposedStmt
(*A statement whose specific kind is not exposed via this interface.
*)| LabelStmt
(*A labelled statement in a function.
*)| CompoundStmt
(*A group of statements like { stmt stmt }.
*)| CaseStmt
(*A case statement.
*)| DefaultStmt
(*A default statement.
*)| IfStmt
(*An if statement
*)| SwitchStmt
(*A switch statement.
*)| WhileStmt
(*A while statement.
*)| DoStmt
(*A do statement.
*)| ForStmt
(*A for statement.
*)| GotoStmt
(*A goto statement.
*)| IndirectGotoStmt
(*An indirect goto statement.
*)| ContinueStmt
(*A continue statement.
*)| BreakStmt
(*A break statement.
*)| ReturnStmt
(*A return statement.
*)| GCCAsmStmt
(*A GCC inline assembly statement extension.
*)| ObjCAtTryStmt
(*Objective-C's overall @try-@catch-@finally statement.
*)| ObjCAtCatchStmt
(*Objective-C's @catch statement.
*)| ObjCAtFinallyStmt
(*Objective-C's @finally statement.
*)| ObjCAtThrowStmt
(*Objective-C's @throw statement.
*)| ObjCAtSynchronizedStmt
(*Objective-C's @synchronized statement.
*)| ObjCAutoreleasePoolStmt
(*Objective-C's autorelease pool statement.
*)| ObjCForCollectionStmt
(*Objective-C's collection statement.
*)| CXXCatchStmt
(*C++'s catch statement.
*)| CXXTryStmt
(*C++'s try statement.
*)| CXXForRangeStmt
(*C++'s for (* : *) statement.
*)| SEHTryStmt
(*Windows Structured Exception Handling's try statement.
*)| SEHExceptStmt
(*Windows Structured Exception Handling's except statement.
*)| SEHFinallyStmt
(*Windows Structured Exception Handling's finally statement.
*)| MSAsmStmt
(*A MS inline assembly statement extension.
*)| NullStmt
(*The null statement ";": C99 6.8.3p3.
*)| DeclStmt
(*Adaptor class for mixing declarations with statements and expressions.
*)| OMPParallelDirective
(*OpenMP parallel directive.
*)| OMPSimdDirective
(*OpenMP SIMD directive.
*)| OMPForDirective
(*OpenMP for directive.
*)| OMPSectionsDirective
(*OpenMP sections directive.
*)| OMPSectionDirective
(*OpenMP section directive.
*)| OMPSingleDirective
(*OpenMP single directive.
*)| OMPParallelForDirective
(*OpenMP parallel for directive.
*)| OMPParallelSectionsDirective
(*OpenMP parallel sections directive.
*)| OMPTaskDirective
(*OpenMP task directive.
*)| OMPMasterDirective
(*OpenMP master directive.
*)| OMPCriticalDirective
(*OpenMP critical directive.
*)| OMPTaskyieldDirective
(*OpenMP taskyield directive.
*)| OMPBarrierDirective
(*OpenMP barrier directive.
*)| OMPTaskwaitDirective
(*OpenMP taskwait directive.
*)| OMPFlushDirective
(*OpenMP flush directive.
*)| SEHLeaveStmt
(*Windows Structured Exception Handling's leave statement.
*)| OMPOrderedDirective
(*OpenMP ordered directive.
*)| OMPAtomicDirective
(*OpenMP atomic directive.
*)| OMPForSimdDirective
(*OpenMP for SIMD directive.
*)| OMPParallelForSimdDirective
(*OpenMP parallel for SIMD directive.
*)| OMPTargetDirective
(*OpenMP target directive.
*)| OMPTeamsDirective
(*OpenMP teams directive.
*)| OMPTaskgroupDirective
(*OpenMP taskgroup directive.
*)| OMPCancellationPointDirective
(*OpenMP cancellation point directive.
*)| OMPCancelDirective
(*OpenMP cancel directive.
*)| OMPTargetDataDirective
(*OpenMP target data directive.
*)| OMPTaskLoopDirective
(*OpenMP taskloop directive.
*)| OMPTaskLoopSimdDirective
(*OpenMP taskloop simd directive.
*)| OMPDistributeDirective
(*OpenMP distribute directive.
*)| OMPTargetEnterDataDirective
(*OpenMP target enter data directive.
*)| OMPTargetExitDataDirective
(*OpenMP target exit data directive.
*)| OMPTargetParallelDirective
(*OpenMP target parallel directive.
*)| OMPTargetParallelForDirective
(*OpenMP target parallel for directive.
*)| OMPTargetUpdateDirective
(*OpenMP target update directive.
*)| OMPDistributeParallelForDirective
(*OpenMP distribute parallel for directive.
*)| OMPDistributeParallelForSimdDirective
(*OpenMP distribute parallel for simd directive.
*)| OMPDistributeSimdDirective
(*OpenMP distribute simd directive.
*)| OMPTargetParallelForSimdDirective
(*OpenMP target parallel for simd directive.
*)| OMPTargetSimdDirective
(*OpenMP target simd directive.
*)| OMPTeamsDistributeDirective
(*OpenMP teams distribute directive.
*)| OMPTeamsDistributeSimdDirective
(*OpenMP teams distribute simd directive.
*)| OMPTeamsDistributeParallelForSimdDirective
(*OpenMP teams distribute parallel for simd directive.
*)| OMPTeamsDistributeParallelForDirective
(*OpenMP teams distribute parallel for directive.
*)| OMPTargetTeamsDirective
(*OpenMP target teams directive.
*)| OMPTargetTeamsDistributeDirective
(*OpenMP target teams distribute directive.
*)| OMPTargetTeamsDistributeParallelForDirective
(*OpenMP target teams distribute parallel for directive.
*)| OMPTargetTeamsDistributeParallelForSimdDirective
(*OpenMP target teams distribute parallel for simd directive.
*)| OMPTargetTeamsDistributeSimdDirective
(*OpenMP target teams distribute simd directive.
*)| BuiltinBitCastExpr
(*C++2a std::bit_cast expression.
*)| OMPMasterTaskLoopDirective
(*OpenMP master taskloop directive.
*)| OMPParallelMasterTaskLoopDirective
(*OpenMP parallel master taskloop directive.
*)| OMPMasterTaskLoopSimdDirective
(*OpenMP master taskloop simd directive.
*)| OMPParallelMasterTaskLoopSimdDirective
(*OpenMP parallel master taskloop simd directive.
*)| OMPParallelMasterDirective
(*OpenMP parallel master directive.
*)| OMPDepobjDirective
(*OpenMP depobj directive.
*)| OMPScanDirective
(*OpenMP scan directive.
*)| OMPTileDirective
(*OpenMP tile directive.
*)| OMPCanonicalLoop
(*OpenMP canonical loop.
*)| OMPInteropDirective
(*OpenMP interop directive.
*)| OMPDispatchDirective
(*OpenMP dispatch directive.
*)| OMPMaskedDirective
(*OpenMP masked directive.
*)| OMPUnrollDirective
(*OpenMP unroll directive.
*)| TranslationUnit
(*Cursor that represents the translation unit itself.
*)| UnexposedAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| IBActionAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| IBOutletAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| IBOutletCollectionAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CXXFinalAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CXXOverrideAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| AnnotateAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| AsmLabelAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| PackedAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| PureAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| ConstAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| NoDuplicateAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CUDAConstantAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CUDADeviceAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CUDAGlobalAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| CUDAHostAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| VisibilityAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| DLLExport
(*An attribute whose specific kind is not exposed via this interface.
*)| DLLImport
(*An attribute whose specific kind is not exposed via this interface.
*)| NSReturnsRetained
(*An attribute whose specific kind is not exposed via this interface.
*)| NSReturnsNotRetained
(*An attribute whose specific kind is not exposed via this interface.
*)| NSReturnsAutoreleased
(*An attribute whose specific kind is not exposed via this interface.
*)| NSConsumesSelf
(*An attribute whose specific kind is not exposed via this interface.
*)| NSConsumed
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCException
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCNSObject
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCIndependentClass
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCPreciseLifetime
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCReturnsInnerPointer
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCRequiresSuper
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCRootClass
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCSubclassingRestricted
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCExplicitProtocolImpl
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCDesignatedInitializer
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCRuntimeVisible
(*An attribute whose specific kind is not exposed via this interface.
*)| ObjCBoxable
(*An attribute whose specific kind is not exposed via this interface.
*)| FlagEnum
(*An attribute whose specific kind is not exposed via this interface.
*)| ConvergentAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| WarnUnusedAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| WarnUnusedResultAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| AlignedAttr
(*An attribute whose specific kind is not exposed via this interface.
*)| PreprocessingDirective
(*An attribute whose specific kind is not exposed via this interface.
*)| MacroDefinition
(*An attribute whose specific kind is not exposed via this interface.
*)| MacroExpansion
(*An attribute whose specific kind is not exposed via this interface.
*)| InclusionDirective
(*An attribute whose specific kind is not exposed via this interface.
*)| ModuleImportDecl
(*A module import declaration.
*)| TypeAliasTemplateDecl
(*A module import declaration.
*)| StaticAssert
(*A static_assert or _Static_assert node
*)| FriendDecl
(*a friend declaration.
*)| OverloadCandidate
(*A code completion overload candidate.
*)
Describes the kind of entity that a cursor refers to.
A cursor representing some element in the abstract syntax tree for a translation unit.
Retrieve the cursor that represents the given translation unit.
Retrieve the kind of the given cursor.
Determine whether the given cursor kind represents a declaration.
Determine whether the given declaration is invalid.
Determine whether the given cursor kind represents a simple reference.
Determine whether the given cursor kind represents an expression.
Determine whether the given cursor kind represents a statement.
Determine whether the given cursor kind represents an attribute.
Determine whether the given cursor kind represents an invalid cursor.
Determine whether the given cursor kind represents a translation unit.
* Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.
* Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
type cxlinkagekind =
| Invalid
(*This value indicates that no linkage information is available for a provided CXCursor.
*)| NoLinkage
(*This is the linkage for variables, parameters, and so on that have automatic storage. This covers normal (non-extern) local variables.
*)| Internal
(*This is the linkage for static variables and static functions.
*)| UniqueExternal
(*This is the linkage for entities with external linkage that live in C++ anonymous namespaces.
*)| External
(*This is the linkage for entities with true, external linkage.
*)
Describe the linkage of the entity referred to by a cursor.
Determine the linkage of the entity referred to by a given cursor.
Describe the visibility of the entity referred to by a cursor.
type cxavailabilitykind =
| Available
(*The entity is available.
*)| Deprecated
(*The entity is available, but has been deprecated (and its use is not recommended).
*)| NotAvailable
(*The entity is not available; any use of it will be an error.
*)| NotAccessible
(*The entity is available, but not accessible; any use of it will be an error.
*)
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.
Determine the availability of the entity that this cursor refers to, taking the current target platform into account.
If cursor refers to a variable declaration and it has initializer returns cursor referring to the initializer otherwise return null 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.
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.
Describe the "language" of the entity referred to by a cursor.
Determine the "language" of the entity referred to by a given cursor.
Describe the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.
Determine the "thread-local storage (TLS) kind" of the declaration referred to by a cursor.
Creates an empty CXCursorSet.
Queries a CXCursorSet to see if it contains a specific CXCursor.
Inserts a CXCursor into a CXCursorSet.
Determine the semantic parent of the given cursor.
Determine the lexical parent of the given cursor.
Determine the set of methods that are overridden by the given method.
Retrieve the file that is included by the given inclusion directive cursor.
Map a source location to the cursor that describes the entity at that location in the source code.
Retrieve the physical location of the source constructor referenced by the given cursor.
Retrieve the physical extent of the source construct referenced by the given cursor.
type cxtypekind =
| Invalid
(*Represents an invalid type (e.g., where no type is available).
*)| Unexposed
(*A type whose specific kind is not exposed via this interface.
*)| Void
(*A type whose specific kind is not exposed via this interface.
*)| Bool
(*A type whose specific kind is not exposed via this interface.
*)| Char_U
(*A type whose specific kind is not exposed via this interface.
*)| UChar
(*A type whose specific kind is not exposed via this interface.
*)| Char16
(*A type whose specific kind is not exposed via this interface.
*)| Char32
(*A type whose specific kind is not exposed via this interface.
*)| UShort
(*A type whose specific kind is not exposed via this interface.
*)| UInt
(*A type whose specific kind is not exposed via this interface.
*)| ULong
(*A type whose specific kind is not exposed via this interface.
*)| ULongLong
(*A type whose specific kind is not exposed via this interface.
*)| UInt128
(*A type whose specific kind is not exposed via this interface.
*)| Char_S
(*A type whose specific kind is not exposed via this interface.
*)| SChar
(*A type whose specific kind is not exposed via this interface.
*)| WChar
(*A type whose specific kind is not exposed via this interface.
*)| Short
(*A type whose specific kind is not exposed via this interface.
*)| Int
(*A type whose specific kind is not exposed via this interface.
*)| Long
(*A type whose specific kind is not exposed via this interface.
*)| LongLong
(*A type whose specific kind is not exposed via this interface.
*)| Int128
(*A type whose specific kind is not exposed via this interface.
*)| Float
(*A type whose specific kind is not exposed via this interface.
*)| Double
(*A type whose specific kind is not exposed via this interface.
*)| LongDouble
(*A type whose specific kind is not exposed via this interface.
*)| NullPtr
(*A type whose specific kind is not exposed via this interface.
*)| Overload
(*A type whose specific kind is not exposed via this interface.
*)| Dependent
(*A type whose specific kind is not exposed via this interface.
*)| ObjCId
(*A type whose specific kind is not exposed via this interface.
*)| ObjCClass
(*A type whose specific kind is not exposed via this interface.
*)| ObjCSel
(*A type whose specific kind is not exposed via this interface.
*)| Float128
(*A type whose specific kind is not exposed via this interface.
*)| Half
(*A type whose specific kind is not exposed via this interface.
*)| Float16
(*A type whose specific kind is not exposed via this interface.
*)| ShortAccum
(*A type whose specific kind is not exposed via this interface.
*)| Accum
(*A type whose specific kind is not exposed via this interface.
*)| LongAccum
(*A type whose specific kind is not exposed via this interface.
*)| UShortAccum
(*A type whose specific kind is not exposed via this interface.
*)| UAccum
(*A type whose specific kind is not exposed via this interface.
*)| ULongAccum
(*A type whose specific kind is not exposed via this interface.
*)| BFloat16
(*A type whose specific kind is not exposed via this interface.
*)| Complex
(*A type whose specific kind is not exposed via this interface.
*)| Pointer
(*A type whose specific kind is not exposed via this interface.
*)| BlockPointer
(*A type whose specific kind is not exposed via this interface.
*)| LValueReference
(*A type whose specific kind is not exposed via this interface.
*)| RValueReference
(*A type whose specific kind is not exposed via this interface.
*)| Record
(*A type whose specific kind is not exposed via this interface.
*)| Enum
(*A type whose specific kind is not exposed via this interface.
*)| Typedef
(*A type whose specific kind is not exposed via this interface.
*)| ObjCInterface
(*A type whose specific kind is not exposed via this interface.
*)| ObjCObjectPointer
(*A type whose specific kind is not exposed via this interface.
*)| FunctionNoProto
(*A type whose specific kind is not exposed via this interface.
*)| FunctionProto
(*A type whose specific kind is not exposed via this interface.
*)| ConstantArray
(*A type whose specific kind is not exposed via this interface.
*)| Vector
(*A type whose specific kind is not exposed via this interface.
*)| IncompleteArray
(*A type whose specific kind is not exposed via this interface.
*)| VariableArray
(*A type whose specific kind is not exposed via this interface.
*)| DependentSizedArray
(*A type whose specific kind is not exposed via this interface.
*)| MemberPointer
(*A type whose specific kind is not exposed via this interface.
*)| Auto
(*A type whose specific kind is not exposed via this interface.
*)| Elaborated
(*Represents a type that was referred to using an elaborated type keyword.
*)| Pipe
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dArrayRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dBufferRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dDepthRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayDepthRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAARO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAARO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAADepthRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAADepthRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage3dRO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dArrayWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dBufferWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dDepthWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayDepthWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAAWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAAWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAADepthWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAADepthWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage3dWO
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dArrayRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage1dBufferRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dDepthRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayDepthRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAARW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAARW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dMSAADepthRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage2dArrayMSAADepthRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLImage3dRW
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLSampler
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLEvent
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLQueue
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLReserveID
(*Represents a type that was referred to using an elaborated type keyword.
*)| ObjCObject
(*Represents a type that was referred to using an elaborated type keyword.
*)| ObjCTypeParam
(*Represents a type that was referred to using an elaborated type keyword.
*)| Attributed
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCMcePayload
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImePayload
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCRefPayload
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCSicPayload
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCMceResult
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImeResult
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCRefResult
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCSicResult
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImeResultSingleRefStreamout
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImeResultDualRefStreamout
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImeSingleRefStreamin
(*Represents a type that was referred to using an elaborated type keyword.
*)| OCLIntelSubgroupAVCImeDualRefStreamin
(*Represents a type that was referred to using an elaborated type keyword.
*)| ExtVector
(*Represents a type that was referred to using an elaborated type keyword.
*)| Atomic
(*Represents a type that was referred to using an elaborated type keyword.
*)
Describes the kind of type
The type of an element in the abstract syntax tree.
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.
Retrieve the integer type of an enum declaration.
Retrieve the integer value of an enum constant declaration as a signed long long.
Retrieve the integer value of an enum constant declaration as an unsigned long long.
Retrieve the bit width of a bit field declaration as an integer.
Retrieve the number of non-variadic arguments associated with a given cursor.
Retrieve the argument cursor of a function or method.
Returns the number of template args of a function decl representing a template specialization.
Describes the kind of a template argument.
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 a signed long long.
Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as an unsigned long long.
Determine whether two CXTypes represent the same type.
Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.
Determine whether a CXCursor that is a macro, is function like.
Determine whether a CXCursor that is a macro, is a builtin one.
Determine whether a CXCursor that is a function declaration, is an inline declaration.
Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.
Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.
Return the cursor for the declaration of the given type.
Returns the Objective-C type encoding for the specified declaration.
Returns the Objective-C type encoding for the specified CXType.
Retrieve the spelling of a given CXTypeKind.
Describes the calling convention of a function type
Retrieve the calling convention associated with a function type.
Retrieve the return type associated with a function type.
Retrieve the exception specification type associated with a function type. This is a value of type CXCursor_ExceptionSpecificationKind.
Retrieve the number of non-variadic parameters associated with a function type.
Retrieve the type of a parameter of a function type.
Retrieves the base type of the ObjCObjectType.
Retrieve the number of protocol references associated with an ObjC object/id.
Retrieve the decl for a protocol reference for an ObjC object/id.
Retrieve the number of type arguments associated with an ObjC object.
Retrieve a type argument associated with an ObjC object.
Return 1 if the CXType is a variadic function type, and 0 otherwise.
Retrieve the return type associated with a given cursor.
Retrieve the exception specification type associated with a given cursor. This is a value of type CXCursor_ExceptionSpecificationKind.
Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.
Return the element type of an array, complex, or vector type.
Determine if a typedef is 'transparent' tag.
type cxtypenullabilitykind =
| NonNull
(*Values of this type can never be null.
*)| Nullable
(*Values of this type can be null.
*)| Unspecified
(*Whether values of this type can be null is (explicitly) unspecified. This captures a (fairly rare) case where we can't conclude anything about the nullability of the type even though it has been considered.
*)| Invalid
(*Nullability is not applicable to this type.
*)| NullableResult
(*Generally behaves like Nullable, except when used in a block parameter that was imported into a swift async method. There, swift will assume that the parameter can get null even if no error occured. _Nullable parameters are assumed to only get null on error.
*)
Retrieve the nullability kind of a pointer type.
Return the alignment of a type in bytes as per C++[expr.alignof] standard.
Return the size of a type in bytes as per C++[expr.sizeof] standard.
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 type that was modified by this attributed type.
Return the offset of the field represented by the Cursor.
Determine whether the given cursor represents an anonymous tag or namespace
Determine whether the given cursor represents an anonymous record declaration.
Determine whether the given cursor represents an inline namespace declaration.
Returns the number of template arguments for given template specialization, or -1 if type T is not a template specialization.
Returns the type template argument of a template class specialization at given index.
Retrieve the ref-qualifier kind of a function or method.
Returns non-zero if the cursor specifies a Record member that is a bitfield.
Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.
Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.
Returns the access control level for the referenced object.
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.
Returns the storage class for a function or variable declaration.
Determine the number of overloaded declarations referenced by a CXCursor_OverloadedDeclRef cursor.
Retrieve a cursor for one of the overloaded declarations referenced by a CXCursor_OverloadedDeclRef cursor.
For cursors representing an iboutletcollection attribute, this function returns the collection element type.
Describes how the traversal of the children of a particular cursor should proceed after visiting a particular child cursor.
Visit the children of a particular cursor.
Retrieve a Unified Symbol Resolution (USR) for the entity referenced by the given cursor.
Retrieve a name for the entity referenced by this cursor.
val cursor_get_spelling_name_range :
cxcursor ->
piece_index:int ->
options:int ->
cxsourcerange
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.
type cxprintingpolicyproperty =
| Indentation
| SuppressSpecifiers
| SuppressTagKeyword
| IncludeTagDefinition
| SuppressScope
| SuppressUnwrittenScope
| SuppressInitializers
| ConstantArraySizeAsWritten
| AnonymousTagLocations
| SuppressStrongLifetime
| SuppressLifetimeQualifiers
| SuppressTemplateArgsInCXXConstructors
| Bool
| Restrict
| Alignof
| UnderscoreAlignof
| UseVoidForZeroParams
| TerseOutput
| PolishForDeclaration
| Half
| MSWChar
| IncludeNewlines
| MSVCFormatting
| ConstantsAsWritten
| SuppressImplicitBase
| FullyQualifiedName
Properties for the printing policy.
Get a property value for the given printing policy.
val printing_policy_set_property :
cxprintingpolicy ->
cxprintingpolicyproperty ->
int ->
unit
Set a property value for the given printing policy.
Retrieve the default policy for the cursor.
Pretty print declarations.
Retrieve the display name for the entity referenced by this cursor.
For a cursor that is a reference, retrieve a cursor representing the entity that it references.
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.
Determine whether the declaration pointed to by this cursor is also a definition of that entity.
Retrieve the canonical cursor corresponding to the given cursor.
If the cursor points to a selector identifier in an Objective-C method or message expression, this returns the selector index.
Given a cursor pointing to a C++ method call or an Objective-C message, returns non-zero if the method/message is "dynamic", meaning:
Given a cursor pointing to an Objective-C message or property reference, or C++ method call, returns the CXType of the receiver.
Given a cursor that represents a property declaration, return the associated property attributes. The bits are formed from 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.
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.
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.
Returns non-zero if the given cursor points to a symbol marked with external_source_symbol attribute.
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.
Given a cursor that represents a declaration, return the associated comment text, including comment markers.
Given a cursor that represents a documentable entity (e.g., declaration), return the associated first paragraph.
Retrieve the CXString representing the mangled name of the cursor.
Retrieve the CXStrings representing the mangled symbols of the C++ constructor or destructor at the cursor.
Retrieve the CXStrings representing the mangled symbols of the ObjC class interface or implementation at the cursor.
Given a CXCursor_ModuleImportDecl cursor, return the associated module.
Given a CXFile header file, return the module that contains it, if one exists.
Returns the module file where the provided module object came from.
Returns the parent of a sub-module or NULL if the given module is top-level, e.g. for 'std.vector' it will return the 'std' module.
Returns the name of the module, e.g. for the 'std.vector' sub-module it will return "vector".
Returns the full name of the module, e.g. "std.vector".
Returns the number of top level headers associated with this module.
Returns the specified top level header associated with the module.
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++ 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.
Determine if an enum declaration refers to a scoped enum.
Determine if a C++ member function or member function template is declared 'const'.
Given a cursor that represents a template, determine the cursor kind of the specializations would be generated by instantiating the template.
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.
val get_cursor_reference_name_range :
cxcursor ->
name_flags:int ->
piece_index:int ->
cxsourcerange
Given a cursor that references something else, return the source range covering that reference.
Describes a kind of token.
Describes a single preprocessing token.
Determine the kind of the given token.
Determine the spelling of the given token.
Retrieve the source location of the given token.
Retrieve a source range that covers the given token.
These routines are used for testing and debugging, only, and should not be relied upon.
type cxcompletionchunkkind =
| Optional
(*A code-completion string that describes "optional" text that could be a part of the template (but is not required).
*)| TypedText
(*Text that a user would be expected to type to get this code-completion result.
*)| Text
(*Text that should be inserted as part of a code-completion result.
*)| Placeholder
(*Placeholder text that should be replaced by the user.
*)| Informative
(*Informative text that should be displayed but never inserted as part of the template.
*)| CurrentParameter
(*Text that describes the current parameter when code-completion is referring to function call, message send, or template specialization.
*)| LeftParen
(*A left parenthesis ('('), used to initiate a function call or signal the beginning of a function parameter list.
*)| RightParen
(*A right parenthesis (')'), used to finish a function call or signal the end of a function parameter list.
*)| LeftBracket
(*A left bracket ('[').
*)| RightBracket
(*A right bracket (']').
*)| LeftBrace
(*A left brace ('{').
*)| RightBrace
(*A right brace ('}').
*)| LeftAngle
(*A left angle bracket ('<').
*)| RightAngle
(*A right angle bracket ('>').
*)| Comma
(*A comma separator (',').
*)| ResultType
(*Text that specifies the result type of a given result.
*)| Colon
(*A colon (':').
*)| SemiColon
(*A semicolon (';').
*)| Equal
(*An '=' sign.
*)| HorizontalSpace
(*Horizontal space (' ').
*)| VerticalSpace
(*Vertical space ('\n'), after which it is generally a good idea to perform indentation.
*)
Describes a single piece of text within a code-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.
Retrieve the completion string associated with a particular chunk within a completion string.
Retrieve the number of chunks in the given code-completion string.
Determine the priority of this code completion.
Determine the availability of the entity that this code-completion string refers to.
Retrieve the number of annotations associated with the given completion string.
Retrieve the annotation associated with the given completion string.
Retrieve the parent context of the given completion string.
Retrieve the brief documentation comment attached to the declaration that corresponds to the given completion string.
Retrieve a completion string for an arbitrary declaration or macro definition cursor.
Returns a default set of code-completion options that can be passed to clang_codeCompleteAt().
Return a version string, suitable for showing to a user, but not intended to be parsed (the format is not guaranteed to be stable).
Enable/disable crash recovery.
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.
Returns the kind of the evaluated result.
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 a non-zero value if the kind is Int and the evaluation result resulted in an unsigned integer.
Returns the evaluation result as an unsigned integer if the kind is Int and clang_EvalResult_isUnsignedInt is non-zero.
Returns the evaluation result as double if the kind is double.
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.
Retrieve a remapping.
Retrieve a remapping.
Determine the number of remappings.
An indexing action/session, to be applied to one or multiple translation units.
@{
Visit the fields of a particular type.
type cxversion = {
major : int;
(*The major version number, e.g., the '10' in '10.7.3'. A negative value indicates that there is no version number at all.
*)minor : int;
(*The minor version number, e.g., the '7' in '10.7.3'. This value will be negative if no minor version number was provided, e.g., for version '10'.
*)subminor : int;
(*The subminor version number, e.g., the '3' in '10.7.3'. This value will be negative if no minor or subminor version number was provided, e.g., in version '10' or '10.7'.
*)
}
Describes a version number of the form major.minor.subminor.
type clang_ext_declkind =
| InvalidDecl
| AccessSpec
| Block
| Captured
| ClassScopeFunctionSpecialization
| Empty
| Export
| ExternCContext
| FileScopeAsm
| Friend
| FriendTemplate
| Import
| LifetimeExtendedTemporary
| LinkageSpec
| Using
| UsingEnum
| Label
| Namespace
| NamespaceAlias
| ObjCCompatibleAlias
| ObjCCategory
| ObjCCategoryImpl
| ObjCImplementation
| ObjCInterface
| ObjCProtocol
| ObjCMethod
| ObjCProperty
| BuiltinTemplate
| Concept
| ClassTemplate
| FunctionTemplate
| TypeAliasTemplate
| VarTemplate
| TemplateTemplateParm
| Enum
| Record
| CXXRecord
| ClassTemplateSpecialization
| ClassTemplatePartialSpecialization
| TemplateTypeParm
| ObjCTypeParam
| TypeAlias
| Typedef
| UnresolvedUsingTypename
| UnresolvedUsingIfExists
| UsingDirective
| UsingPack
| UsingShadow
| ConstructorUsingShadow
| Binding
| Field
| ObjCAtDefsField
| ObjCIvar
| Function
| CXXDeductionGuide
| CXXMethod
| CXXConstructor
| CXXConversion
| CXXDestructor
| MSProperty
| NonTypeTemplateParm
| Var
| Decomposition
| ImplicitParam
| OMPCapturedExpr
| ParmVar
| VarTemplateSpecialization
| VarTemplatePartialSpecialization
| EnumConstant
| IndirectField
| MSGuid
| OMPDeclareMapper
| OMPDeclareReduction
| TemplateParamObject
| UnresolvedUsingValue
| OMPAllocate
| OMPRequires
| OMPThreadPrivate
| ObjCPropertyImpl
| PragmaComment
| PragmaDetectMismatch
| RequiresExprBody
| StaticAssert
| TranslationUnit
| UnknownDecl
val ext_decl_visit_attributes :
cxcursor ->
(cxcursor -> cxcursor -> cxchildvisitresult) ->
bool
val ext_cxxrecord_decl_visit_bases :
cxcursor ->
(cxcursor -> cxcursor -> cxchildvisitresult) ->
bool
type clang_ext_stmtkind =
| InvalidStmt
| GCCAsmStmt
| MSAsmStmt
| BreakStmt
| CXXCatchStmt
| CXXForRangeStmt
| CXXTryStmt
| CapturedStmt
| CompoundStmt
| ContinueStmt
| CoreturnStmt
| CoroutineBodyStmt
| DeclStmt
| DoStmt
| ForStmt
| GotoStmt
| IfStmt
| IndirectGotoStmt
| MSDependentExistsStmt
| NullStmt
| OMPCanonicalLoop
| OMPAtomicDirective
| OMPBarrierDirective
| OMPCancelDirective
| OMPCancellationPointDirective
| OMPCriticalDirective
| OMPDepobjDirective
| OMPDispatchDirective
| OMPFlushDirective
| OMPInteropDirective
| OMPDistributeDirective
| OMPDistributeParallelForDirective
| OMPDistributeParallelForSimdDirective
| OMPDistributeSimdDirective
| OMPForDirective
| OMPForSimdDirective
| OMPMasterTaskLoopDirective
| OMPMasterTaskLoopSimdDirective
| OMPParallelForDirective
| OMPParallelForSimdDirective
| OMPParallelMasterTaskLoopDirective
| OMPParallelMasterTaskLoopSimdDirective
| OMPSimdDirective
| OMPTargetParallelForSimdDirective
| OMPTargetSimdDirective
| OMPTargetTeamsDistributeDirective
| OMPTargetTeamsDistributeParallelForDirective
| OMPTargetTeamsDistributeParallelForSimdDirective
| OMPTargetTeamsDistributeSimdDirective
| OMPTaskLoopDirective
| OMPTaskLoopSimdDirective
| OMPTeamsDistributeDirective
| OMPTeamsDistributeParallelForDirective
| OMPTeamsDistributeParallelForSimdDirective
| OMPTeamsDistributeSimdDirective
| OMPTileDirective
| OMPUnrollDirective
| OMPMaskedDirective
| OMPMasterDirective
| OMPOrderedDirective
| OMPParallelDirective
| OMPParallelMasterDirective
| OMPParallelSectionsDirective
| OMPScanDirective
| OMPSectionDirective
| OMPSectionsDirective
| OMPSingleDirective
| OMPTargetDataDirective
| OMPTargetDirective
| OMPTargetEnterDataDirective
| OMPTargetExitDataDirective
| OMPTargetParallelDirective
| OMPTargetParallelForDirective
| OMPTargetTeamsDirective
| OMPTargetUpdateDirective
| OMPTaskDirective
| OMPTaskgroupDirective
| OMPTaskwaitDirective
| OMPTaskyieldDirective
| OMPTeamsDirective
| ObjCAtCatchStmt
| ObjCAtFinallyStmt
| ObjCAtSynchronizedStmt
| ObjCAtThrowStmt
| ObjCAtTryStmt
| ObjCAutoreleasePoolStmt
| ObjCForCollectionStmt
| ReturnStmt
| SEHExceptStmt
| SEHFinallyStmt
| SEHLeaveStmt
| SEHTryStmt
| CaseStmt
| DefaultStmt
| SwitchStmt
| AttributedStmt
| BinaryConditionalOperator
| ConditionalOperator
| AddrLabelExpr
| ArrayInitIndexExpr
| ArrayInitLoopExpr
| ArraySubscriptExpr
| ArrayTypeTraitExpr
| AsTypeExpr
| AtomicExpr
| BinaryOperator
| CompoundAssignOperator
| BlockExpr
| CXXBindTemporaryExpr
| CXXBoolLiteralExpr
| CXXConstructExpr
| CXXTemporaryObjectExpr
| CXXDefaultArgExpr
| CXXDefaultInitExpr
| CXXDeleteExpr
| CXXDependentScopeMemberExpr
| CXXFoldExpr
| CXXInheritedCtorInitExpr
| CXXNewExpr
| CXXNoexceptExpr
| CXXNullPtrLiteralExpr
| CXXPseudoDestructorExpr
| CXXRewrittenBinaryOperator
| CXXScalarValueInitExpr
| CXXStdInitializerListExpr
| CXXThisExpr
| CXXThrowExpr
| CXXTypeidExpr
| CXXUnresolvedConstructExpr
| CXXUuidofExpr
| CallExpr
| CUDAKernelCallExpr
| CXXMemberCallExpr
| CXXOperatorCallExpr
| UserDefinedLiteral
| BuiltinBitCastExpr
| CStyleCastExpr
| CXXFunctionalCastExpr
| CXXAddrspaceCastExpr
| CXXConstCastExpr
| CXXDynamicCastExpr
| CXXReinterpretCastExpr
| CXXStaticCastExpr
| ObjCBridgedCastExpr
| ImplicitCastExpr
| CharacterLiteral
| ChooseExpr
| CompoundLiteralExpr
| ConceptSpecializationExpr
| ConvertVectorExpr
| CoawaitExpr
| CoyieldExpr
| DeclRefExpr
| DependentCoawaitExpr
| DependentScopeDeclRefExpr
| DesignatedInitExpr
| DesignatedInitUpdateExpr
| ExpressionTraitExpr
| ExtVectorElementExpr
| FixedPointLiteral
| FloatingLiteral
| ConstantExpr
| ExprWithCleanups
| FunctionParmPackExpr
| GNUNullExpr
| GenericSelectionExpr
| ImaginaryLiteral
| ImplicitValueInitExpr
| InitListExpr
| IntegerLiteral
| LambdaExpr
| MSPropertyRefExpr
| MSPropertySubscriptExpr
| MaterializeTemporaryExpr
| MatrixSubscriptExpr
| MemberExpr
| NoInitExpr
| OMPArraySectionExpr
| OMPArrayShapingExpr
| OMPIteratorExpr
| ObjCArrayLiteral
| ObjCAvailabilityCheckExpr
| ObjCBoolLiteralExpr
| ObjCBoxedExpr
| ObjCDictionaryLiteral
| ObjCEncodeExpr
| ObjCIndirectCopyRestoreExpr
| ObjCIsaExpr
| ObjCIvarRefExpr
| ObjCMessageExpr
| ObjCPropertyRefExpr
| ObjCProtocolExpr
| ObjCSelectorExpr
| ObjCStringLiteral
| ObjCSubscriptRefExpr
| OffsetOfExpr
| OpaqueValueExpr
| UnresolvedLookupExpr
| UnresolvedMemberExpr
| PackExpansionExpr
| ParenExpr
| ParenListExpr
| PredefinedExpr
| PseudoObjectExpr
| RecoveryExpr
| RequiresExpr
| SYCLUniqueStableNameExpr
| ShuffleVectorExpr
| SizeOfPackExpr
| SourceLocExpr
| StmtExpr
| StringLiteral
| SubstNonTypeTemplateParmExpr
| SubstNonTypeTemplateParmPackExpr
| TypeTraitExpr
| TypoExpr
| UnaryExprOrTypeTraitExpr
| UnaryOperator
| VAArgExpr
| LabelStmt
| WhileStmt
| UnknownStmt
type clang_ext_typekind =
| InvalidType
| Adjusted
| Decayed
| ConstantArray
| DependentSizedArray
| IncompleteArray
| VariableArray
| Atomic
| Attributed
| BlockPointer
| Builtin
| Complex
| Decltype
| Auto
| DeducedTemplateSpecialization
| DependentAddressSpace
| DependentExtInt
| DependentName
| DependentSizedExtVector
| DependentTemplateSpecialization
| DependentVector
| Elaborated
| ExtInt
| FunctionNoProto
| FunctionProto
| InjectedClassName
| MacroQualified
| ConstantMatrix
| DependentSizedMatrix
| MemberPointer
| ObjCObjectPointer
| ObjCObject
| ObjCInterface
| ObjCTypeParam
| PackExpansion
| Paren
| Pipe
| Pointer
| LValueReference
| RValueReference
| SubstTemplateTypeParmPack
| SubstTemplateTypeParm
| Enum
| Record
| TemplateSpecialization
| TemplateTypeParm
| TypeOfExpr
| TypeOf
| Typedef
| UnaryTransform
| UnresolvedUsing
| Vector
| ExtVector
| UnknownType
type clang_ext_attrkind =
| NoAttr
| AddressSpace
| ArmMveStrictPolymorphism
| CmseNSCall
| NoDeref
| ObjCGC
| ObjCInertUnsafeUnretained
| ObjCKindOf
| OpenCLConstantAddressSpace
| OpenCLGenericAddressSpace
| OpenCLGlobalAddressSpace
| OpenCLGlobalDeviceAddressSpace
| OpenCLGlobalHostAddressSpace
| OpenCLLocalAddressSpace
| OpenCLPrivateAddressSpace
| Ptr32
| Ptr64
| SPtr
| TypeNonNull
| TypeNullUnspecified
| TypeNullable
| TypeNullableResult
| UPtr
| FallThrough
| Likely
| MustTail
| OpenCLUnrollHint
| Suppress
| Unlikely
| NoMerge
| AArch64VectorPcs
| AcquireHandle
| AnyX86NoCfCheck
| CDecl
| FastCall
| IntelOclBicc
| LifetimeBound
| MSABI
| NSReturnsRetained
| ObjCOwnership
| Pascal
| Pcs
| PreserveAll
| PreserveMost
| RegCall
| StdCall
| SwiftAsyncCall
| SwiftCall
| SysVABI
| ThisCall
| VectorCall
| SwiftAsyncContext
| SwiftContext
| SwiftErrorResult
| SwiftIndirectResult
| Annotate
| CFConsumed
| CarriesDependency
| NSConsumed
| NonNull
| OSConsumed
| PassObjectSize
| ReleaseHandle
| UseHandle
| AMDGPUFlatWorkGroupSize
| AMDGPUNumSGPR
| AMDGPUNumVGPR
| AMDGPUWavesPerEU
| ARMInterrupt
| AVRInterrupt
| AVRSignal
| AcquireCapability
| AcquiredAfter
| AcquiredBefore
| AlignMac68k
| AlignNatural
| Aligned
| AllocAlign
| AllocSize
| AlwaysDestroy
| AlwaysInline
| AnalyzerNoReturn
| AnyX86Interrupt
| AnyX86NoCallerSavedRegisters
| ArgumentWithTypeTag
| ArmBuiltinAlias
| Artificial
| AsmLabel
| AssertCapability
| AssertExclusiveLock
| AssumeAligned
| Assumption
| Availability
| BPFPreserveAccessIndex
| Blocks
| Builtin
| C11NoReturn
| CFAuditedTransfer
| CFGuard
| CFICanonicalJumpTable
| CFReturnsNotRetained
| CFReturnsRetained
| CFUnknownTransfer
| CPUDispatch
| CPUSpecific
| CUDAConstant
| CUDADevice
| CUDADeviceBuiltinSurfaceType
| CUDADeviceBuiltinTextureType
| CUDAGlobal
| CUDAHost
| CUDAInvalidTarget
| CUDALaunchBounds
| CXX11NoReturn
| CallableWhen
| Callback
| Capability
| CapturedRecord
| Cleanup
| CmseNSEntry
| CodeSeg
| Cold
| Common
| Const
| ConstInit
| Constructor
| Consumable
| ConsumableAutoCast
| ConsumableSetOnRead
| Convergent
| DLLExport
| DLLExportStaticLocal
| DLLImport
| DLLImportStaticLocal
| Deprecated
| Destructor
| DiagnoseIf
| DisableTailCalls
| EmptyBases
| EnableIf
| EnforceTCB
| EnforceTCBLeaf
| EnumExtensibility
| ExcludeFromExplicitInstantiation
| ExclusiveTrylockFunction
| ExternalSourceSymbol
| Final
| FlagEnum
| Flatten
| Format
| FormatArg
| GNUInline
| GuardedBy
| GuardedVar
| HIPManaged
| Hot
| IBAction
| IBOutlet
| IBOutletCollection
| InitPriority
| InternalLinkage
| LTOVisibilityPublic
| LayoutVersion
| Leaf
| LockReturned
| LocksExcluded
| M68kInterrupt
| MIGServerRoutine
| MSAllocator
| MSInheritance
| MSNoVTable
| MSP430Interrupt
| MSStruct
| MSVtorDisp
| MaxFieldAlignment
| MayAlias
| MicroMips
| MinSize
| MinVectorWidth
| Mips16
| MipsInterrupt
| MipsLongCall
| MipsShortCall
| NSConsumesSelf
| NSErrorDomain
| NSReturnsAutoreleased
| NSReturnsNotRetained
| Naked
| NoAlias
| NoCommon
| NoDebug
| NoDestroy
| NoDuplicate
| NoInline
| NoInstrumentFunction
| NoMicroMips
| NoMips16
| NoProfileFunction
| NoReturn
| NoSanitize
| NoSpeculativeLoadHardening
| NoSplitStack
| NoStackProtector
| NoThreadSafetyAnalysis
| NoThrow
| NoUniqueAddress
| NotTailCalled
| OMPAllocateDecl
| OMPCaptureNoInit
| OMPDeclareTargetDecl
| OMPDeclareVariant
| OMPThreadPrivateDecl
| OSConsumesThis
| OSReturnsNotRetained
| OSReturnsRetained
| OSReturnsRetainedOnNonZero
| OSReturnsRetainedOnZero
| ObjCBridge
| ObjCBridgeMutable
| ObjCBridgeRelated
| ObjCException
| ObjCExplicitProtocolImpl
| ObjCExternallyRetained
| ObjCIndependentClass
| ObjCMethodFamily
| ObjCNSObject
| ObjCPreciseLifetime
| ObjCRequiresPropertyDefs
| ObjCRequiresSuper
| ObjCReturnsInnerPointer
| ObjCRootClass
| ObjCSubclassingRestricted
| OpenCLIntelReqdSubGroupSize
| OpenCLKernel
| OptimizeNone
| Override
| Owner
| Ownership
| Packed
| ParamTypestate
| PatchableFunctionEntry
| Pointer
| PragmaClangBSSSection
| PragmaClangDataSection
| PragmaClangRelroSection
| PragmaClangRodataSection
| PragmaClangTextSection
| PreferredName
| PtGuardedBy
| PtGuardedVar
| Pure
| RISCVInterrupt
| Reinitializes
| ReleaseCapability
| ReqdWorkGroupSize
| RequiresCapability
| Restrict
| Retain
| ReturnTypestate
| ReturnsNonNull
| ReturnsTwice
| SYCLKernel
| ScopedLockable
| Section
| SelectAny
| Sentinel
| SetTypestate
| SpeculativeLoadHardening
| StandaloneDebug
| StrictFP
| SwiftAsync
| SwiftAsyncError
| SwiftAsyncName
| SwiftAttr
| SwiftBridge
| SwiftBridgedTypedef
| SwiftError
| SwiftName
| SwiftNewType
| SwiftPrivate
| TLSModel
| Target
| TestTypestate
| TransparentUnion
| TrivialABI
| TryAcquireCapability
| TypeTagForDatatype
| TypeVisibility
| Uninitialized
| Unused
| Used
| UsingIfExists
| Uuid
| VecReturn
| VecTypeHint
| Visibility
| WarnUnused
| WarnUnusedResult
| Weak
| WeakImport
| WeakRef
| WebAssemblyExportName
| WebAssemblyImportModule
| WebAssemblyImportName
| WorkGroupSizeHint
| X86ForceAlignArgPointer
| XRayInstrument
| XRayLogArgs
| AbiTag
| Alias
| AlignValue
| BuiltinAlias
| CalledOnce
| IFunc
| InitSeg
| LoaderUninitialized
| LoopHint
| Mode
| NoBuiltin
| NoEscape
| OMPCaptureKind
| OMPDeclareSimdDecl
| OMPReferencedVar
| ObjCBoxable
| ObjCClassStub
| ObjCDesignatedInitializer
| ObjCDirect
| ObjCDirectMembers
| ObjCNonLazyClass
| ObjCNonRuntimeProtocol
| ObjCRuntimeName
| ObjCRuntimeVisible
| OpenCLAccess
| Overloadable
| RenderScriptKernel
| SwiftObjCMembers
| Thread
val ext_template_argument_get_as_template_or_template_pattern :
clang_ext_templateargument ->
clang_ext_templatename
val ext_template_argument_get_pack_argument :
clang_ext_templateargument ->
int ->
clang_ext_templateargument
val ext_template_argument_get_pack_expansion_pattern :
clang_ext_templateargument ->
clang_ext_templateargument
val ext_template_specialization_type_get_argument :
cxtype ->
int ->
clang_ext_templateargument
val ext_predefined_expr_compute_name :
clang_ext_predefinedexpr_identkind ->
cxcursor ->
string
type clang_ext_overloadedoperatorkind =
| InvalidOverloadedOperator
| New
| Delete
| Array_New
| Array_Delete
| Plus
| Minus
| Star
| Slash
| Percent
| Caret
| Amp
| Pipe
| Tilde
| Exclaim
| Equal
| Less
| Greater
| PlusEqual
| MinusEqual
| StarEqual
| SlashEqual
| PercentEqual
| CaretEqual
| AmpEqual
| PipeEqual
| LessLess
| GreaterGreater
| LessLessEqual
| GreaterGreaterEqual
| EqualEqual
| ExclaimEqual
| LessEqual
| GreaterEqual
| Spaceship
| AmpAmp
| PipePipe
| PlusPlus
| MinusMinus
| Comma
| ArrowStar
| Arrow
| Call
| Subscript
| Conditional
| Coawait
val ext_declaration_name_get_kind :
clang_ext_declarationname ->
clang_ext_declarationnamekind
val ext_declaration_name_get_cxxoverloaded_operator :
clang_ext_declarationname ->
clang_ext_overloadedoperatorkind
val ext_declaration_name_get_cxxdeduction_guide_template :
clang_ext_declarationname ->
cxcursor
val ext_nested_name_specifier_get_kind :
clang_ext_nestednamespecifier ->
clang_ext_nestednamespecifierkind
val ext_nested_name_specifier_get_prefix :
clang_ext_nestednamespecifier ->
clang_ext_nestednamespecifier
val ext_nested_name_specifier_loc_get_nested_name_specifier :
clang_ext_nestednamespecifierloc ->
clang_ext_nestednamespecifier
val ext_nested_name_specifier_loc_get_prefix :
clang_ext_nestednamespecifierloc ->
clang_ext_nestednamespecifierloc
val ext_nested_name_specifier_loc_get_as_type_loc :
clang_ext_nestednamespecifierloc ->
clang_ext_typeloc
val ext_template_parameter_list_get_param :
clang_ext_templateparameterlist ->
int ->
cxcursor
val ext_template_parameter_list_get_requires_clause :
clang_ext_templateparameterlist ->
cxcursor
val ext_function_proto_type_get_exception_spec_type :
cxtype ->
clang_ext_exceptionspecificationtype
type clang_ext_typeloc_class =
| Qualified
| Adjusted
| Decayed
| ConstantArray
| DependentSizedArray
| IncompleteArray
| VariableArray
| Atomic
| Attributed
| BlockPointer
| Builtin
| Complex
| Decltype
| Auto
| DeducedTemplateSpecialization
| DependentAddressSpace
| DependentExtInt
| DependentName
| DependentSizedExtVector
| DependentTemplateSpecialization
| DependentVector
| Elaborated
| ExtInt
| FunctionNoProto
| FunctionProto
| InjectedClassName
| MacroQualified
| ConstantMatrix
| DependentSizedMatrix
| MemberPointer
| ObjCObjectPointer
| ObjCObject
| ObjCInterface
| ObjCTypeParam
| PackExpansion
| Paren
| Pipe
| Pointer
| LValueReference
| RValueReference
| SubstTemplateTypeParmPack
| SubstTemplateTypeParm
| Enum
| Record
| TemplateSpecialization
| TemplateTypeParm
| TypeOfExpr
| TypeOf
| Typedef
| UnaryTransform
| UnresolvedUsing
| Vector
| ExtVector
| InvalidTypeLoc
val ext_designated_init_expr_get_kind :
cxcursor ->
int ->
clang_ext_designatedinitexpr_designatorkind
val ext_expr_requirement_return_type_get_type_constraint_template_parameter_list :
clang_ext_requirement ->
clang_ext_templateparameterlist
val ext_decl_context_visit_decls :
cxcursor ->
(cxcursor -> cxcursor -> cxchildvisitresult) ->
bool
val ext_indirect_field_decl_visit_chain :
cxcursor ->
(cxcursor -> cxcursor -> cxchildvisitresult) ->
bool
val ext_cxxconstructor_decl_visit_initializers :
cxcursor ->
(clang_ext_cxxctorinitializer -> cxvisitorresult) ->
bool
val ext_cxxctor_initializer_is_indirect_member_initializer :
clang_ext_cxxctorinitializer ->
bool
val ext_cxxctor_initializer_get_type_source_info :
clang_ext_cxxctorinitializer ->
clang_ext_typeloc
val ext_amdgpuflat_work_group_size_get_spelling :
cxcursor ->
clang_ext_amdgpuflatworkgroupsize_spelling
val ext_any_x86_no_caller_saved_registers_get_spelling :
cxcursor ->
clang_ext_anyx86nocallersavedregisters_spelling
val ext_argument_with_type_tag_get_spelling :
cxcursor ->
clang_ext_argumentwithtypetag_spelling
val ext_arm_mve_strict_polymorphism_get_spelling :
cxcursor ->
clang_ext_armmvestrictpolymorphism_spelling
val ext_bpfpreserve_access_index_get_spelling :
cxcursor ->
clang_ext_bpfpreserveaccessindex_spelling
val ext_cficanonical_jump_table_get_spelling :
cxcursor ->
clang_ext_cficanonicaljumptable_spelling
val ext_cfreturns_not_retained_get_spelling :
cxcursor ->
clang_ext_cfreturnsnotretained_spelling
val ext_cudadevice_builtin_surface_type_get_spelling :
cxcursor ->
clang_ext_cudadevicebuiltinsurfacetype_spelling
val ext_cudadevice_builtin_texture_type_get_spelling :
cxcursor ->
clang_ext_cudadevicebuiltintexturetype_spelling
val ext_consumable_set_on_read_get_spelling :
cxcursor ->
clang_ext_consumablesetonread_spelling
val ext_exclude_from_explicit_instantiation_get_spelling :
cxcursor ->
clang_ext_excludefromexplicitinstantiation_spelling
val ext_external_source_symbol_get_spelling :
cxcursor ->
clang_ext_externalsourcesymbol_spelling
val ext_ltovisibility_public_get_spelling :
cxcursor ->
clang_ext_ltovisibilitypublic_spelling
val ext_loader_uninitialized_get_spelling :
cxcursor ->
clang_ext_loaderuninitialized_spelling
val ext_nsreturns_autoreleased_get_spelling :
cxcursor ->
clang_ext_nsreturnsautoreleased_spelling
val ext_nsreturns_not_retained_get_spelling :
cxcursor ->
clang_ext_nsreturnsnotretained_spelling
val ext_no_instrument_function_get_spelling :
cxcursor ->
clang_ext_noinstrumentfunction_spelling
val ext_no_speculative_load_hardening_get_spelling :
cxcursor ->
clang_ext_nospeculativeloadhardening_spelling
val ext_no_thread_safety_analysis_get_spelling :
cxcursor ->
clang_ext_nothreadsafetyanalysis_spelling
val ext_osreturns_not_retained_get_spelling :
cxcursor ->
clang_ext_osreturnsnotretained_spelling
val ext_osreturns_retained_on_non_zero_get_spelling :
cxcursor ->
clang_ext_osreturnsretainedonnonzero_spelling
val ext_osreturns_retained_on_zero_get_spelling :
cxcursor ->
clang_ext_osreturnsretainedonzero_spelling
val ext_obj_cdesignated_initializer_get_spelling :
cxcursor ->
clang_ext_objcdesignatedinitializer_spelling
val ext_obj_cexplicit_protocol_impl_get_spelling :
cxcursor ->
clang_ext_objcexplicitprotocolimpl_spelling
val ext_obj_cexternally_retained_get_spelling :
cxcursor ->
clang_ext_objcexternallyretained_spelling
val ext_obj_cindependent_class_get_spelling :
cxcursor ->
clang_ext_objcindependentclass_spelling
val ext_obj_cnon_runtime_protocol_get_spelling :
cxcursor ->
clang_ext_objcnonruntimeprotocol_spelling
val ext_obj_cprecise_lifetime_get_spelling :
cxcursor ->
clang_ext_objcpreciselifetime_spelling
val ext_obj_crequires_property_defs_get_spelling :
cxcursor ->
clang_ext_objcrequirespropertydefs_spelling
val ext_obj_creturns_inner_pointer_get_spelling :
cxcursor ->
clang_ext_objcreturnsinnerpointer_spelling
val ext_obj_csubclassing_restricted_get_spelling :
cxcursor ->
clang_ext_objcsubclassingrestricted_spelling
val ext_open_clconstant_address_space_get_spelling :
cxcursor ->
clang_ext_openclconstantaddressspace_spelling
val ext_open_clgeneric_address_space_get_spelling :
cxcursor ->
clang_ext_openclgenericaddressspace_spelling
val ext_open_clglobal_address_space_get_spelling :
cxcursor ->
clang_ext_openclglobaladdressspace_spelling
val ext_open_clglobal_device_address_space_get_spelling :
cxcursor ->
clang_ext_openclglobaldeviceaddressspace_spelling
val ext_open_clglobal_host_address_space_get_spelling :
cxcursor ->
clang_ext_openclglobalhostaddressspace_spelling
val ext_open_cllocal_address_space_get_spelling :
cxcursor ->
clang_ext_opencllocaladdressspace_spelling
val ext_open_clprivate_address_space_get_spelling :
cxcursor ->
clang_ext_openclprivateaddressspace_spelling
val ext_patchable_function_entry_get_spelling :
cxcursor ->
clang_ext_patchablefunctionentry_spelling
val ext_speculative_load_hardening_get_spelling :
cxcursor ->
clang_ext_speculativeloadhardening_spelling
val ext_swift_indirect_result_get_spelling :
cxcursor ->
clang_ext_swiftindirectresult_spelling
val ext_try_acquire_capability_get_spelling :
cxcursor ->
clang_ext_tryacquirecapability_spelling
val ext_type_tag_for_datatype_get_spelling :
cxcursor ->
clang_ext_typetagfordatatype_spelling
val ext_web_assembly_export_name_get_spelling :
cxcursor ->
clang_ext_webassemblyexportname_spelling
val ext_web_assembly_import_module_get_spelling :
cxcursor ->
clang_ext_webassemblyimportmodule_spelling
val ext_web_assembly_import_name_get_spelling :
cxcursor ->
clang_ext_webassemblyimportname_spelling
val ext_x86_force_align_arg_pointer_get_spelling :
cxcursor ->
clang_ext_x86forcealignargpointer_spelling
val ext_return_typestate_attr_get_state :
cxcursor ->
clang_ext_returntypestateattr_consumedstate
val ext_swift_async_error_attr_get_convention :
cxcursor ->
clang_ext_swiftasyncerrorattr_conventionkind
val ext_param_typestate_attr_get_param_state :
cxcursor ->
clang_ext_paramtypestateattr_consumedstate
val ext_test_typestate_attr_get_test_state :
cxcursor ->
clang_ext_testtypestateattr_consumedstate
val ext_ompdeclare_target_decl_attr_get_map_type :
cxcursor ->
clang_ext_ompdeclaretargetdeclattr_maptypety
val ext_swift_new_type_attr_get_newtype_kind :
cxcursor ->
clang_ext_swiftnewtypeattr_newtypekind
val ext_mips_interrupt_attr_get_interrupt :
cxcursor ->
clang_ext_mipsinterruptattr_interrupttype
val ext_arminterrupt_attr_get_interrupt :
cxcursor ->
clang_ext_arminterruptattr_interrupttype
val ext_riscvinterrupt_attr_get_interrupt :
cxcursor ->
clang_ext_riscvinterruptattr_interrupttype
val ext_enum_extensibility_attr_get_extensibility :
cxcursor ->
clang_ext_enumextensibilityattr_kind
val ext_consumable_attr_get_default_state :
cxcursor ->
clang_ext_consumableattr_consumedstate
val ext_set_typestate_attr_get_new_state :
cxcursor ->
clang_ext_settypestateattr_consumedstate
val ext_type_visibility_attr_get_visibility :
cxcursor ->
clang_ext_typevisibilityattr_visibilitytype
val ext_callable_when_attr_get_callable_states :
cxcursor ->
(clang_ext_callablewhenattr_consumedstate -> unit) ->
unit
val ext_ompdeclare_simd_decl_attr_get_branch_state :
cxcursor ->
clang_ext_ompdeclaresimddeclattr_branchstatety
val ext_ompallocate_decl_attr_get_allocator_type :
cxcursor ->
clang_ext_ompallocatedeclattr_allocatortypety
val ext_obj_cmethod_family_attr_get_family :
cxcursor ->
clang_ext_objcmethodfamilyattr_familykind
include sig ... end
include sig ... end
include sig ... end
val get_token :
Clang__.Clang__bindings.cxtranslationunit ->
Clang__.Clang__bindings.cxsourcelocation ->
Clang__.Clang__bindings.cxtoken option
Get the raw lexical token starting with the given location.
val tokenize :
Clang__.Clang__bindings.cxtranslationunit ->
Clang__.Clang__bindings.cxsourcerange ->
Clang__.Clang__bindings.cxtoken array
Tokenize the source code described by the given range into raw lexical tokens.
include sig ... end
include sig ... end
Compatibility layer
include sig ... end
val predefined_expr_get_function_name :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxcursor ->
string
include sig ... end
Parsing files and strings
val parse_file :
?index:Clang__.Clang__bindings.cxindex ->
?command_line_args:string list ->
?unsaved_files:Clang__.Clang__bindings.cxunsavedfile list ->
?options:Clang__.Clang__bindings.Cxtranslationunit_flags.t ->
string ->
Clang__.Clang__bindings.cxtranslationunit
parse_file ?index ?command_line_args ?unsaved_files ?options filename
parses file filename
and returns its translation unit. This function is equivalent to Clang.parse_translation_unit2
, with, by default, a fresh index
(created by Clang.create_index
true true
), an empty list for command_line_args
and unsaved_files
, and default options
(obtained by Clang.default_editing_translation_unit_options
). See also Clang.Ast.parse_file
which returns a pattern-matchable representation of the AST.
val parse_file_res :
?index:Clang__.Clang__bindings.cxindex ->
?command_line_args:string list ->
?unsaved_files:Clang__.Clang__bindings.cxunsavedfile list ->
?options:Clang__.Clang__bindings.Cxtranslationunit_flags.t ->
string ->
(Clang__.Clang__bindings.cxtranslationunit,
Clang__.Clang__bindings.cxerrorcode)
Stdcompat.result
Equivalent to parse_file
but returns a result
instead of raising Failure _
if parsing fails.
val parse_string :
?index:Clang__.Clang__bindings.cxindex ->
?filename:string ->
?command_line_args:string list ->
?unsaved_files:Clang__.Clang__bindings.cxunsavedfile list ->
?options:Clang__.Clang__bindings.Cxtranslationunit_flags.t ->
string ->
Clang__.Clang__bindings.cxtranslationunit
parse_string ?index ?filename ?command_line_args ?unsaved_files ?options contents
parses string contents
and returns its translation unit. This function calls Clang.parse_file
with an unsaved file called filename
(by default, <string>.c
) with contents
: this unsaved file is consed to the list unsaved_files
(by default, an empty list). Note that filename
should have the .cpp
suffix to parse C++ code (for instance, <string>.cpp
). See also Clang.Ast.parse_string
which returns a pattern-matchable representation of the AST.
val parse_string_res :
?index:Clang__.Clang__bindings.cxindex ->
?filename:string ->
?command_line_args:string list ->
?unsaved_files:Clang__.Clang__bindings.cxunsavedfile list ->
?options:Clang__.Clang__bindings.Cxtranslationunit_flags.t ->
string ->
(Clang__.Clang__bindings.cxtranslationunit,
Clang__.Clang__bindings.cxerrorcode)
Stdcompat.result
Equivalent to parse_string
but returns a result
instead of raising Failure _
if parsing fails.
Iterators
val iter_children :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_children f cur
calls f
over all the direct child nodes of cur
.
val iter_decl_attributes :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_decl_attributes f cur
calls f
over all the attributes of the declaration cur
.
val iter_cxxrecorddecl_bases :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_decl_attributes f cur
calls f
over all the bases of the CXX class cur
.
val list_of_children_filter_map :
(Clang__.Clang__bindings.cxcursor -> 'a option) ->
Clang__.Clang__bindings.cxcursor ->
'a list
list_of_children_map f cur
applies f to all the direct child nodes of cur
and returns the list of Some _
results.
val list_of_children_map :
(Clang__.Clang__bindings.cxcursor -> 'a) ->
Clang__.Clang__bindings.cxcursor ->
'a list
list_of_children_map f cur
applies f to all the direct child nodes of cur
and returns the list of results.
val list_of_children :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxcursor list
list_of_children cur
returns the list of all the direct child nodes of cur
.
val option_cursor_bind :
(Clang__.Clang__bindings.cxcursor -> 'a option) ->
Clang__.Clang__bindings.cxcursor ->
'a option
option_cursor_bind f cur
returns None
if cur
is null, f cur
otherwise.
val option_cursor_map :
(Clang__.Clang__bindings.cxcursor -> 'a) ->
Clang__.Clang__bindings.cxcursor ->
'a option
option_cursor_map f cur
returns None
if cur
is null, Some (f cur)
otherwise.
val option_cursor :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxcursor option
option_cursor cur
returns None
if cur
is null, Some cur
otherwise.
first_child cur
returns the first direct child node of cur
, or None
if there is no child.
last_child cur
returns the last direct child node of cur
, or None
if there is no child.
val iter_type_fields :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxtype ->
unit
iter_type_fields f ty
calls f
over all the declaration nodes of the fields belonging to the record type ty
(either a struct or union). See also Clang.Type.iter_fields
for a higher-level interface.
val list_of_type_fields :
Clang__.Clang__bindings.cxtype ->
Clang__.Clang__bindings.cxcursor list
list_of_type_fields f ty
returns the list of all the declaration nodes of the fields belonging to the record type ty
(either a struct or union).
val iter_decl_context :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_decl_context f c
calls f
over all the declaration nodes of declaration context c
.
val list_of_decl_context_map :
(Clang__.Clang__bindings.cxcursor -> 'a) ->
Clang__.Clang__bindings.cxcursor ->
'a list
list_of_decl_context_map f c
applies f
to all the declaration nodes of declaration context c
and returns the list of results.
val list_of_decl_context :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxcursor list
list_of_decl_context c
returns the list of all the declaration nodes of declaration context c
.
val iter_indirect_field_decl_chain :
(Clang__.Clang__bindings.cxcursor -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_indirect_field_decl_chain f c
calls f
over the chain of indirect field declaration c
.
val list_of_indirect_field_decl_chain_map :
(Clang__.Clang__bindings.cxcursor -> 'a) ->
Clang__.Clang__bindings.cxcursor ->
'a list
list_of_indirect_field_decl_chain_map f c
applies f
to all declarations in the chain of indirect field declaration c
and returns the list of results.
val list_of_indirect_field_decl_chain :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxcursor list
list_of_indirect_field_decl_chain f c
returns the list of the declarations in the chain of indirect field declaration c
.
val iter_cxxconstructor_initializers :
(Clang__.Clang__bindings.clang_ext_cxxctorinitializer -> unit) ->
Clang__.Clang__bindings.cxcursor ->
unit
iter_cxxconstructor_initializers f c
calls f
over the initializers of constructor c
.
val list_of_cxxconstructor_initializers_map :
(Clang__.Clang__bindings.clang_ext_cxxctorinitializer -> 'a) ->
Clang__.Clang__bindings.cxcursor ->
'a list
list_of_cxxconstructor_initializers_map f c
calls f
over the initializers of constructor c
and returns the list of results.
val list_of_cxxconstructor_initializers :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.clang_ext_cxxctorinitializer list
list_of_cxxconstructor_initializers_map c
returns the list of the initializers of constructor c
.
list_of_iter iter
calls iter f
and returns all the values which f
has been applied to.
list_of_iter g iter
calls iter f
and applies g
to all the values which f
has been applied to and returns the Some _
results.
list_of_iter g iter
calls iter f
and applies g
to all the values which f
has been applied to and returns the results.
Integer or floating point types
is_integer ty
returns true if ty
is a built-in integer type.
is_unsigned_integer ty
returns true if ty
is a built-in integer type that is unsigned.
is_signed_integer ty
returns true if ty
is a built-in integer type that is signed.
is_floating_point ty
returns true if ty
is a built-in floating-point type.
Integer conversions
val int64_of_cxint_opt :
?signed:bool ->
Clang__.Clang__bindings.cxint ->
Stdcompat.Int64.t option
int64_of_cxint_opt ~signed x
returns Some i
if x
is representable as a 64-bit integer value i
, or None
otherwise. signed
specifies if x
is signed (default: true).
int64_of_cxint x
returns i
if x
is representable as a 64-bit integer value i
, or raises Invalid_argument _
otherwise. signed
specifies if x
is signed (default: true).
int_of_cxint_opt x
returns Some i
if x
is representable as an integer value i
, or None
otherwise. signed
specifies if x
is signed (default: true).
int_of_cxint x
returns i
if x
is representable as an integer value i
, or raises Invalid_argument _
otherwise. signed
specifies if x
is signed (default: true).
string_of_cxint f
is an alias for Clang__bindings.ext_int_to_string
, radix 10. signed
specifies if x
is signed (default: true).
Floating conversions
float_of_cxfloat_opt x
returns Some f
if x
is a floating-point value with either IEEE single or double semantics, or None
otherwise.
float_of_cxfloat x
returns f
if x
is a floating-point value with either IEEE single or double semantics, or raises Invalid_argument _
otherwise.
string_of_cxfloat f
is an alias for Clang__bindings.ext_float_to_string
.
Error management
string_of_cxerrorcode ec
returns a message describing ec
.
val seq_of_diagnostics :
Clang__.Clang__bindings.cxtranslationunit ->
Clang__.Clang__bindings.cxdiagnostic Stdcompat.Seq.t
seq_of_diagnostics tu
returns the diagnostics (notes, warnings, errors, ...) produced for the given translation unit
val concrete_of_cxsourcelocation :
Clang__.Clang__types.location_kind ->
Clang__.Clang__bindings.cxsourcelocation ->
Clang__.Clang__types.concrete_location
concrete_of_cxsourcelocation kind location
returns the concrete location associated to location
. kind
selects whether Clang.get_presumed_location
(which ignores #
line directive) or Clang.get_expansion_location
(which honors #
line directive) is called.
string_of_severity severity
returns a string describing the severity: this string is used as prefix for the diagnostic in pp_diagnostic
.
val pp_concrete_location :
?options:Clang__.Clang__types.Display_source_location.t ->
?ranges:
(unit ->
(Clang__.Clang__types.concrete_location
* Clang__.Clang__types.concrete_location)
list) ->
Stdcompat.Format.formatter ->
Clang__.Clang__types.concrete_location ->
unit
val pp_diagnostic :
?options:Clang__.Clang__types.Diagnostic_display_options.t ->
Stdcompat.Format.formatter ->
Clang__.Clang__bindings.cxdiagnostic ->
unit
pp_diagnostic ?options fmt diag
formats diagnostic diag
, mimicking Clang__bindings.format_diagnostic
behavior. Clang__types.Display_source_location.kind
supports various location kinds whereas Clang__bindings.format_diagnostic
only displays spelling locations.
val format_diagnostics :
?pp:
((Stdcompat.Format.formatter -> unit -> unit) ->
Stdcompat.Format.formatter ->
unit ->
unit) ->
?options:Clang__.Clang__types.Diagnostic_display_options.t ->
Clang__.Clang__bindings.cxdiagnosticseverity list ->
Stdcompat.Format.formatter ->
Clang__.Clang__bindings.cxtranslationunit ->
unit
format_diagnostics ?pp severities fmt tu
formats the diagnostics produced for the given translation unit. Only the diagnostics, the severity of which is listed in severities
are displayed. If there is a printer given in pp
, then this printer is called once if and only if there is at least one diagnostic to display, and pp
should call the printer passed in its first argument to display the diagnostics. In the case there is no diagnostic to display, nothing is printed.
error
contains the severities Error
and Fatal
.
warning_or_error
contains the severities Warning
, Error
and Fatal
.
not_ignored_diagnostics
contains the severities Note
, Warning
, Error
and Fatal
.
all_diagnostics
contains the severities Ignored
, Note
, Warning
, Error
and Fatal
.
val has_severity :
Clang__.Clang__bindings.cxdiagnosticseverity list ->
Clang__.Clang__bindings.cxtranslationunit ->
bool
has_severity l tu
returns whether the translation unit tu
produced a diagnostic, the severity of which belongs to l
.
val cursor_get_translation_unit :
Clang__.Clang__bindings.cxcursor ->
Clang__.Clang__bindings.cxtranslationunit
cursor_get_translation_unit cursor
returns the translation unit associated to cursor
.
val sourcelocation_get_translation_unit :
Clang__.Clang__bindings.cxsourcelocation ->
Clang__.Clang__bindings.cxtranslationunit
sourcelocation_get_translation_unit location
returns the translation unit associated to location
.
val binary_of_overloaded_operator_kind :
Clang__.Clang__bindings.clang_ext_overloadedoperatorkind ->
Clang__.Clang__bindings.clang_ext_binaryoperatorkind
General purpose utilities
includedir
is equal to the path to Clang include/
directory, i.e., `llvm-config --includedir`/../lib/clang/`llvm-config --version`/include
, where llvm-config
commands has been evaluated when clangml
has been configured. This directory contains stddef.h
and other compiler-specific headers, and it is common to pass Clang.Command_line.include_directory Clang.includedir
to Clang command-line.
default_include_directories ()
is a list of include directories that are common to pass to Clang command-line. The list contains includedir
.
compare_cursors c1 c2
provides a total order over cursors.
get_typedef_underlying_type t
returns the underlying type of t
if t
is a typedef, and t
otherwise. If recursive
is true
(default: false
), typedefs are followed until the underlying type is not a typedef.
Abstract syntax tree
AST enumeration constants.
AST translation units.