blob: 052556552413a117c7fa822b56506cea66ad2585 [file] [log] [blame]
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by `package:ffigen`.
import 'dart:ffi' as ffi;
/// Holds bindings to LibClang.
class Clang {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
_lookup;
/// The symbols are looked up in [dynamicLibrary].
Clang(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup;
/// The symbols are looked up with [lookup].
Clang.fromLookup(
ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
lookup)
: _lookup = lookup;
/// Retrieve the character data associated with the given string.
ffi.Pointer<ffi.Int8> clang_getCString(
CXString string,
) {
return _clang_getCString(
string,
);
}
late final _clang_getCString_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCString>>('clang_getCString');
late final _dart_clang_getCString _clang_getCString =
_clang_getCString_ptr.asFunction<_dart_clang_getCString>();
/// Free the given string.
void clang_disposeString(
CXString string,
) {
return _clang_disposeString(
string,
);
}
late final _clang_disposeString_ptr =
_lookup<ffi.NativeFunction<_c_clang_disposeString>>(
'clang_disposeString');
late final _dart_clang_disposeString _clang_disposeString =
_clang_disposeString_ptr.asFunction<_dart_clang_disposeString>();
/// Provides a shared context for creating translation units.
///
/// It provides two options:
///
/// - excludeDeclarationsFromPCH: When non-zero, allows enumeration of "local"
/// declarations (when loading any new translation units). A "local" declaration
/// is one that belongs in the translation unit itself and not in a precompiled
/// header that was used by the translation unit. If zero, all declarations
/// will be enumerated.
///
/// Here is an example:
///
/// \code
/// // excludeDeclsFromPCH = 1, displayDiagnostics=1
/// Idx = clang_createIndex(1, 1);
///
/// // IndexTest.pch was produced with the following command:
/// // "clang -x c IndexTest.h -emit-ast -o IndexTest.pch"
/// TU = clang_createTranslationUnit(Idx, "IndexTest.pch");
///
/// // This will load all the symbols from 'IndexTest.pch'
/// clang_visitChildren(clang_getTranslationUnitCursor(TU),
/// TranslationUnitVisitor, 0);
/// clang_disposeTranslationUnit(TU);
///
/// // This will load all the symbols from 'IndexTest.c', excluding symbols
/// // from 'IndexTest.pch'.
/// char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" };
/// TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args,
/// 0, 0);
/// clang_visitChildren(clang_getTranslationUnitCursor(TU),
/// TranslationUnitVisitor, 0);
/// clang_disposeTranslationUnit(TU);
/// \endcode
///
/// This process of creating the 'pch', loading it separately, and using it (via
/// -include-pch) allows 'excludeDeclsFromPCH' to remove redundant callbacks
/// (which gives the indexer the same performance benefit as the compiler).
ffi.Pointer<ffi.Void> clang_createIndex(
int excludeDeclarationsFromPCH,
int displayDiagnostics,
) {
return _clang_createIndex(
excludeDeclarationsFromPCH,
displayDiagnostics,
);
}
late final _clang_createIndex_ptr =
_lookup<ffi.NativeFunction<_c_clang_createIndex>>('clang_createIndex');
late final _dart_clang_createIndex _clang_createIndex =
_clang_createIndex_ptr.asFunction<_dart_clang_createIndex>();
/// Destroy the given index.
///
/// The index must not be destroyed until all of the translation units created
/// within that index have been destroyed.
void clang_disposeIndex(
ffi.Pointer<ffi.Void> index,
) {
return _clang_disposeIndex(
index,
);
}
late final _clang_disposeIndex_ptr =
_lookup<ffi.NativeFunction<_c_clang_disposeIndex>>('clang_disposeIndex');
late final _dart_clang_disposeIndex _clang_disposeIndex =
_clang_disposeIndex_ptr.asFunction<_dart_clang_disposeIndex>();
/// Retrieve the complete file and path name of the given file.
CXString clang_getFileName(
ffi.Pointer<ffi.Void> SFile,
) {
return _clang_getFileName(
SFile,
);
}
late final _clang_getFileName_ptr =
_lookup<ffi.NativeFunction<_c_clang_getFileName>>('clang_getFileName');
late final _dart_clang_getFileName _clang_getFileName =
_clang_getFileName_ptr.asFunction<_dart_clang_getFileName>();
/// Determine whether two ranges are equivalent.
///
/// \returns non-zero if the ranges are the same, zero if they differ.
int clang_equalRanges(
CXSourceRange range1,
CXSourceRange range2,
) {
return _clang_equalRanges(
range1,
range2,
);
}
late final _clang_equalRanges_ptr =
_lookup<ffi.NativeFunction<_c_clang_equalRanges>>('clang_equalRanges');
late final _dart_clang_equalRanges _clang_equalRanges =
_clang_equalRanges_ptr.asFunction<_dart_clang_equalRanges>();
/// Retrieve the file, line, column, and offset represented by
/// the given source location.
///
/// If the location refers into a macro expansion, return where the macro was
/// expanded or where the macro argument was written, if the location points at
/// a macro argument.
///
/// \param location the location within a source file that will be decomposed
/// into its parts.
///
/// \param file [out] if non-NULL, will be set to the file to which the given
/// source location points.
///
/// \param line [out] if non-NULL, will be set to the line to which the given
/// source location points.
///
/// \param column [out] if non-NULL, will be set to the column to which the given
/// source location points.
///
/// \param offset [out] if non-NULL, will be set to the offset into the
/// buffer to which the given source location points.
void clang_getFileLocation(
CXSourceLocation location,
ffi.Pointer<ffi.Pointer<ffi.Void>> file,
ffi.Pointer<ffi.Uint32> line,
ffi.Pointer<ffi.Uint32> column,
ffi.Pointer<ffi.Uint32> offset,
) {
return _clang_getFileLocation(
location,
file,
line,
column,
offset,
);
}
late final _clang_getFileLocation_ptr =
_lookup<ffi.NativeFunction<_c_clang_getFileLocation>>(
'clang_getFileLocation');
late final _dart_clang_getFileLocation _clang_getFileLocation =
_clang_getFileLocation_ptr.asFunction<_dart_clang_getFileLocation>();
/// Determine the number of diagnostics produced for the given
/// translation unit.
int clang_getNumDiagnostics(
ffi.Pointer<CXTranslationUnitImpl> Unit,
) {
return _clang_getNumDiagnostics(
Unit,
);
}
late final _clang_getNumDiagnostics_ptr =
_lookup<ffi.NativeFunction<_c_clang_getNumDiagnostics>>(
'clang_getNumDiagnostics');
late final _dart_clang_getNumDiagnostics _clang_getNumDiagnostics =
_clang_getNumDiagnostics_ptr.asFunction<_dart_clang_getNumDiagnostics>();
/// Retrieve a diagnostic associated with the given translation unit.
///
/// \param Unit the translation unit to query.
/// \param Index the zero-based diagnostic number to retrieve.
///
/// \returns the requested diagnostic. This diagnostic must be freed
/// via a call to \c clang_disposeDiagnostic().
ffi.Pointer<ffi.Void> clang_getDiagnostic(
ffi.Pointer<CXTranslationUnitImpl> Unit,
int Index,
) {
return _clang_getDiagnostic(
Unit,
Index,
);
}
late final _clang_getDiagnostic_ptr =
_lookup<ffi.NativeFunction<_c_clang_getDiagnostic>>(
'clang_getDiagnostic');
late final _dart_clang_getDiagnostic _clang_getDiagnostic =
_clang_getDiagnostic_ptr.asFunction<_dart_clang_getDiagnostic>();
/// Destroy a diagnostic.
void clang_disposeDiagnostic(
ffi.Pointer<ffi.Void> Diagnostic,
) {
return _clang_disposeDiagnostic(
Diagnostic,
);
}
late final _clang_disposeDiagnostic_ptr =
_lookup<ffi.NativeFunction<_c_clang_disposeDiagnostic>>(
'clang_disposeDiagnostic');
late final _dart_clang_disposeDiagnostic _clang_disposeDiagnostic =
_clang_disposeDiagnostic_ptr.asFunction<_dart_clang_disposeDiagnostic>();
/// Format the given diagnostic in a manner that is suitable for display.
///
/// This routine will format the given diagnostic to a string, rendering
/// the diagnostic according to the various options given. The
/// \c clang_defaultDiagnosticDisplayOptions() function returns the set of
/// options that most closely mimics the behavior of the clang compiler.
///
/// \param Diagnostic The diagnostic to print.
///
/// \param Options A set of options that control the diagnostic display,
/// created by combining \c CXDiagnosticDisplayOptions values.
///
/// \returns A new string containing for formatted diagnostic.
CXString clang_formatDiagnostic(
ffi.Pointer<ffi.Void> Diagnostic,
int Options,
) {
return _clang_formatDiagnostic(
Diagnostic,
Options,
);
}
late final _clang_formatDiagnostic_ptr =
_lookup<ffi.NativeFunction<_c_clang_formatDiagnostic>>(
'clang_formatDiagnostic');
late final _dart_clang_formatDiagnostic _clang_formatDiagnostic =
_clang_formatDiagnostic_ptr.asFunction<_dart_clang_formatDiagnostic>();
/// Same as \c clang_parseTranslationUnit2, but returns
/// the \c CXTranslationUnit instead of an error code. In case of an error this
/// routine returns a \c NULL \c CXTranslationUnit, without further detailed
/// error codes.
ffi.Pointer<CXTranslationUnitImpl> clang_parseTranslationUnit(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> source_filename,
ffi.Pointer<ffi.Pointer<ffi.Int8>> command_line_args,
int num_command_line_args,
ffi.Pointer<CXUnsavedFile> unsaved_files,
int num_unsaved_files,
int options,
) {
return _clang_parseTranslationUnit(
CIdx,
source_filename,
command_line_args,
num_command_line_args,
unsaved_files,
num_unsaved_files,
options,
);
}
late final _clang_parseTranslationUnit_ptr =
_lookup<ffi.NativeFunction<_c_clang_parseTranslationUnit>>(
'clang_parseTranslationUnit');
late final _dart_clang_parseTranslationUnit _clang_parseTranslationUnit =
_clang_parseTranslationUnit_ptr
.asFunction<_dart_clang_parseTranslationUnit>();
/// Destroy the specified CXTranslationUnit object.
void clang_disposeTranslationUnit(
ffi.Pointer<CXTranslationUnitImpl> arg0,
) {
return _clang_disposeTranslationUnit(
arg0,
);
}
late final _clang_disposeTranslationUnit_ptr =
_lookup<ffi.NativeFunction<_c_clang_disposeTranslationUnit>>(
'clang_disposeTranslationUnit');
late final _dart_clang_disposeTranslationUnit _clang_disposeTranslationUnit =
_clang_disposeTranslationUnit_ptr
.asFunction<_dart_clang_disposeTranslationUnit>();
/// Retrieve the cursor that represents the given translation unit.
///
/// The translation unit cursor can be used to start traversing the
/// various declarations within the given translation unit.
CXCursor clang_getTranslationUnitCursor(
ffi.Pointer<CXTranslationUnitImpl> arg0,
) {
return _clang_getTranslationUnitCursor(
arg0,
);
}
late final _clang_getTranslationUnitCursor_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTranslationUnitCursor>>(
'clang_getTranslationUnitCursor');
late final _dart_clang_getTranslationUnitCursor
_clang_getTranslationUnitCursor = _clang_getTranslationUnitCursor_ptr
.asFunction<_dart_clang_getTranslationUnitCursor>();
/// Returns non-zero if \p cursor is null.
int clang_Cursor_isNull(
CXCursor cursor,
) {
return _clang_Cursor_isNull(
cursor,
);
}
late final _clang_Cursor_isNull_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isNull>>(
'clang_Cursor_isNull');
late final _dart_clang_Cursor_isNull _clang_Cursor_isNull =
_clang_Cursor_isNull_ptr.asFunction<_dart_clang_Cursor_isNull>();
/// Retrieve the kind of the given cursor.
int clang_getCursorKind(
CXCursor arg0,
) {
return _clang_getCursorKind(
arg0,
);
}
late final _clang_getCursorKind_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorKind>>(
'clang_getCursorKind');
late final _dart_clang_getCursorKind _clang_getCursorKind =
_clang_getCursorKind_ptr.asFunction<_dart_clang_getCursorKind>();
/// Determine whether the given cursor has any attributes.
int clang_Cursor_hasAttrs(
CXCursor C,
) {
return _clang_Cursor_hasAttrs(
C,
);
}
late final _clang_Cursor_hasAttrs_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_hasAttrs>>(
'clang_Cursor_hasAttrs');
late final _dart_clang_Cursor_hasAttrs _clang_Cursor_hasAttrs =
_clang_Cursor_hasAttrs_ptr.asFunction<_dart_clang_Cursor_hasAttrs>();
/// Retrieve the physical location of the source constructor referenced
/// by the given cursor.
///
/// The location of a declaration is typically the location of the name of that
/// declaration, where the name of that declaration would occur if it is
/// unnamed, or some keyword that introduces that particular declaration.
/// The location of a reference is where that reference occurs within the
/// source code.
CXSourceLocation clang_getCursorLocation(
CXCursor arg0,
) {
return _clang_getCursorLocation(
arg0,
);
}
late final _clang_getCursorLocation_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorLocation>>(
'clang_getCursorLocation');
late final _dart_clang_getCursorLocation _clang_getCursorLocation =
_clang_getCursorLocation_ptr.asFunction<_dart_clang_getCursorLocation>();
/// Retrieve the type of a CXCursor (if any).
CXType clang_getCursorType(
CXCursor C,
) {
return _clang_getCursorType(
C,
);
}
late final _clang_getCursorType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorType>>(
'clang_getCursorType');
late final _dart_clang_getCursorType _clang_getCursorType =
_clang_getCursorType_ptr.asFunction<_dart_clang_getCursorType>();
/// Pretty-print the underlying type using the rules of the
/// language of the translation unit from which it came.
///
/// If the type is invalid, an empty string is returned.
CXString clang_getTypeSpelling(
CXType CT,
) {
return _clang_getTypeSpelling(
CT,
);
}
late final _clang_getTypeSpelling_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTypeSpelling>>(
'clang_getTypeSpelling');
late final _dart_clang_getTypeSpelling _clang_getTypeSpelling =
_clang_getTypeSpelling_ptr.asFunction<_dart_clang_getTypeSpelling>();
/// Retrieve the underlying type of a typedef declaration.
///
/// If the cursor does not reference a typedef declaration, an invalid type is
/// returned.
CXType clang_getTypedefDeclUnderlyingType(
CXCursor C,
) {
return _clang_getTypedefDeclUnderlyingType(
C,
);
}
late final _clang_getTypedefDeclUnderlyingType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTypedefDeclUnderlyingType>>(
'clang_getTypedefDeclUnderlyingType');
late final _dart_clang_getTypedefDeclUnderlyingType
_clang_getTypedefDeclUnderlyingType =
_clang_getTypedefDeclUnderlyingType_ptr
.asFunction<_dart_clang_getTypedefDeclUnderlyingType>();
/// Retrieve the integer value of an enum constant declaration as a signed
/// long long.
///
/// If the cursor does not reference an enum constant declaration, LLONG_MIN is returned.
/// Since this is also potentially a valid constant value, the kind of the cursor
/// must be verified before calling this function.
int clang_getEnumConstantDeclValue(
CXCursor C,
) {
return _clang_getEnumConstantDeclValue(
C,
);
}
late final _clang_getEnumConstantDeclValue_ptr =
_lookup<ffi.NativeFunction<_c_clang_getEnumConstantDeclValue>>(
'clang_getEnumConstantDeclValue');
late final _dart_clang_getEnumConstantDeclValue
_clang_getEnumConstantDeclValue = _clang_getEnumConstantDeclValue_ptr
.asFunction<_dart_clang_getEnumConstantDeclValue>();
/// Retrieve the bit width of a bit field declaration as an integer.
///
/// If a cursor that is not a bit field declaration is passed in, -1 is returned.
int clang_getFieldDeclBitWidth(
CXCursor C,
) {
return _clang_getFieldDeclBitWidth(
C,
);
}
late final _clang_getFieldDeclBitWidth_ptr =
_lookup<ffi.NativeFunction<_c_clang_getFieldDeclBitWidth>>(
'clang_getFieldDeclBitWidth');
late final _dart_clang_getFieldDeclBitWidth _clang_getFieldDeclBitWidth =
_clang_getFieldDeclBitWidth_ptr
.asFunction<_dart_clang_getFieldDeclBitWidth>();
/// Retrieve the number of non-variadic arguments associated with a given
/// cursor.
///
/// The number of arguments can be determined for calls as well as for
/// declarations of functions or methods. For other cursors -1 is returned.
int clang_Cursor_getNumArguments(
CXCursor C,
) {
return _clang_Cursor_getNumArguments(
C,
);
}
late final _clang_Cursor_getNumArguments_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_getNumArguments>>(
'clang_Cursor_getNumArguments');
late final _dart_clang_Cursor_getNumArguments _clang_Cursor_getNumArguments =
_clang_Cursor_getNumArguments_ptr
.asFunction<_dart_clang_Cursor_getNumArguments>();
/// Retrieve the argument cursor of a function or method.
///
/// The argument cursor can be determined for calls as well as for declarations
/// of functions or methods. For other cursors and for invalid indices, an
/// invalid cursor is returned.
CXCursor clang_Cursor_getArgument(
CXCursor C,
int i,
) {
return _clang_Cursor_getArgument(
C,
i,
);
}
late final _clang_Cursor_getArgument_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_getArgument>>(
'clang_Cursor_getArgument');
late final _dart_clang_Cursor_getArgument _clang_Cursor_getArgument =
_clang_Cursor_getArgument_ptr
.asFunction<_dart_clang_Cursor_getArgument>();
/// Return the canonical type for a CXType.
///
/// Clang's type system explicitly models typedefs and all the ways
/// a specific type can be represented. The canonical type is the underlying
/// type with all the "sugar" removed. For example, if 'T' is a typedef
/// for 'int', the canonical type for 'T' would be 'int'.
CXType clang_getCanonicalType(
CXType T,
) {
return _clang_getCanonicalType(
T,
);
}
late final _clang_getCanonicalType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCanonicalType>>(
'clang_getCanonicalType');
late final _dart_clang_getCanonicalType _clang_getCanonicalType =
_clang_getCanonicalType_ptr.asFunction<_dart_clang_getCanonicalType>();
/// Determine whether a CXCursor that is a macro, is
/// function like.
int clang_Cursor_isMacroFunctionLike(
CXCursor C,
) {
return _clang_Cursor_isMacroFunctionLike(
C,
);
}
late final _clang_Cursor_isMacroFunctionLike_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isMacroFunctionLike>>(
'clang_Cursor_isMacroFunctionLike');
late final _dart_clang_Cursor_isMacroFunctionLike
_clang_Cursor_isMacroFunctionLike = _clang_Cursor_isMacroFunctionLike_ptr
.asFunction<_dart_clang_Cursor_isMacroFunctionLike>();
/// Determine whether a CXCursor that is a macro, is a
/// builtin one.
int clang_Cursor_isMacroBuiltin(
CXCursor C,
) {
return _clang_Cursor_isMacroBuiltin(
C,
);
}
late final _clang_Cursor_isMacroBuiltin_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isMacroBuiltin>>(
'clang_Cursor_isMacroBuiltin');
late final _dart_clang_Cursor_isMacroBuiltin _clang_Cursor_isMacroBuiltin =
_clang_Cursor_isMacroBuiltin_ptr
.asFunction<_dart_clang_Cursor_isMacroBuiltin>();
/// Determine whether a CXCursor that is a function declaration, is an
/// inline declaration.
int clang_Cursor_isFunctionInlined(
CXCursor C,
) {
return _clang_Cursor_isFunctionInlined(
C,
);
}
late final _clang_Cursor_isFunctionInlined_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isFunctionInlined>>(
'clang_Cursor_isFunctionInlined');
late final _dart_clang_Cursor_isFunctionInlined
_clang_Cursor_isFunctionInlined = _clang_Cursor_isFunctionInlined_ptr
.asFunction<_dart_clang_Cursor_isFunctionInlined>();
/// Returns the typedef name of the given type.
CXString clang_getTypedefName(
CXType CT,
) {
return _clang_getTypedefName(
CT,
);
}
late final _clang_getTypedefName_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTypedefName>>(
'clang_getTypedefName');
late final _dart_clang_getTypedefName _clang_getTypedefName =
_clang_getTypedefName_ptr.asFunction<_dart_clang_getTypedefName>();
/// For pointer types, returns the type of the pointee.
CXType clang_getPointeeType(
CXType T,
) {
return _clang_getPointeeType(
T,
);
}
late final _clang_getPointeeType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getPointeeType>>(
'clang_getPointeeType');
late final _dart_clang_getPointeeType _clang_getPointeeType =
_clang_getPointeeType_ptr.asFunction<_dart_clang_getPointeeType>();
/// Return the cursor for the declaration of the given type.
CXCursor clang_getTypeDeclaration(
CXType T,
) {
return _clang_getTypeDeclaration(
T,
);
}
late final _clang_getTypeDeclaration_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTypeDeclaration>>(
'clang_getTypeDeclaration');
late final _dart_clang_getTypeDeclaration _clang_getTypeDeclaration =
_clang_getTypeDeclaration_ptr
.asFunction<_dart_clang_getTypeDeclaration>();
/// Retrieve the spelling of a given CXTypeKind.
CXString clang_getTypeKindSpelling(
int K,
) {
return _clang_getTypeKindSpelling(
K,
);
}
late final _clang_getTypeKindSpelling_ptr =
_lookup<ffi.NativeFunction<_c_clang_getTypeKindSpelling>>(
'clang_getTypeKindSpelling');
late final _dart_clang_getTypeKindSpelling _clang_getTypeKindSpelling =
_clang_getTypeKindSpelling_ptr
.asFunction<_dart_clang_getTypeKindSpelling>();
/// Retrieve the return type associated with a function type.
///
/// If a non-function type is passed in, an invalid type is returned.
CXType clang_getResultType(
CXType T,
) {
return _clang_getResultType(
T,
);
}
late final _clang_getResultType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getResultType>>(
'clang_getResultType');
late final _dart_clang_getResultType _clang_getResultType =
_clang_getResultType_ptr.asFunction<_dart_clang_getResultType>();
/// Retrieve the number of non-variadic parameters associated with a
/// function type.
///
/// If a non-function type is passed in, -1 is returned.
int clang_getNumArgTypes(
CXType T,
) {
return _clang_getNumArgTypes(
T,
);
}
late final _clang_getNumArgTypes_ptr =
_lookup<ffi.NativeFunction<_c_clang_getNumArgTypes>>(
'clang_getNumArgTypes');
late final _dart_clang_getNumArgTypes _clang_getNumArgTypes =
_clang_getNumArgTypes_ptr.asFunction<_dart_clang_getNumArgTypes>();
/// Retrieve the type of a parameter of a function type.
///
/// If a non-function type is passed in or the function does not have enough
/// parameters, an invalid type is returned.
CXType clang_getArgType(
CXType T,
int i,
) {
return _clang_getArgType(
T,
i,
);
}
late final _clang_getArgType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getArgType>>('clang_getArgType');
late final _dart_clang_getArgType _clang_getArgType =
_clang_getArgType_ptr.asFunction<_dart_clang_getArgType>();
/// Return the number of elements of an array or vector type.
///
/// If a type is passed in that is not an array or vector type,
/// -1 is returned.
int clang_getNumElements(
CXType T,
) {
return _clang_getNumElements(
T,
);
}
late final _clang_getNumElements_ptr =
_lookup<ffi.NativeFunction<_c_clang_getNumElements>>(
'clang_getNumElements');
late final _dart_clang_getNumElements _clang_getNumElements =
_clang_getNumElements_ptr.asFunction<_dart_clang_getNumElements>();
/// Return the element type of an array type.
///
/// If a non-array type is passed in, an invalid type is returned.
CXType clang_getArrayElementType(
CXType T,
) {
return _clang_getArrayElementType(
T,
);
}
late final _clang_getArrayElementType_ptr =
_lookup<ffi.NativeFunction<_c_clang_getArrayElementType>>(
'clang_getArrayElementType');
late final _dart_clang_getArrayElementType _clang_getArrayElementType =
_clang_getArrayElementType_ptr
.asFunction<_dart_clang_getArrayElementType>();
/// Retrieve the type named by the qualified-id.
///
/// If a non-elaborated type is passed in, an invalid type is returned.
CXType clang_Type_getNamedType(
CXType T,
) {
return _clang_Type_getNamedType(
T,
);
}
late final _clang_Type_getNamedType_ptr =
_lookup<ffi.NativeFunction<_c_clang_Type_getNamedType>>(
'clang_Type_getNamedType');
late final _dart_clang_Type_getNamedType _clang_Type_getNamedType =
_clang_Type_getNamedType_ptr.asFunction<_dart_clang_Type_getNamedType>();
/// Return the alignment of a type in bytes as per C++[expr.alignof]
/// standard.
///
/// If the type declaration is invalid, CXTypeLayoutError_Invalid is returned.
/// If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete
/// is returned.
/// If the type declaration is a dependent type, CXTypeLayoutError_Dependent is
/// returned.
/// If the type declaration is not a constant size type,
/// CXTypeLayoutError_NotConstantSize is returned.
int clang_Type_getAlignOf(
CXType T,
) {
return _clang_Type_getAlignOf(
T,
);
}
late final _clang_Type_getAlignOf_ptr =
_lookup<ffi.NativeFunction<_c_clang_Type_getAlignOf>>(
'clang_Type_getAlignOf');
late final _dart_clang_Type_getAlignOf _clang_Type_getAlignOf =
_clang_Type_getAlignOf_ptr.asFunction<_dart_clang_Type_getAlignOf>();
/// Determine whether the given cursor represents an anonymous
/// tag or namespace
int clang_Cursor_isAnonymous(
CXCursor C,
) {
return _clang_Cursor_isAnonymous(
C,
);
}
late final _clang_Cursor_isAnonymous_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isAnonymous>>(
'clang_Cursor_isAnonymous');
late final _dart_clang_Cursor_isAnonymous _clang_Cursor_isAnonymous =
_clang_Cursor_isAnonymous_ptr
.asFunction<_dart_clang_Cursor_isAnonymous>();
/// Determine whether the given cursor represents an anonymous record
/// declaration.
int clang_Cursor_isAnonymousRecordDecl(
CXCursor C,
) {
return _clang_Cursor_isAnonymousRecordDecl(
C,
);
}
late final _clang_Cursor_isAnonymousRecordDecl_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_isAnonymousRecordDecl>>(
'clang_Cursor_isAnonymousRecordDecl');
late final _dart_clang_Cursor_isAnonymousRecordDecl
_clang_Cursor_isAnonymousRecordDecl =
_clang_Cursor_isAnonymousRecordDecl_ptr
.asFunction<_dart_clang_Cursor_isAnonymousRecordDecl>();
/// Visit the children of a particular cursor.
///
/// This function visits all the direct children of the given cursor,
/// invoking the given \p visitor function with the cursors of each
/// visited child. The traversal may be recursive, if the visitor returns
/// \c CXChildVisit_Recurse. The traversal may also be ended prematurely, if
/// the visitor returns \c CXChildVisit_Break.
///
/// \param parent the cursor whose child may be visited. All kinds of
/// cursors can be visited, including invalid cursors (which, by
/// definition, have no children).
///
/// \param visitor the visitor function that will be invoked for each
/// child of \p parent.
///
/// \param client_data pointer data supplied by the client, which will
/// be passed to the visitor each time it is invoked.
///
/// \returns a non-zero value if the traversal was terminated
/// prematurely by the visitor returning \c CXChildVisit_Break.
int clang_visitChildren(
CXCursor parent,
ffi.Pointer<ffi.NativeFunction<CXCursorVisitor>> visitor,
ffi.Pointer<ffi.Void> client_data,
) {
return _clang_visitChildren(
parent,
visitor,
client_data,
);
}
late final _clang_visitChildren_ptr =
_lookup<ffi.NativeFunction<_c_clang_visitChildren>>(
'clang_visitChildren');
late final _dart_clang_visitChildren _clang_visitChildren =
_clang_visitChildren_ptr.asFunction<_dart_clang_visitChildren>();
/// Retrieve a Unified Symbol Resolution (USR) for the entity referenced
/// by the given cursor.
///
/// A Unified Symbol Resolution (USR) is a string that identifies a particular
/// entity (function, class, variable, etc.) within a program. USRs can be
/// compared across translation units to determine, e.g., when references in
/// one translation refer to an entity defined in another translation unit.
CXString clang_getCursorUSR(
CXCursor arg0,
) {
return _clang_getCursorUSR(
arg0,
);
}
late final _clang_getCursorUSR_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorUSR>>('clang_getCursorUSR');
late final _dart_clang_getCursorUSR _clang_getCursorUSR =
_clang_getCursorUSR_ptr.asFunction<_dart_clang_getCursorUSR>();
/// Retrieve a name for the entity referenced by this cursor.
CXString clang_getCursorSpelling(
CXCursor arg0,
) {
return _clang_getCursorSpelling(
arg0,
);
}
late final _clang_getCursorSpelling_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorSpelling>>(
'clang_getCursorSpelling');
late final _dart_clang_getCursorSpelling _clang_getCursorSpelling =
_clang_getCursorSpelling_ptr.asFunction<_dart_clang_getCursorSpelling>();
/// 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.
///
/// Some entities can be declared multiple times within a translation
/// unit, but only one of those declarations can also be a
/// definition. For example, given:
///
/// \code
/// int f(int, int);
/// int g(int x, int y) { return f(x, y); }
/// int f(int a, int b) { return a + b; }
/// int f(int, int);
/// \endcode
///
/// there are three declarations of the function "f", but only the
/// second one is a definition. The clang_getCursorDefinition()
/// function will take any cursor pointing to a declaration of "f"
/// (the first or fourth lines of the example) or a cursor referenced
/// that uses "f" (the call to "f' inside "g") and will return a
/// declaration cursor pointing to the definition (the second "f"
/// declaration).
///
/// If given a cursor for which there is no corresponding definition,
/// e.g., because there is no definition of that entity within this
/// translation unit, returns a NULL cursor.
CXCursor clang_getCursorDefinition(
CXCursor arg0,
) {
return _clang_getCursorDefinition(
arg0,
);
}
late final _clang_getCursorDefinition_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorDefinition>>(
'clang_getCursorDefinition');
late final _dart_clang_getCursorDefinition _clang_getCursorDefinition =
_clang_getCursorDefinition_ptr
.asFunction<_dart_clang_getCursorDefinition>();
/// 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.
CXSourceRange clang_Cursor_getCommentRange(
CXCursor C,
) {
return _clang_Cursor_getCommentRange(
C,
);
}
late final _clang_Cursor_getCommentRange_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_getCommentRange>>(
'clang_Cursor_getCommentRange');
late final _dart_clang_Cursor_getCommentRange _clang_Cursor_getCommentRange =
_clang_Cursor_getCommentRange_ptr
.asFunction<_dart_clang_Cursor_getCommentRange>();
/// Given a cursor that represents a declaration, return the associated
/// comment text, including comment markers.
CXString clang_Cursor_getRawCommentText(
CXCursor C,
) {
return _clang_Cursor_getRawCommentText(
C,
);
}
late final _clang_Cursor_getRawCommentText_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_getRawCommentText>>(
'clang_Cursor_getRawCommentText');
late final _dart_clang_Cursor_getRawCommentText
_clang_Cursor_getRawCommentText = _clang_Cursor_getRawCommentText_ptr
.asFunction<_dart_clang_Cursor_getRawCommentText>();
/// Given a cursor that represents a documentable entity (e.g.,
/// declaration), return the associated \paragraph; otherwise return the
/// first paragraph.
CXString clang_Cursor_getBriefCommentText(
CXCursor C,
) {
return _clang_Cursor_getBriefCommentText(
C,
);
}
late final _clang_Cursor_getBriefCommentText_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_getBriefCommentText>>(
'clang_Cursor_getBriefCommentText');
late final _dart_clang_Cursor_getBriefCommentText
_clang_Cursor_getBriefCommentText = _clang_Cursor_getBriefCommentText_ptr
.asFunction<_dart_clang_Cursor_getBriefCommentText>();
/// \defgroup CINDEX_DEBUG Debugging facilities
///
/// These routines are used for testing and debugging, only, and should not
/// be relied upon.
///
/// @{
CXString clang_getCursorKindSpelling(
int Kind,
) {
return _clang_getCursorKindSpelling(
Kind,
);
}
late final _clang_getCursorKindSpelling_ptr =
_lookup<ffi.NativeFunction<_c_clang_getCursorKindSpelling>>(
'clang_getCursorKindSpelling');
late final _dart_clang_getCursorKindSpelling _clang_getCursorKindSpelling =
_clang_getCursorKindSpelling_ptr
.asFunction<_dart_clang_getCursorKindSpelling>();
/// If cursor is a statement declaration tries to evaluate the
/// statement and if its variable, tries to evaluate its initializer,
/// into its corresponding type.
ffi.Pointer<ffi.Void> clang_Cursor_Evaluate(
CXCursor C,
) {
return _clang_Cursor_Evaluate(
C,
);
}
late final _clang_Cursor_Evaluate_ptr =
_lookup<ffi.NativeFunction<_c_clang_Cursor_Evaluate>>(
'clang_Cursor_Evaluate');
late final _dart_clang_Cursor_Evaluate _clang_Cursor_Evaluate =
_clang_Cursor_Evaluate_ptr.asFunction<_dart_clang_Cursor_Evaluate>();
/// Returns the kind of the evaluated result.
int clang_EvalResult_getKind(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_getKind(
E,
);
}
late final _clang_EvalResult_getKind_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_getKind>>(
'clang_EvalResult_getKind');
late final _dart_clang_EvalResult_getKind _clang_EvalResult_getKind =
_clang_EvalResult_getKind_ptr
.asFunction<_dart_clang_EvalResult_getKind>();
/// Returns the evaluation result as integer if the
/// kind is Int.
int clang_EvalResult_getAsInt(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_getAsInt(
E,
);
}
late final _clang_EvalResult_getAsInt_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_getAsInt>>(
'clang_EvalResult_getAsInt');
late final _dart_clang_EvalResult_getAsInt _clang_EvalResult_getAsInt =
_clang_EvalResult_getAsInt_ptr
.asFunction<_dart_clang_EvalResult_getAsInt>();
/// 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.
int clang_EvalResult_getAsLongLong(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_getAsLongLong(
E,
);
}
late final _clang_EvalResult_getAsLongLong_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_getAsLongLong>>(
'clang_EvalResult_getAsLongLong');
late final _dart_clang_EvalResult_getAsLongLong
_clang_EvalResult_getAsLongLong = _clang_EvalResult_getAsLongLong_ptr
.asFunction<_dart_clang_EvalResult_getAsLongLong>();
/// Returns the evaluation result as double if the
/// kind is double.
double clang_EvalResult_getAsDouble(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_getAsDouble(
E,
);
}
late final _clang_EvalResult_getAsDouble_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_getAsDouble>>(
'clang_EvalResult_getAsDouble');
late final _dart_clang_EvalResult_getAsDouble _clang_EvalResult_getAsDouble =
_clang_EvalResult_getAsDouble_ptr
.asFunction<_dart_clang_EvalResult_getAsDouble>();
/// 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.
ffi.Pointer<ffi.Int8> clang_EvalResult_getAsStr(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_getAsStr(
E,
);
}
late final _clang_EvalResult_getAsStr_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_getAsStr>>(
'clang_EvalResult_getAsStr');
late final _dart_clang_EvalResult_getAsStr _clang_EvalResult_getAsStr =
_clang_EvalResult_getAsStr_ptr
.asFunction<_dart_clang_EvalResult_getAsStr>();
/// Disposes the created Eval memory.
void clang_EvalResult_dispose(
ffi.Pointer<ffi.Void> E,
) {
return _clang_EvalResult_dispose(
E,
);
}
late final _clang_EvalResult_dispose_ptr =
_lookup<ffi.NativeFunction<_c_clang_EvalResult_dispose>>(
'clang_EvalResult_dispose');
late final _dart_clang_EvalResult_dispose _clang_EvalResult_dispose =
_clang_EvalResult_dispose_ptr
.asFunction<_dart_clang_EvalResult_dispose>();
}
/// A character string.
///
/// The \c CXString type is used to return strings from the interface when
/// the ownership of that string might differ from one call to the next.
/// Use \c clang_getCString() to retrieve the string data and, once finished
/// with the string data, call \c clang_disposeString() to free the string.
class CXString extends ffi.Struct {
external ffi.Pointer<ffi.Void> data;
@ffi.Uint32()
external int private_flags;
}
class CXTranslationUnitImpl extends ffi.Opaque {}
/// Provides the contents of a file that has not yet been saved to disk.
///
/// Each CXUnsavedFile instance provides the name of a file on the
/// system along with the current contents of that file that have not
/// yet been saved to disk.
class CXUnsavedFile extends ffi.Struct {
/// The file whose contents have not yet been saved.
///
/// This file must already exist in the file system.
external ffi.Pointer<ffi.Int8> Filename;
/// A buffer containing the unsaved contents of this file.
external ffi.Pointer<ffi.Int8> Contents;
/// The length of the unsaved contents of this buffer.
@ffi.Uint64()
external int Length;
}
/// Identifies a specific source location within a translation
/// unit.
///
/// Use clang_getExpansionLocation() or clang_getSpellingLocation()
/// to map a source location to a particular file, line, and column.
class CXSourceLocation extends ffi.Struct {
@ffi.Array.multi([2])
external ffi.Array<ffi.Pointer<ffi.Void>> ptr_data;
@ffi.Uint32()
external int int_data;
}
/// Identifies a half-open character range in the source code.
///
/// Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the
/// starting and end locations from a source range, respectively.
class CXSourceRange extends ffi.Struct {
@ffi.Array.multi([2])
external ffi.Array<ffi.Pointer<ffi.Void>> ptr_data;
@ffi.Uint32()
external int begin_int_data;
@ffi.Uint32()
external int end_int_data;
}
/// Options to control the display of diagnostics.
///
/// The values in this enum are meant to be combined to customize the
/// behavior of \c clang_formatDiagnostic().
abstract class CXDiagnosticDisplayOptions {
/// Display the source-location information where the
/// diagnostic was located.
///
/// When set, diagnostics will be prefixed by the file, line, and
/// (optionally) column to which the diagnostic refers. For example,
///
/// \code
/// test.c:28: warning: extra tokens at end of #endif directive
/// \endcode
///
/// This option corresponds to the clang flag \c -fshow-source-location.
static const int CXDiagnostic_DisplaySourceLocation = 1;
/// If displaying the source-location information of the
/// diagnostic, also include the column number.
///
/// This option corresponds to the clang flag \c -fshow-column.
static const int CXDiagnostic_DisplayColumn = 2;
/// If displaying the source-location information of the
/// diagnostic, also include information about source ranges in a
/// machine-parsable format.
///
/// This option corresponds to the clang flag
/// \c -fdiagnostics-print-source-range-info.
static const int CXDiagnostic_DisplaySourceRanges = 4;
/// Display the option name associated with this diagnostic, if any.
///
/// The option name displayed (e.g., -Wconversion) will be placed in brackets
/// after the diagnostic text. This option corresponds to the clang flag
/// \c -fdiagnostics-show-option.
static const int CXDiagnostic_DisplayOption = 8;
/// Display the category number associated with this diagnostic, if any.
///
/// The category number is displayed within brackets after the diagnostic text.
/// This option corresponds to the clang flag
/// \c -fdiagnostics-show-category=id.
static const int CXDiagnostic_DisplayCategoryId = 16;
/// Display the category name associated with this diagnostic, if any.
///
/// The category name is displayed within brackets after the diagnostic text.
/// This option corresponds to the clang flag
/// \c -fdiagnostics-show-category=name.
static const int CXDiagnostic_DisplayCategoryName = 32;
}
/// Flags that control the creation of translation units.
///
/// The enumerators in this enumeration type are meant to be bitwise
/// ORed together to specify which options should be used when
/// constructing the translation unit.
abstract class CXTranslationUnit_Flags {
/// Used to indicate that no special translation-unit options are
/// needed.
static const int CXTranslationUnit_None = 0;
/// Used to indicate that the parser should construct a "detailed"
/// preprocessing record, including all macro definitions and instantiations.
///
/// Constructing a detailed preprocessing record requires more memory
/// and time to parse, since the information contained in the record
/// is usually not retained. However, it can be useful for
/// applications that require more detailed information about the
/// behavior of the preprocessor.
static const int CXTranslationUnit_DetailedPreprocessingRecord = 1;
/// Used to indicate that the translation unit is incomplete.
///
/// When a translation unit is considered "incomplete", semantic
/// analysis that is typically performed at the end of the
/// translation unit will be suppressed. For example, this suppresses
/// the completion of tentative declarations in C and of
/// instantiation of implicitly-instantiation function templates in
/// C++. This option is typically used when parsing a header with the
/// intent of producing a precompiled header.
static const int CXTranslationUnit_Incomplete = 2;
/// Used to indicate that the translation unit should be built with an
/// implicit precompiled header for the preamble.
///
/// An implicit precompiled header is used as an optimization when a
/// particular translation unit is likely to be reparsed many times
/// when the sources aren't changing that often. In this case, an
/// implicit precompiled header will be built containing all of the
/// initial includes at the top of the main file (what we refer to as
/// the "preamble" of the file). In subsequent parses, if the
/// preamble or the files in it have not changed, \c
/// clang_reparseTranslationUnit() will re-use the implicit
/// precompiled header to improve parsing performance.
static const int CXTranslationUnit_PrecompiledPreamble = 4;
/// Used to indicate that the translation unit should cache some
/// code-completion results with each reparse of the source file.
///
/// Caching of code-completion results is a performance optimization that
/// introduces some overhead to reparsing but improves the performance of
/// code-completion operations.
static const int CXTranslationUnit_CacheCompletionResults = 8;
/// Used to indicate that the translation unit will be serialized with
/// \c clang_saveTranslationUnit.
///
/// This option is typically used when parsing a header with the intent of
/// producing a precompiled header.
static const int CXTranslationUnit_ForSerialization = 16;
/// DEPRECATED: Enabled chained precompiled preambles in C++.
///
/// Note: this is a *temporary* option that is available only while
/// we are testing C++ precompiled preamble support. It is deprecated.
static const int CXTranslationUnit_CXXChainedPCH = 32;
/// Used to indicate that function/method bodies should be skipped while
/// parsing.
///
/// This option can be used to search for declarations/definitions while
/// ignoring the usages.
static const int CXTranslationUnit_SkipFunctionBodies = 64;
/// Used to indicate that brief documentation comments should be
/// included into the set of code completions returned from this translation
/// unit.
static const int CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 128;
/// Used to indicate that the precompiled preamble should be created on
/// the first parse. Otherwise it will be created on the first reparse. This
/// trades runtime on the first parse (serializing the preamble takes time) for
/// reduced runtime on the second parse (can now reuse the preamble).
static const int CXTranslationUnit_CreatePreambleOnFirstParse = 256;
/// Do not stop processing when fatal errors are encountered.
///
/// When fatal errors are encountered while parsing a translation unit,
/// semantic analysis is typically stopped early when compiling code. A common
/// source for fatal errors are unresolvable include files. For the
/// purposes of an IDE, this is undesirable behavior and as much information
/// as possible should be reported. Use this flag to enable this behavior.
static const int CXTranslationUnit_KeepGoing = 512;
/// Sets the preprocessor in a mode for parsing a single file only.
static const int CXTranslationUnit_SingleFileParse = 1024;
/// Used in combination with CXTranslationUnit_SkipFunctionBodies to
/// constrain the skipping of function bodies to the preamble.
///
/// The function bodies of the main file are not skipped.
static const int CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 2048;
/// Used to indicate that attributed types should be included in CXType.
static const int CXTranslationUnit_IncludeAttributedTypes = 4096;
/// Used to indicate that implicit attributes should be visited.
static const int CXTranslationUnit_VisitImplicitAttributes = 8192;
/// Used to indicate that non-errors from included files should be ignored.
///
/// If set, clang_getDiagnosticSetFromTU() will not report e.g. warnings from
/// included files anymore. This speeds up clang_getDiagnosticSetFromTU() for
/// the case where these warnings are not of interest, as for an IDE for
/// example, which typically shows only the diagnostics in the main file.
static const int CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles = 16384;
/// Tells the preprocessor not to skip excluded conditional blocks.
static const int CXTranslationUnit_RetainExcludedConditionalBlocks = 32768;
}
/// Describes the kind of entity that a cursor refers to.
abstract class CXCursorKind {
/// A declaration whose specific kind is not exposed via this
/// interface.
///
/// Unexposed declarations have the same operations as any other kind
/// of declaration; one can extract their location information,
/// spelling, find their definitions, etc. However, the specific kind
/// of the declaration is not reported.
static const int CXCursor_UnexposedDecl = 1;
/// A C or C++ struct.
static const int CXCursor_StructDecl = 2;
/// A C or C++ union.
static const int CXCursor_UnionDecl = 3;
/// A C++ class.
static const int CXCursor_ClassDecl = 4;
/// An enumeration.
static const int CXCursor_EnumDecl = 5;
/// A field (in C) or non-static data member (in C++) in a
/// struct, union, or C++ class.
static const int CXCursor_FieldDecl = 6;
/// An enumerator constant.
static const int CXCursor_EnumConstantDecl = 7;
/// A function.
static const int CXCursor_FunctionDecl = 8;
/// A variable.
static const int CXCursor_VarDecl = 9;
/// A function or method parameter.
static const int CXCursor_ParmDecl = 10;
/// An Objective-C \@interface.
static const int CXCursor_ObjCInterfaceDecl = 11;
/// An Objective-C \@interface for a category.
static const int CXCursor_ObjCCategoryDecl = 12;
/// An Objective-C \@protocol declaration.
static const int CXCursor_ObjCProtocolDecl = 13;
/// An Objective-C \@property declaration.
static const int CXCursor_ObjCPropertyDecl = 14;
/// An Objective-C instance variable.
static const int CXCursor_ObjCIvarDecl = 15;
/// An Objective-C instance method.
static const int CXCursor_ObjCInstanceMethodDecl = 16;
/// An Objective-C class method.
static const int CXCursor_ObjCClassMethodDecl = 17;
/// An Objective-C \@implementation.
static const int CXCursor_ObjCImplementationDecl = 18;
/// An Objective-C \@implementation for a category.
static const int CXCursor_ObjCCategoryImplDecl = 19;
/// A typedef.
static const int CXCursor_TypedefDecl = 20;
/// A C++ class method.
static const int CXCursor_CXXMethod = 21;
/// A C++ namespace.
static const int CXCursor_Namespace = 22;
/// A linkage specification, e.g. 'extern "C"'.
static const int CXCursor_LinkageSpec = 23;
/// A C++ constructor.
static const int CXCursor_Constructor = 24;
/// A C++ destructor.
static const int CXCursor_Destructor = 25;
/// A C++ conversion function.
static const int CXCursor_ConversionFunction = 26;
/// A C++ template type parameter.
static const int CXCursor_TemplateTypeParameter = 27;
/// A C++ non-type template parameter.
static const int CXCursor_NonTypeTemplateParameter = 28;
/// A C++ template template parameter.
static const int CXCursor_TemplateTemplateParameter = 29;
/// A C++ function template.
static const int CXCursor_FunctionTemplate = 30;
/// A C++ class template.
static const int CXCursor_ClassTemplate = 31;
/// A C++ class template partial specialization.
static const int CXCursor_ClassTemplatePartialSpecialization = 32;
/// A C++ namespace alias declaration.
static const int CXCursor_NamespaceAlias = 33;
/// A C++ using directive.
static const int CXCursor_UsingDirective = 34;
/// A C++ using declaration.
static const int CXCursor_UsingDeclaration = 35;
/// A C++ alias declaration
static const int CXCursor_TypeAliasDecl = 36;
/// An Objective-C \@synthesize definition.
static const int CXCursor_ObjCSynthesizeDecl = 37;
/// An Objective-C \@dynamic definition.
static const int CXCursor_ObjCDynamicDecl = 38;
/// An access specifier.
static const int CXCursor_CXXAccessSpecifier = 39;
static const int CXCursor_FirstDecl = 1;
static const int CXCursor_LastDecl = 39;
static const int CXCursor_FirstRef = 40;
static const int CXCursor_ObjCSuperClassRef = 40;
static const int CXCursor_ObjCProtocolRef = 41;
static const int CXCursor_ObjCClassRef = 42;
/// A reference to a type declaration.
///
/// A type reference occurs anywhere where a type is named but not
/// declared. For example, given:
///
/// \code
/// typedef unsigned size_type;
/// size_type size;
/// \endcode
///
/// The typedef is a declaration of size_type (CXCursor_TypedefDecl),
/// while the type of the variable "size" is referenced. The cursor
/// referenced by the type of size is the typedef for size_type.
static const int CXCursor_TypeRef = 43;
static const int CXCursor_CXXBaseSpecifier = 44;
/// A reference to a class template, function template, template
/// template parameter, or class template partial specialization.
static const int CXCursor_TemplateRef = 45;
/// A reference to a namespace or namespace alias.
static const int CXCursor_NamespaceRef = 46;
/// A reference to a member of a struct, union, or class that occurs in
/// some non-expression context, e.g., a designated initializer.
static const int CXCursor_MemberRef = 47;
/// A reference to a labeled statement.
///
/// This cursor kind is used to describe the jump to "start_over" in the
/// goto statement in the following example:
///
/// \code
/// start_over:
/// ++counter;
///
/// goto start_over;
/// \endcode
///
/// A label reference cursor refers to a label statement.
static const int CXCursor_LabelRef = 48;
/// A reference to a set of overloaded functions or function templates
/// that has not yet been resolved to a specific function or function template.
///
/// An overloaded declaration reference cursor occurs in C++ templates where
/// a dependent name refers to a function. For example:
///
/// \code
/// template<typename T> void swap(T&, T&);
///
/// struct X { ... };
/// void swap(X&, X&);
///
/// template<typename T>
/// void reverse(T* first, T* last) {
/// while (first < last - 1) {
/// swap(*first, *--last);
/// ++first;
/// }
/// }
///
/// struct Y { };
/// void swap(Y&, Y&);
/// \endcode
///
/// Here, the identifier "swap" is associated with an overloaded declaration
/// reference. In the template definition, "swap" refers to either of the two
/// "swap" functions declared above, so both results will be available. At
/// instantiation time, "swap" may also refer to other functions found via
/// argument-dependent lookup (e.g., the "swap" function at the end of the
/// example).
///
/// The functions \c clang_getNumOverloadedDecls() and
/// \c clang_getOverloadedDecl() can be used to retrieve the definitions
/// referenced by this cursor.
static const int CXCursor_OverloadedDeclRef = 49;
/// A reference to a variable that occurs in some non-expression
/// context, e.g., a C++ lambda capture list.
static const int CXCursor_VariableRef = 50;
static const int CXCursor_LastRef = 50;
static const int CXCursor_FirstInvalid = 70;
static const int CXCursor_InvalidFile = 70;
static const int CXCursor_NoDeclFound = 71;
static const int CXCursor_NotImplemented = 72;
static const int CXCursor_InvalidCode = 73;
static const int CXCursor_LastInvalid = 73;
static const int CXCursor_FirstExpr = 100;
/// An expression whose specific kind is not exposed via this
/// interface.
///
/// Unexposed expressions have the same operations as any other kind
/// of expression; one can extract their location information,
/// spelling, children, etc. However, the specific kind of the
/// expression is not reported.
static const int CXCursor_UnexposedExpr = 100;
/// An expression that refers to some value declaration, such
/// as a function, variable, or enumerator.
static const int CXCursor_DeclRefExpr = 101;
/// An expression that refers to a member of a struct, union,
/// class, Objective-C class, etc.
static const int CXCursor_MemberRefExpr = 102;
/// An expression that calls a function.
static const int CXCursor_CallExpr = 103;
/// An expression that sends a message to an Objective-C
/// object or class.
static const int CXCursor_ObjCMessageExpr = 104;
/// An expression that represents a block literal.
static const int CXCursor_BlockExpr = 105;
/// An integer literal.
static const int CXCursor_IntegerLiteral = 106;
/// A floating point number literal.
static const int CXCursor_FloatingLiteral = 107;
/// An imaginary number literal.
static const int CXCursor_ImaginaryLiteral = 108;
/// A string literal.
static const int CXCursor_StringLiteral = 109;
/// A character literal.
static const int CXCursor_CharacterLiteral = 110;
/// A parenthesized expression, e.g. "(1)".
///
/// This AST node is only formed if full location information is requested.
static const int CXCursor_ParenExpr = 111;
/// This represents the unary-expression's (except sizeof and
/// alignof).
static const int CXCursor_UnaryOperator = 112;
/// [C99 6.5.2.1] Array Subscripting.
static const int CXCursor_ArraySubscriptExpr = 113;
/// A builtin binary operation expression such as "x + y" or
/// "x <= y".
static const int CXCursor_BinaryOperator = 114;
/// Compound assignment such as "+=".
static const int CXCursor_CompoundAssignOperator = 115;
/// The ?: ternary operator.
static const int CXCursor_ConditionalOperator = 116;
/// 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.
///
/// For example: (int)f.
static const int CXCursor_CStyleCastExpr = 117;
/// [C99 6.5.2.5]
static const int CXCursor_CompoundLiteralExpr = 118;
/// Describes an C or C++ initializer list.
static const int CXCursor_InitListExpr = 119;
/// The GNU address of label extension, representing &&label.
static const int CXCursor_AddrLabelExpr = 120;
/// This is the GNU Statement Expression extension: ({int X=4; X;})
static const int CXCursor_StmtExpr = 121;
/// Represents a C11 generic selection.
static const int CXCursor_GenericSelectionExpr = 122;
/// 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.
///
/// The __null extension is typically only used by system headers, which define
/// NULL as __null in C++ rather than using 0 (which is an integer that may not
/// match the size of a pointer).
static const int CXCursor_GNUNullExpr = 123;
/// C++'s static_cast<> expression.
static const int CXCursor_CXXStaticCastExpr = 124;
/// C++'s dynamic_cast<> expression.
static const int CXCursor_CXXDynamicCastExpr = 125;
/// C++'s reinterpret_cast<> expression.
static const int CXCursor_CXXReinterpretCastExpr = 126;
/// C++'s const_cast<> expression.
static const int CXCursor_CXXConstCastExpr = 127;
/// Represents an explicit C++ type conversion that uses "functional"
/// notion (C++ [expr.type.conv]).
///
/// Example:
/// \code
/// x = int(0.5);
/// \endcode
static const int CXCursor_CXXFunctionalCastExpr = 128;
/// A C++ typeid expression (C++ [expr.typeid]).
static const int CXCursor_CXXTypeidExpr = 129;
/// [C++ 2.13.5] C++ Boolean Literal.
static const int CXCursor_CXXBoolLiteralExpr = 130;
/// [C++0x 2.14.7] C++ Pointer Literal.
static const int CXCursor_CXXNullPtrLiteralExpr = 131;
/// Represents the "this" expression in C++
static const int CXCursor_CXXThisExpr = 132;
/// [C++ 15] C++ Throw Expression.
///
/// This handles 'throw' and 'throw' assignment-expression. When
/// assignment-expression isn't present, Op will be null.
static const int CXCursor_CXXThrowExpr = 133;
/// A new expression for memory allocation and constructor calls, e.g:
/// "new CXXNewExpr(foo)".
static const int CXCursor_CXXNewExpr = 134;
/// A delete expression for memory deallocation and destructor calls,
/// e.g. "delete[] pArray".
static const int CXCursor_CXXDeleteExpr = 135;
/// A unary expression. (noexcept, sizeof, or other traits)
static const int CXCursor_UnaryExpr = 136;
/// An Objective-C string literal i.e. @"foo".
static const int CXCursor_ObjCStringLiteral = 137;
/// An Objective-C \@encode expression.
static const int CXCursor_ObjCEncodeExpr = 138;
/// An Objective-C \@selector expression.
static const int CXCursor_ObjCSelectorExpr = 139;
/// An Objective-C \@protocol expression.
static const int CXCursor_ObjCProtocolExpr = 140;
/// An Objective-C "bridged" cast expression, which casts between
/// Objective-C pointers and C pointers, transferring ownership in the process.
///
/// \code
/// NSString *str = (__bridge_transfer NSString *)CFCreateString();
/// \endcode
static const int CXCursor_ObjCBridgedCastExpr = 141;
/// Represents a C++0x pack expansion that produces a sequence of
/// expressions.
///
/// A pack expansion expression contains a pattern (which itself is an
/// expression) followed by an ellipsis. For example:
///
/// \code
/// template<typename F, typename ...Types>
/// void forward(F f, Types &&...args) {
/// f(static_cast<Types&&>(args)...);
/// }
/// \endcode
static const int CXCursor_PackExpansionExpr = 142;
/// Represents an expression that computes the length of a parameter
/// pack.
///
/// \code
/// template<typename ...Types>
/// struct count {
/// static const unsigned value = sizeof...(Types);
/// };
/// \endcode
static const int CXCursor_SizeOfPackExpr = 143;
static const int CXCursor_LambdaExpr = 144;
/// Objective-c Boolean Literal.
static const int CXCursor_ObjCBoolLiteralExpr = 145;
/// Represents the "self" expression in an Objective-C method.
static const int CXCursor_ObjCSelfExpr = 146;
/// OpenMP 4.0 [2.4, Array Section].
static const int CXCursor_OMPArraySectionExpr = 147;
/// Represents an @available(...) check.
static const int CXCursor_ObjCAvailabilityCheckExpr = 148;
/// Fixed point literal
static const int CXCursor_FixedPointLiteral = 149;
static const int CXCursor_LastExpr = 149;
static const int CXCursor_FirstStmt = 200;
/// A statement whose specific kind is not exposed via this
/// interface.
///
/// Unexposed statements have the same operations as any other kind of
/// statement; one can extract their location information, spelling,
/// children, etc. However, the specific kind of the statement is not
/// reported.
static const int CXCursor_UnexposedStmt = 200;
/// A labelled statement in a function.
///
/// This cursor kind is used to describe the "start_over:" label statement in
/// the following example:
///
/// \code
/// start_over:
/// ++counter;
/// \endcode
static const int CXCursor_LabelStmt = 201;
/// A group of statements like { stmt stmt }.
///
/// This cursor kind is used to describe compound statements, e.g. function
/// bodies.
static const int CXCursor_CompoundStmt = 202;
/// A case statement.
static const int CXCursor_CaseStmt = 203;
/// A default statement.
static const int CXCursor_DefaultStmt = 204;
/// An if statement
static const int CXCursor_IfStmt = 205;
/// A switch statement.
static const int CXCursor_SwitchStmt = 206;
/// A while statement.
static const int CXCursor_WhileStmt = 207;
/// A do statement.
static const int CXCursor_DoStmt = 208;
/// A for statement.
static const int CXCursor_ForStmt = 209;
/// A goto statement.
static const int CXCursor_GotoStmt = 210;
/// An indirect goto statement.
static const int CXCursor_IndirectGotoStmt = 211;
/// A continue statement.
static const int CXCursor_ContinueStmt = 212;
/// A break statement.
static const int CXCursor_BreakStmt = 213;
/// A return statement.
static const int CXCursor_ReturnStmt = 214;
/// A GCC inline assembly statement extension.
static const int CXCursor_GCCAsmStmt = 215;
static const int CXCursor_AsmStmt = 215;
/// Objective-C's overall \@try-\@catch-\@finally statement.
static const int CXCursor_ObjCAtTryStmt = 216;
/// Objective-C's \@catch statement.
static const int CXCursor_ObjCAtCatchStmt = 217;
/// Objective-C's \@finally statement.
static const int CXCursor_ObjCAtFinallyStmt = 218;
/// Objective-C's \@throw statement.
static const int CXCursor_ObjCAtThrowStmt = 219;
/// Objective-C's \@synchronized statement.
static const int CXCursor_ObjCAtSynchronizedStmt = 220;
/// Objective-C's autorelease pool statement.
static const int CXCursor_ObjCAutoreleasePoolStmt = 221;
/// Objective-C's collection statement.
static const int CXCursor_ObjCForCollectionStmt = 222;
/// C++'s catch statement.
static const int CXCursor_CXXCatchStmt = 223;
/// C++'s try statement.
static const int CXCursor_CXXTryStmt = 224;
/// C++'s for (* : *) statement.
static const int CXCursor_CXXForRangeStmt = 225;
/// Windows Structured Exception Handling's try statement.
static const int CXCursor_SEHTryStmt = 226;
/// Windows Structured Exception Handling's except statement.
static const int CXCursor_SEHExceptStmt = 227;
/// Windows Structured Exception Handling's finally statement.
static const int CXCursor_SEHFinallyStmt = 228;
/// A MS inline assembly statement extension.
static const int CXCursor_MSAsmStmt = 229;
/// The null statement ";": C99 6.8.3p3.
///
/// This cursor kind is used to describe the null statement.
static const int CXCursor_NullStmt = 230;
/// Adaptor class for mixing declarations with statements and
/// expressions.
static const int CXCursor_DeclStmt = 231;
/// OpenMP parallel directive.
static const int CXCursor_OMPParallelDirective = 232;
/// OpenMP SIMD directive.
static const int CXCursor_OMPSimdDirective = 233;
/// OpenMP for directive.
static const int CXCursor_OMPForDirective = 234;
/// OpenMP sections directive.
static const int CXCursor_OMPSectionsDirective = 235;
/// OpenMP section directive.
static const int CXCursor_OMPSectionDirective = 236;
/// OpenMP single directive.
static const int CXCursor_OMPSingleDirective = 237;
/// OpenMP parallel for directive.
static const int CXCursor_OMPParallelForDirective = 238;
/// OpenMP parallel sections directive.
static const int CXCursor_OMPParallelSectionsDirective = 239;
/// OpenMP task directive.
static const int CXCursor_OMPTaskDirective = 240;
/// OpenMP master directive.
static const int CXCursor_OMPMasterDirective = 241;
/// OpenMP critical directive.
static const int CXCursor_OMPCriticalDirective = 242;
/// OpenMP taskyield directive.
static const int CXCursor_OMPTaskyieldDirective = 243;
/// OpenMP barrier directive.
static const int CXCursor_OMPBarrierDirective = 244;
/// OpenMP taskwait directive.
static const int CXCursor_OMPTaskwaitDirective = 245;
/// OpenMP flush directive.
static const int CXCursor_OMPFlushDirective = 246;
/// Windows Structured Exception Handling's leave statement.
static const int CXCursor_SEHLeaveStmt = 247;
/// OpenMP ordered directive.
static const int CXCursor_OMPOrderedDirective = 248;
/// OpenMP atomic directive.
static const int CXCursor_OMPAtomicDirective = 249;
/// OpenMP for SIMD directive.
static const int CXCursor_OMPForSimdDirective = 250;
/// OpenMP parallel for SIMD directive.
static const int CXCursor_OMPParallelForSimdDirective = 251;
/// OpenMP target directive.
static const int CXCursor_OMPTargetDirective = 252;
/// OpenMP teams directive.
static const int CXCursor_OMPTeamsDirective = 253;
/// OpenMP taskgroup directive.
static const int CXCursor_OMPTaskgroupDirective = 254;
/// OpenMP cancellation point directive.
static const int CXCursor_OMPCancellationPointDirective = 255;
/// OpenMP cancel directive.
static const int CXCursor_OMPCancelDirective = 256;
/// OpenMP target data directive.
static const int CXCursor_OMPTargetDataDirective = 257;
/// OpenMP taskloop directive.
static const int CXCursor_OMPTaskLoopDirective = 258;
/// OpenMP taskloop simd directive.
static const int CXCursor_OMPTaskLoopSimdDirective = 259;
/// OpenMP distribute directive.
static const int CXCursor_OMPDistributeDirective = 260;
/// OpenMP target enter data directive.
static const int CXCursor_OMPTargetEnterDataDirective = 261;
/// OpenMP target exit data directive.
static const int CXCursor_OMPTargetExitDataDirective = 262;
/// OpenMP target parallel directive.
static const int CXCursor_OMPTargetParallelDirective = 263;
/// OpenMP target parallel for directive.
static const int CXCursor_OMPTargetParallelForDirective = 264;
/// OpenMP target update directive.
static const int CXCursor_OMPTargetUpdateDirective = 265;
/// OpenMP distribute parallel for directive.
static const int CXCursor_OMPDistributeParallelForDirective = 266;
/// OpenMP distribute parallel for simd directive.
static const int CXCursor_OMPDistributeParallelForSimdDirective = 267;
/// OpenMP distribute simd directive.
static const int CXCursor_OMPDistributeSimdDirective = 268;
/// OpenMP target parallel for simd directive.
static const int CXCursor_OMPTargetParallelForSimdDirective = 269;
/// OpenMP target simd directive.
static const int CXCursor_OMPTargetSimdDirective = 270;
/// OpenMP teams distribute directive.
static const int CXCursor_OMPTeamsDistributeDirective = 271;
/// OpenMP teams distribute simd directive.
static const int CXCursor_OMPTeamsDistributeSimdDirective = 272;
/// OpenMP teams distribute parallel for simd directive.
static const int CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273;
/// OpenMP teams distribute parallel for directive.
static const int CXCursor_OMPTeamsDistributeParallelForDirective = 274;
/// OpenMP target teams directive.
static const int CXCursor_OMPTargetTeamsDirective = 275;
/// OpenMP target teams distribute directive.
static const int CXCursor_OMPTargetTeamsDistributeDirective = 276;
/// OpenMP target teams distribute parallel for directive.
static const int CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277;
/// OpenMP target teams distribute parallel for simd directive.
static const int CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective =
278;
/// OpenMP target teams distribute simd directive.
static const int CXCursor_OMPTargetTeamsDistributeSimdDirective = 279;
/// C++2a std::bit_cast expression.
static const int CXCursor_BuiltinBitCastExpr = 280;
/// OpenMP master taskloop directive.
static const int CXCursor_OMPMasterTaskLoopDirective = 281;
/// OpenMP parallel master taskloop directive.
static const int CXCursor_OMPParallelMasterTaskLoopDirective = 282;
/// OpenMP master taskloop simd directive.
static const int CXCursor_OMPMasterTaskLoopSimdDirective = 283;
/// OpenMP parallel master taskloop simd directive.
static const int CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284;
/// OpenMP parallel master directive.
static const int CXCursor_OMPParallelMasterDirective = 285;
static const int CXCursor_LastStmt = 285;
/// Cursor that represents the translation unit itself.
///
/// The translation unit cursor exists primarily to act as the root
/// cursor for traversing the contents of a translation unit.
static const int CXCursor_TranslationUnit = 300;
static const int CXCursor_FirstAttr = 400;
/// An attribute whose specific kind is not exposed via this
/// interface.
static const int CXCursor_UnexposedAttr = 400;
static const int CXCursor_IBActionAttr = 401;
static const int CXCursor_IBOutletAttr = 402;
static const int CXCursor_IBOutletCollectionAttr = 403;
static const int CXCursor_CXXFinalAttr = 404;
static const int CXCursor_CXXOverrideAttr = 405;
static const int CXCursor_AnnotateAttr = 406;
static const int CXCursor_AsmLabelAttr = 407;
static const int CXCursor_PackedAttr = 408;
static const int CXCursor_PureAttr = 409;
static const int CXCursor_ConstAttr = 410;
static const int CXCursor_NoDuplicateAttr = 411;
static const int CXCursor_CUDAConstantAttr = 412;
static const int CXCursor_CUDADeviceAttr = 413;
static const int CXCursor_CUDAGlobalAttr = 414;
static const int CXCursor_CUDAHostAttr = 415;
static const int CXCursor_CUDASharedAttr = 416;
static const int CXCursor_VisibilityAttr = 417;
static const int CXCursor_DLLExport = 418;
static const int CXCursor_DLLImport = 419;
static const int CXCursor_NSReturnsRetained = 420;
static const int CXCursor_NSReturnsNotRetained = 421;
static const int CXCursor_NSReturnsAutoreleased = 422;
static const int CXCursor_NSConsumesSelf = 423;
static const int CXCursor_NSConsumed = 424;
static const int CXCursor_ObjCException = 425;
static const int CXCursor_ObjCNSObject = 426;
static const int CXCursor_ObjCIndependentClass = 427;
static const int CXCursor_ObjCPreciseLifetime = 428;
static const int CXCursor_ObjCReturnsInnerPointer = 429;
static const int CXCursor_ObjCRequiresSuper = 430;
static const int CXCursor_ObjCRootClass = 431;
static const int CXCursor_ObjCSubclassingRestricted = 432;
static const int CXCursor_ObjCExplicitProtocolImpl = 433;
static const int CXCursor_ObjCDesignatedInitializer = 434;
static const int CXCursor_ObjCRuntimeVisible = 435;
static const int CXCursor_ObjCBoxable = 436;
static const int CXCursor_FlagEnum = 437;
static const int CXCursor_ConvergentAttr = 438;
static const int CXCursor_WarnUnusedAttr = 439;
static const int CXCursor_WarnUnusedResultAttr = 440;
static const int CXCursor_AlignedAttr = 441;
static const int CXCursor_LastAttr = 441;
static const int CXCursor_PreprocessingDirective = 500;
static const int CXCursor_MacroDefinition = 501;
static const int CXCursor_MacroExpansion = 502;
static const int CXCursor_MacroInstantiation = 502;
static const int CXCursor_InclusionDirective = 503;
static const int CXCursor_FirstPreprocessing = 500;
static const int CXCursor_LastPreprocessing = 503;
/// A module import declaration.
static const int CXCursor_ModuleImportDecl = 600;
static const int CXCursor_TypeAliasTemplateDecl = 601;
/// A static_assert or _Static_assert node
static const int CXCursor_StaticAssert = 602;
/// a friend declaration.
static const int CXCursor_FriendDecl = 603;
static const int CXCursor_FirstExtraDecl = 600;
static const int CXCursor_LastExtraDecl = 603;
/// A code completion overload candidate.
static const int CXCursor_OverloadCandidate = 700;
}
/// A cursor representing some element in the abstract syntax tree for
/// a translation unit.
///
/// The cursor abstraction unifies the different kinds of entities in a
/// program--declaration, statements, expressions, references to declarations,
/// etc.--under a single "cursor" abstraction with a common set of operations.
/// Common operation for a cursor include: getting the physical location in
/// a source file where the cursor points, getting the name associated with a
/// cursor, and retrieving cursors for any child nodes of a particular cursor.
///
/// Cursors can be produced in two specific ways.
/// clang_getTranslationUnitCursor() produces a cursor for a translation unit,
/// from which one can use clang_visitChildren() to explore the rest of the
/// translation unit. clang_getCursor() maps from a physical source location
/// to the entity that resides at that location, allowing one to map from the
/// source code into the AST.
class CXCursor extends ffi.Struct {
@ffi.Int32()
external int kind;
@ffi.Int32()
external int xdata;
@ffi.Array.multi([3])
external ffi.Array<ffi.Pointer<ffi.Void>> data;
}
/// Describes the kind of type
abstract class CXTypeKind {
/// Represents an invalid type (e.g., where no type is available).
static const int CXType_Invalid = 0;
/// A type whose specific kind is not exposed via this
/// interface.
static const int CXType_Unexposed = 1;
static const int CXType_Void = 2;
static const int CXType_Bool = 3;
static const int CXType_Char_U = 4;
static const int CXType_UChar = 5;
static const int CXType_Char16 = 6;
static const int CXType_Char32 = 7;
static const int CXType_UShort = 8;
static const int CXType_UInt = 9;
static const int CXType_ULong = 10;
static const int CXType_ULongLong = 11;
static const int CXType_UInt128 = 12;
static const int CXType_Char_S = 13;
static const int CXType_SChar = 14;
static const int CXType_WChar = 15;
static const int CXType_Short = 16;
static const int CXType_Int = 17;
static const int CXType_Long = 18;
static const int CXType_LongLong = 19;
static const int CXType_Int128 = 20;
static const int CXType_Float = 21;
static const int CXType_Double = 22;
static const int CXType_LongDouble = 23;
static const int CXType_NullPtr = 24;
static const int CXType_Overload = 25;
static const int CXType_Dependent = 26;
static const int CXType_ObjCId = 27;
static const int CXType_ObjCClass = 28;
static const int CXType_ObjCSel = 29;
static const int CXType_Float128 = 30;
static const int CXType_Half = 31;
static const int CXType_Float16 = 32;
static const int CXType_ShortAccum = 33;
static const int CXType_Accum = 34;
static const int CXType_LongAccum = 35;
static const int CXType_UShortAccum = 36;
static const int CXType_UAccum = 37;
static const int CXType_ULongAccum = 38;
static const int CXType_FirstBuiltin = 2;
static const int CXType_LastBuiltin = 38;
static const int CXType_Complex = 100;
static const int CXType_Pointer = 101;
static const int CXType_BlockPointer = 102;
static const int CXType_LValueReference = 103;
static const int CXType_RValueReference = 104;
static const int CXType_Record = 105;
static const int CXType_Enum = 106;
static const int CXType_Typedef = 107;
static const int CXType_ObjCInterface = 108;
static const int CXType_ObjCObjectPointer = 109;
static const int CXType_FunctionNoProto = 110;
static const int CXType_FunctionProto = 111;
static const int CXType_ConstantArray = 112;
static const int CXType_Vector = 113;
static const int CXType_IncompleteArray = 114;
static const int CXType_VariableArray = 115;
static const int CXType_DependentSizedArray = 116;
static const int CXType_MemberPointer = 117;
static const int CXType_Auto = 118;
/// Represents a type that was referred to using an elaborated type keyword.
///
/// E.g., struct S, or via a qualified name, e.g., N::M::type, or both.
static const int CXType_Elaborated = 119;
static const int CXType_Pipe = 120;
static const int CXType_OCLImage1dRO = 121;
static const int CXType_OCLImage1dArrayRO = 122;
static const int CXType_OCLImage1dBufferRO = 123;
static const int CXType_OCLImage2dRO = 124;
static const int CXType_OCLImage2dArrayRO = 125;
static const int CXType_OCLImage2dDepthRO = 126;
static const int CXType_OCLImage2dArrayDepthRO = 127;
static const int CXType_OCLImage2dMSAARO = 128;
static const int CXType_OCLImage2dArrayMSAARO = 129;
static const int CXType_OCLImage2dMSAADepthRO = 130;
static const int CXType_OCLImage2dArrayMSAADepthRO = 131;
static const int CXType_OCLImage3dRO = 132;
static const int CXType_OCLImage1dWO = 133;
static const int CXType_OCLImage1dArrayWO = 134;
static const int CXType_OCLImage1dBufferWO = 135;
static const int CXType_OCLImage2dWO = 136;
static const int CXType_OCLImage2dArrayWO = 137;
static const int CXType_OCLImage2dDepthWO = 138;
static const int CXType_OCLImage2dArrayDepthWO = 139;
static const int CXType_OCLImage2dMSAAWO = 140;
static const int CXType_OCLImage2dArrayMSAAWO = 141;
static const int CXType_OCLImage2dMSAADepthWO = 142;
static const int CXType_OCLImage2dArrayMSAADepthWO = 143;
static const int CXType_OCLImage3dWO = 144;
static const int CXType_OCLImage1dRW = 145;
static const int CXType_OCLImage1dArrayRW = 146;
static const int CXType_OCLImage1dBufferRW = 147;
static const int CXType_OCLImage2dRW = 148;
static const int CXType_OCLImage2dArrayRW = 149;
static const int CXType_OCLImage2dDepthRW = 150;
static const int CXType_OCLImage2dArrayDepthRW = 151;
static const int CXType_OCLImage2dMSAARW = 152;
static const int CXType_OCLImage2dArrayMSAARW = 153;
static const int CXType_OCLImage2dMSAADepthRW = 154;
static const int CXType_OCLImage2dArrayMSAADepthRW = 155;
static const int CXType_OCLImage3dRW = 156;
static const int CXType_OCLSampler = 157;
static const int CXType_OCLEvent = 158;
static const int CXType_OCLQueue = 159;
static const int CXType_OCLReserveID = 160;
static const int CXType_ObjCObject = 161;
static const int CXType_ObjCTypeParam = 162;
static const int CXType_Attributed = 163;
static const int CXType_OCLIntelSubgroupAVCMcePayload = 164;
static const int CXType_OCLIntelSubgroupAVCImePayload = 165;
static const int CXType_OCLIntelSubgroupAVCRefPayload = 166;
static const int CXType_OCLIntelSubgroupAVCSicPayload = 167;
static const int CXType_OCLIntelSubgroupAVCMceResult = 168;
static const int CXType_OCLIntelSubgroupAVCImeResult = 169;
static const int CXType_OCLIntelSubgroupAVCRefResult = 170;
static const int CXType_OCLIntelSubgroupAVCSicResult = 171;
static const int CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout = 172;
static const int CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout = 173;
static const int CXType_OCLIntelSubgroupAVCImeSingleRefStreamin = 174;
static const int CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175;
static const int CXType_ExtVector = 176;
}
/// The type of an element in the abstract syntax tree.
class CXType extends ffi.Struct {
@ffi.Int32()
external int kind;
@ffi.Array.multi([2])
external ffi.Array<ffi.Pointer<ffi.Void>> data;
}
/// Describes how the traversal of the children of a particular
/// cursor should proceed after visiting a particular child cursor.
///
/// A value of this enumeration type should be returned by each
/// \c CXCursorVisitor to indicate how clang_visitChildren() proceed.
abstract class CXChildVisitResult {
/// Terminates the cursor traversal.
static const int CXChildVisit_Break = 0;
/// Continues the cursor traversal with the next sibling of
/// the cursor just visited, without visiting its children.
static const int CXChildVisit_Continue = 1;
/// Recursively traverse the children of this cursor, using
/// the same visitor and client data.
static const int CXChildVisit_Recurse = 2;
}
abstract class CXEvalResultKind {
static const int CXEval_Int = 1;
static const int CXEval_Float = 2;
static const int CXEval_ObjCStrLiteral = 3;
static const int CXEval_StrLiteral = 4;
static const int CXEval_CFStr = 5;
static const int CXEval_Other = 6;
static const int CXEval_UnExposed = 0;
}
const int CINDEX_VERSION_MAJOR = 0;
const int CINDEX_VERSION_MINOR = 59;
const int CINDEX_VERSION = 59;
const String CINDEX_VERSION_STRING = '0.59';
typedef _c_clang_getCString = ffi.Pointer<ffi.Int8> Function(
CXString string,
);
typedef _dart_clang_getCString = ffi.Pointer<ffi.Int8> Function(
CXString string,
);
typedef _c_clang_disposeString = ffi.Void Function(
CXString string,
);
typedef _dart_clang_disposeString = void Function(
CXString string,
);
typedef _c_clang_createIndex = ffi.Pointer<ffi.Void> Function(
ffi.Int32 excludeDeclarationsFromPCH,
ffi.Int32 displayDiagnostics,
);
typedef _dart_clang_createIndex = ffi.Pointer<ffi.Void> Function(
int excludeDeclarationsFromPCH,
int displayDiagnostics,
);
typedef _c_clang_disposeIndex = ffi.Void Function(
ffi.Pointer<ffi.Void> index,
);
typedef _dart_clang_disposeIndex = void Function(
ffi.Pointer<ffi.Void> index,
);
typedef _c_clang_getFileName = CXString Function(
ffi.Pointer<ffi.Void> SFile,
);
typedef _dart_clang_getFileName = CXString Function(
ffi.Pointer<ffi.Void> SFile,
);
typedef _c_clang_equalRanges = ffi.Uint32 Function(
CXSourceRange range1,
CXSourceRange range2,
);
typedef _dart_clang_equalRanges = int Function(
CXSourceRange range1,
CXSourceRange range2,
);
typedef _c_clang_getFileLocation = ffi.Void Function(
CXSourceLocation location,
ffi.Pointer<ffi.Pointer<ffi.Void>> file,
ffi.Pointer<ffi.Uint32> line,
ffi.Pointer<ffi.Uint32> column,
ffi.Pointer<ffi.Uint32> offset,
);
typedef _dart_clang_getFileLocation = void Function(
CXSourceLocation location,
ffi.Pointer<ffi.Pointer<ffi.Void>> file,
ffi.Pointer<ffi.Uint32> line,
ffi.Pointer<ffi.Uint32> column,
ffi.Pointer<ffi.Uint32> offset,
);
typedef _c_clang_getNumDiagnostics = ffi.Uint32 Function(
ffi.Pointer<CXTranslationUnitImpl> Unit,
);
typedef _dart_clang_getNumDiagnostics = int Function(
ffi.Pointer<CXTranslationUnitImpl> Unit,
);
typedef _c_clang_getDiagnostic = ffi.Pointer<ffi.Void> Function(
ffi.Pointer<CXTranslationUnitImpl> Unit,
ffi.Uint32 Index,
);
typedef _dart_clang_getDiagnostic = ffi.Pointer<ffi.Void> Function(
ffi.Pointer<CXTranslationUnitImpl> Unit,
int Index,
);
typedef _c_clang_disposeDiagnostic = ffi.Void Function(
ffi.Pointer<ffi.Void> Diagnostic,
);
typedef _dart_clang_disposeDiagnostic = void Function(
ffi.Pointer<ffi.Void> Diagnostic,
);
typedef _c_clang_formatDiagnostic = CXString Function(
ffi.Pointer<ffi.Void> Diagnostic,
ffi.Uint32 Options,
);
typedef _dart_clang_formatDiagnostic = CXString Function(
ffi.Pointer<ffi.Void> Diagnostic,
int Options,
);
typedef _c_clang_parseTranslationUnit = ffi.Pointer<CXTranslationUnitImpl>
Function(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> source_filename,
ffi.Pointer<ffi.Pointer<ffi.Int8>> command_line_args,
ffi.Int32 num_command_line_args,
ffi.Pointer<CXUnsavedFile> unsaved_files,
ffi.Uint32 num_unsaved_files,
ffi.Uint32 options,
);
typedef _dart_clang_parseTranslationUnit = ffi.Pointer<CXTranslationUnitImpl>
Function(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> source_filename,
ffi.Pointer<ffi.Pointer<ffi.Int8>> command_line_args,
int num_command_line_args,
ffi.Pointer<CXUnsavedFile> unsaved_files,
int num_unsaved_files,
int options,
);
typedef _c_clang_disposeTranslationUnit = ffi.Void Function(
ffi.Pointer<CXTranslationUnitImpl> arg0,
);
typedef _dart_clang_disposeTranslationUnit = void Function(
ffi.Pointer<CXTranslationUnitImpl> arg0,
);
typedef _c_clang_getTranslationUnitCursor = CXCursor Function(
ffi.Pointer<CXTranslationUnitImpl> arg0,
);
typedef _dart_clang_getTranslationUnitCursor = CXCursor Function(
ffi.Pointer<CXTranslationUnitImpl> arg0,
);
typedef _c_clang_Cursor_isNull = ffi.Int32 Function(
CXCursor cursor,
);
typedef _dart_clang_Cursor_isNull = int Function(
CXCursor cursor,
);
typedef _c_clang_getCursorKind = ffi.Int32 Function(
CXCursor arg0,
);
typedef _dart_clang_getCursorKind = int Function(
CXCursor arg0,
);
typedef _c_clang_Cursor_hasAttrs = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_hasAttrs = int Function(
CXCursor C,
);
typedef _c_clang_getCursorLocation = CXSourceLocation Function(
CXCursor arg0,
);
typedef _dart_clang_getCursorLocation = CXSourceLocation Function(
CXCursor arg0,
);
typedef _c_clang_getCursorType = CXType Function(
CXCursor C,
);
typedef _dart_clang_getCursorType = CXType Function(
CXCursor C,
);
typedef _c_clang_getTypeSpelling = CXString Function(
CXType CT,
);
typedef _dart_clang_getTypeSpelling = CXString Function(
CXType CT,
);
typedef _c_clang_getTypedefDeclUnderlyingType = CXType Function(
CXCursor C,
);
typedef _dart_clang_getTypedefDeclUnderlyingType = CXType Function(
CXCursor C,
);
typedef _c_clang_getEnumConstantDeclValue = ffi.Int64 Function(
CXCursor C,
);
typedef _dart_clang_getEnumConstantDeclValue = int Function(
CXCursor C,
);
typedef _c_clang_getFieldDeclBitWidth = ffi.Int32 Function(
CXCursor C,
);
typedef _dart_clang_getFieldDeclBitWidth = int Function(
CXCursor C,
);
typedef _c_clang_Cursor_getNumArguments = ffi.Int32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_getNumArguments = int Function(
CXCursor C,
);
typedef _c_clang_Cursor_getArgument = CXCursor Function(
CXCursor C,
ffi.Uint32 i,
);
typedef _dart_clang_Cursor_getArgument = CXCursor Function(
CXCursor C,
int i,
);
typedef _c_clang_getCanonicalType = CXType Function(
CXType T,
);
typedef _dart_clang_getCanonicalType = CXType Function(
CXType T,
);
typedef _c_clang_Cursor_isMacroFunctionLike = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_isMacroFunctionLike = int Function(
CXCursor C,
);
typedef _c_clang_Cursor_isMacroBuiltin = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_isMacroBuiltin = int Function(
CXCursor C,
);
typedef _c_clang_Cursor_isFunctionInlined = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_isFunctionInlined = int Function(
CXCursor C,
);
typedef _c_clang_getTypedefName = CXString Function(
CXType CT,
);
typedef _dart_clang_getTypedefName = CXString Function(
CXType CT,
);
typedef _c_clang_getPointeeType = CXType Function(
CXType T,
);
typedef _dart_clang_getPointeeType = CXType Function(
CXType T,
);
typedef _c_clang_getTypeDeclaration = CXCursor Function(
CXType T,
);
typedef _dart_clang_getTypeDeclaration = CXCursor Function(
CXType T,
);
typedef _c_clang_getTypeKindSpelling = CXString Function(
ffi.Int32 K,
);
typedef _dart_clang_getTypeKindSpelling = CXString Function(
int K,
);
typedef _c_clang_getResultType = CXType Function(
CXType T,
);
typedef _dart_clang_getResultType = CXType Function(
CXType T,
);
typedef _c_clang_getNumArgTypes = ffi.Int32 Function(
CXType T,
);
typedef _dart_clang_getNumArgTypes = int Function(
CXType T,
);
typedef _c_clang_getArgType = CXType Function(
CXType T,
ffi.Uint32 i,
);
typedef _dart_clang_getArgType = CXType Function(
CXType T,
int i,
);
typedef _c_clang_getNumElements = ffi.Int64 Function(
CXType T,
);
typedef _dart_clang_getNumElements = int Function(
CXType T,
);
typedef _c_clang_getArrayElementType = CXType Function(
CXType T,
);
typedef _dart_clang_getArrayElementType = CXType Function(
CXType T,
);
typedef _c_clang_Type_getNamedType = CXType Function(
CXType T,
);
typedef _dart_clang_Type_getNamedType = CXType Function(
CXType T,
);
typedef _c_clang_Type_getAlignOf = ffi.Int64 Function(
CXType T,
);
typedef _dart_clang_Type_getAlignOf = int Function(
CXType T,
);
typedef _c_clang_Cursor_isAnonymous = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_isAnonymous = int Function(
CXCursor C,
);
typedef _c_clang_Cursor_isAnonymousRecordDecl = ffi.Uint32 Function(
CXCursor C,
);
typedef _dart_clang_Cursor_isAnonymousRecordDecl = int Function(
CXCursor C,
);
typedef CXCursorVisitor = ffi.Int32 Function(
CXCursor,
CXCursor,
ffi.Pointer<ffi.Void>,
);
typedef _c_clang_visitChildren = ffi.Uint32 Function(
CXCursor parent,
ffi.Pointer<ffi.NativeFunction<CXCursorVisitor>> visitor,
ffi.Pointer<ffi.Void> client_data,
);
typedef _dart_clang_visitChildren = int Function(
CXCursor parent,
ffi.Pointer<ffi.NativeFunction<CXCursorVisitor>> visitor,
ffi.Pointer<ffi.Void> client_data,
);
typedef _c_clang_getCursorUSR = CXString Function(
CXCursor arg0,
);
typedef _dart_clang_getCursorUSR = CXString Function(
CXCursor arg0,
);
typedef _c_clang_getCursorSpelling = CXString Function(
CXCursor arg0,
);
typedef _dart_clang_getCursorSpelling = CXString Function(
CXCursor arg0,
);
typedef _c_clang_getCursorDefinition = CXCursor Function(
CXCursor arg0,
);
typedef _dart_clang_getCursorDefinition = CXCursor Function(
CXCursor arg0,
);
typedef _c_clang_Cursor_getCommentRange = CXSourceRange Function(
CXCursor C,
);
typedef _dart_clang_Cursor_getCommentRange = CXSourceRange Function(
CXCursor C,
);
typedef _c_clang_Cursor_getRawCommentText = CXString Function(
CXCursor C,
);
typedef _dart_clang_Cursor_getRawCommentText = CXString Function(
CXCursor C,
);
typedef _c_clang_Cursor_getBriefCommentText = CXString Function(
CXCursor C,
);
typedef _dart_clang_Cursor_getBriefCommentText = CXString Function(
CXCursor C,
);
typedef _c_clang_getCursorKindSpelling = CXString Function(
ffi.Int32 Kind,
);
typedef _dart_clang_getCursorKindSpelling = CXString Function(
int Kind,
);
typedef _c_clang_Cursor_Evaluate = ffi.Pointer<ffi.Void> Function(
CXCursor C,
);
typedef _dart_clang_Cursor_Evaluate = ffi.Pointer<ffi.Void> Function(
CXCursor C,
);
typedef _c_clang_EvalResult_getKind = ffi.Int32 Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_getKind = int Function(
ffi.Pointer<ffi.Void> E,
);
typedef _c_clang_EvalResult_getAsInt = ffi.Int32 Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_getAsInt = int Function(
ffi.Pointer<ffi.Void> E,
);
typedef _c_clang_EvalResult_getAsLongLong = ffi.Int64 Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_getAsLongLong = int Function(
ffi.Pointer<ffi.Void> E,
);
typedef _c_clang_EvalResult_getAsDouble = ffi.Double Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_getAsDouble = double Function(
ffi.Pointer<ffi.Void> E,
);
typedef _c_clang_EvalResult_getAsStr = ffi.Pointer<ffi.Int8> Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_getAsStr = ffi.Pointer<ffi.Int8> Function(
ffi.Pointer<ffi.Void> E,
);
typedef _c_clang_EvalResult_dispose = ffi.Void Function(
ffi.Pointer<ffi.Void> E,
);
typedef _dart_clang_EvalResult_dispose = void Function(
ffi.Pointer<ffi.Void> E,
);