blob: 71fa196b83740b1254cd28fa4d59c79f63766e67 [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 LibClang {
/// Holds the symbol lookup function.
final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
_lookup;
/// The symbols are looked up in [dynamicLibrary].
LibClang(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup;
/// The symbols are looked up with [lookup].
LibClang.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<Native_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<Native_clang_disposeString>>(
'clang_disposeString');
late final _dart_clang_disposeString _clang_disposeString =
_clang_disposeString_ptr.asFunction<_dart_clang_disposeString>();
/// Free the given string set.
void clang_disposeStringSet(
ffi.Pointer<CXStringSet> set_1,
) {
return _clang_disposeStringSet(
set_1,
);
}
late final _clang_disposeStringSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeStringSet>>(
'clang_disposeStringSet');
late final _dart_clang_disposeStringSet _clang_disposeStringSet =
_clang_disposeStringSet_ptr.asFunction<_dart_clang_disposeStringSet>();
/// 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<Native_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<Native_clang_disposeIndex>>(
'clang_disposeIndex');
late final _dart_clang_disposeIndex _clang_disposeIndex =
_clang_disposeIndex_ptr.asFunction<_dart_clang_disposeIndex>();
/// Sets general options associated with a CXIndex.
///
/// For example:
/// \code
/// CXIndex idx = ...;
/// clang_CXIndex_setGlobalOptions(idx,
/// clang_CXIndex_getGlobalOptions(idx) |
/// CXGlobalOpt_ThreadBackgroundPriorityForIndexing);
/// \endcode
///
/// \param options A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags.
void clang_CXIndex_setGlobalOptions(
ffi.Pointer<ffi.Void> arg0,
int options,
) {
return _clang_CXIndex_setGlobalOptions(
arg0,
options,
);
}
late final _clang_CXIndex_setGlobalOptions_ptr =
_lookup<ffi.NativeFunction<Native_clang_CXIndex_setGlobalOptions>>(
'clang_CXIndex_setGlobalOptions');
late final _dart_clang_CXIndex_setGlobalOptions
_clang_CXIndex_setGlobalOptions = _clang_CXIndex_setGlobalOptions_ptr
.asFunction<_dart_clang_CXIndex_setGlobalOptions>();
/// Gets the general options associated with a CXIndex.
///
/// \returns A bitmask of options, a bitwise OR of CXGlobalOpt_XXX flags that
/// are associated with the given CXIndex object.
int clang_CXIndex_getGlobalOptions(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_CXIndex_getGlobalOptions(
arg0,
);
}
late final _clang_CXIndex_getGlobalOptions_ptr =
_lookup<ffi.NativeFunction<Native_clang_CXIndex_getGlobalOptions>>(
'clang_CXIndex_getGlobalOptions');
late final _dart_clang_CXIndex_getGlobalOptions
_clang_CXIndex_getGlobalOptions = _clang_CXIndex_getGlobalOptions_ptr
.asFunction<_dart_clang_CXIndex_getGlobalOptions>();
/// Sets the invocation emission path option in a CXIndex.
///
/// The invocation emission path specifies a path which will contain log
/// files for certain libclang invocations. A null value (default) implies that
/// libclang invocations are not logged..
void clang_CXIndex_setInvocationEmissionPathOption(
ffi.Pointer<ffi.Void> arg0,
ffi.Pointer<ffi.Int8> Path,
) {
return _clang_CXIndex_setInvocationEmissionPathOption(
arg0,
Path,
);
}
late final _clang_CXIndex_setInvocationEmissionPathOption_ptr = _lookup<
ffi.NativeFunction<
Native_clang_CXIndex_setInvocationEmissionPathOption>>(
'clang_CXIndex_setInvocationEmissionPathOption');
late final _dart_clang_CXIndex_setInvocationEmissionPathOption
_clang_CXIndex_setInvocationEmissionPathOption =
_clang_CXIndex_setInvocationEmissionPathOption_ptr
.asFunction<_dart_clang_CXIndex_setInvocationEmissionPathOption>();
/// 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<Native_clang_getFileName>>(
'clang_getFileName');
late final _dart_clang_getFileName _clang_getFileName =
_clang_getFileName_ptr.asFunction<_dart_clang_getFileName>();
/// Retrieve the last modification time of the given file.
int clang_getFileTime(
ffi.Pointer<ffi.Void> SFile,
) {
return _clang_getFileTime(
SFile,
);
}
late final _clang_getFileTime_ptr =
_lookup<ffi.NativeFunction<Native_clang_getFileTime>>(
'clang_getFileTime');
late final _dart_clang_getFileTime _clang_getFileTime =
_clang_getFileTime_ptr.asFunction<_dart_clang_getFileTime>();
/// Retrieve the unique ID for the given \c file.
///
/// \param file the file to get the ID for.
/// \param outID stores the returned CXFileUniqueID.
/// \returns If there was a failure getting the unique ID, returns non-zero,
/// otherwise returns 0.
int clang_getFileUniqueID(
ffi.Pointer<ffi.Void> file,
ffi.Pointer<CXFileUniqueID> outID,
) {
return _clang_getFileUniqueID(
file,
outID,
);
}
late final _clang_getFileUniqueID_ptr =
_lookup<ffi.NativeFunction<Native_clang_getFileUniqueID>>(
'clang_getFileUniqueID');
late final _dart_clang_getFileUniqueID _clang_getFileUniqueID =
_clang_getFileUniqueID_ptr.asFunction<_dart_clang_getFileUniqueID>();
/// Determine whether the given header is guarded against
/// multiple inclusions, either with the conventional
/// \#ifndef/\#define/\#endif macro guards or with \#pragma once.
int clang_isFileMultipleIncludeGuarded(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Void> file,
) {
return _clang_isFileMultipleIncludeGuarded(
tu,
file,
);
}
late final _clang_isFileMultipleIncludeGuarded_ptr =
_lookup<ffi.NativeFunction<Native_clang_isFileMultipleIncludeGuarded>>(
'clang_isFileMultipleIncludeGuarded');
late final _dart_clang_isFileMultipleIncludeGuarded
_clang_isFileMultipleIncludeGuarded =
_clang_isFileMultipleIncludeGuarded_ptr
.asFunction<_dart_clang_isFileMultipleIncludeGuarded>();
/// Retrieve a file handle within the given translation unit.
///
/// \param tu the translation unit
///
/// \param file_name the name of the file.
///
/// \returns the file handle for the named file in the translation unit \p tu,
/// or a NULL file handle if the file was not a part of this translation unit.
ffi.Pointer<ffi.Void> clang_getFile(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Int8> file_name,
) {
return _clang_getFile(
tu,
file_name,
);
}
late final _clang_getFile_ptr =
_lookup<ffi.NativeFunction<Native_clang_getFile>>('clang_getFile');
late final _dart_clang_getFile _clang_getFile =
_clang_getFile_ptr.asFunction<_dart_clang_getFile>();
/// Retrieve the buffer associated with the given file.
///
/// \param tu the translation unit
///
/// \param file the file for which to retrieve the buffer.
///
/// \param size [out] if non-NULL, will be set to the size of the buffer.
///
/// \returns a pointer to the buffer in memory that holds the contents of
/// \p file, or a NULL pointer when the file is not loaded.
ffi.Pointer<ffi.Int8> clang_getFileContents(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Void> file,
ffi.Pointer<ffi.Uint64> size,
) {
return _clang_getFileContents(
tu,
file,
size,
);
}
late final _clang_getFileContents_ptr =
_lookup<ffi.NativeFunction<Native_clang_getFileContents>>(
'clang_getFileContents');
late final _dart_clang_getFileContents _clang_getFileContents =
_clang_getFileContents_ptr.asFunction<_dart_clang_getFileContents>();
/// Returns non-zero if the \c file1 and \c file2 point to the same file,
/// or they are both NULL.
int clang_File_isEqual(
ffi.Pointer<ffi.Void> file1,
ffi.Pointer<ffi.Void> file2,
) {
return _clang_File_isEqual(
file1,
file2,
);
}
late final _clang_File_isEqual_ptr =
_lookup<ffi.NativeFunction<Native_clang_File_isEqual>>(
'clang_File_isEqual');
late final _dart_clang_File_isEqual _clang_File_isEqual =
_clang_File_isEqual_ptr.asFunction<_dart_clang_File_isEqual>();
/// Returns the real path name of \c file.
///
/// An empty string may be returned. Use \c clang_getFileName() in that case.
CXString clang_File_tryGetRealPathName(
ffi.Pointer<ffi.Void> file,
) {
return _clang_File_tryGetRealPathName(
file,
);
}
late final _clang_File_tryGetRealPathName_ptr =
_lookup<ffi.NativeFunction<Native_clang_File_tryGetRealPathName>>(
'clang_File_tryGetRealPathName');
late final _dart_clang_File_tryGetRealPathName
_clang_File_tryGetRealPathName = _clang_File_tryGetRealPathName_ptr
.asFunction<_dart_clang_File_tryGetRealPathName>();
/// Retrieve a NULL (invalid) source location.
CXSourceLocation clang_getNullLocation() {
return _clang_getNullLocation();
}
late final _clang_getNullLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getNullLocation>>(
'clang_getNullLocation');
late final _dart_clang_getNullLocation _clang_getNullLocation =
_clang_getNullLocation_ptr.asFunction<_dart_clang_getNullLocation>();
/// Determine whether two source locations, which must refer into
/// the same translation unit, refer to exactly the same point in the source
/// code.
///
/// \returns non-zero if the source locations refer to the same location, zero
/// if they refer to different locations.
int clang_equalLocations(
CXSourceLocation loc1,
CXSourceLocation loc2,
) {
return _clang_equalLocations(
loc1,
loc2,
);
}
late final _clang_equalLocations_ptr =
_lookup<ffi.NativeFunction<Native_clang_equalLocations>>(
'clang_equalLocations');
late final _dart_clang_equalLocations _clang_equalLocations =
_clang_equalLocations_ptr.asFunction<_dart_clang_equalLocations>();
/// Retrieves the source location associated with a given file/line/column
/// in a particular translation unit.
CXSourceLocation clang_getLocation(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Void> file,
int line,
int column,
) {
return _clang_getLocation(
tu,
file,
line,
column,
);
}
late final _clang_getLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getLocation>>(
'clang_getLocation');
late final _dart_clang_getLocation _clang_getLocation =
_clang_getLocation_ptr.asFunction<_dart_clang_getLocation>();
/// Retrieves the source location associated with a given character offset
/// in a particular translation unit.
CXSourceLocation clang_getLocationForOffset(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Void> file,
int offset,
) {
return _clang_getLocationForOffset(
tu,
file,
offset,
);
}
late final _clang_getLocationForOffset_ptr =
_lookup<ffi.NativeFunction<Native_clang_getLocationForOffset>>(
'clang_getLocationForOffset');
late final _dart_clang_getLocationForOffset _clang_getLocationForOffset =
_clang_getLocationForOffset_ptr
.asFunction<_dart_clang_getLocationForOffset>();
/// Returns non-zero if the given source location is in a system header.
int clang_Location_isInSystemHeader(
CXSourceLocation location,
) {
return _clang_Location_isInSystemHeader(
location,
);
}
late final _clang_Location_isInSystemHeader_ptr =
_lookup<ffi.NativeFunction<Native_clang_Location_isInSystemHeader>>(
'clang_Location_isInSystemHeader');
late final _dart_clang_Location_isInSystemHeader
_clang_Location_isInSystemHeader = _clang_Location_isInSystemHeader_ptr
.asFunction<_dart_clang_Location_isInSystemHeader>();
/// Returns non-zero if the given source location is in the main file of
/// the corresponding translation unit.
int clang_Location_isFromMainFile(
CXSourceLocation location,
) {
return _clang_Location_isFromMainFile(
location,
);
}
late final _clang_Location_isFromMainFile_ptr =
_lookup<ffi.NativeFunction<Native_clang_Location_isFromMainFile>>(
'clang_Location_isFromMainFile');
late final _dart_clang_Location_isFromMainFile
_clang_Location_isFromMainFile = _clang_Location_isFromMainFile_ptr
.asFunction<_dart_clang_Location_isFromMainFile>();
/// Retrieve a NULL (invalid) source range.
CXSourceRange clang_getNullRange() {
return _clang_getNullRange();
}
late final _clang_getNullRange_ptr =
_lookup<ffi.NativeFunction<Native_clang_getNullRange>>(
'clang_getNullRange');
late final _dart_clang_getNullRange _clang_getNullRange =
_clang_getNullRange_ptr.asFunction<_dart_clang_getNullRange>();
/// Retrieve a source range given the beginning and ending source
/// locations.
CXSourceRange clang_getRange(
CXSourceLocation begin,
CXSourceLocation end,
) {
return _clang_getRange(
begin,
end,
);
}
late final _clang_getRange_ptr =
_lookup<ffi.NativeFunction<Native_clang_getRange>>('clang_getRange');
late final _dart_clang_getRange _clang_getRange =
_clang_getRange_ptr.asFunction<_dart_clang_getRange>();
/// 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<Native_clang_equalRanges>>(
'clang_equalRanges');
late final _dart_clang_equalRanges _clang_equalRanges =
_clang_equalRanges_ptr.asFunction<_dart_clang_equalRanges>();
/// Returns non-zero if \p range is null.
int clang_Range_isNull(
CXSourceRange range,
) {
return _clang_Range_isNull(
range,
);
}
late final _clang_Range_isNull_ptr =
_lookup<ffi.NativeFunction<Native_clang_Range_isNull>>(
'clang_Range_isNull');
late final _dart_clang_Range_isNull _clang_Range_isNull =
_clang_Range_isNull_ptr.asFunction<_dart_clang_Range_isNull>();
/// Retrieve the file, line, column, and offset represented by
/// the given source location.
///
/// If the location refers into a macro expansion, retrieves the
/// location of the macro expansion.
///
/// \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_getExpansionLocation(
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_getExpansionLocation(
location,
file,
line,
column,
offset,
);
}
late final _clang_getExpansionLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getExpansionLocation>>(
'clang_getExpansionLocation');
late final _dart_clang_getExpansionLocation _clang_getExpansionLocation =
_clang_getExpansionLocation_ptr
.asFunction<_dart_clang_getExpansionLocation>();
/// Retrieve the file, line and column represented by the given source
/// location, as specified in a # line directive.
///
/// Example: given the following source code in a file somefile.c
///
/// \code
/// #123 "dummy.c" 1
///
/// static int func(void)
/// {
/// return 0;
/// }
/// \endcode
///
/// the location information returned by this function would be
///
/// File: dummy.c Line: 124 Column: 12
///
/// whereas clang_getExpansionLocation would have returned
///
/// File: somefile.c Line: 3 Column: 12
///
/// \param location the location within a source file that will be decomposed
/// into its parts.
///
/// \param filename [out] if non-NULL, will be set to the filename of the
/// source location. Note that filenames returned will be for "virtual" files,
/// which don't necessarily exist on the machine running clang - e.g. when
/// parsing preprocessed output obtained from a different environment. If
/// a non-NULL value is passed in, remember to dispose of the returned value
/// using \c clang_disposeString() once you've finished with it. For an invalid
/// source location, an empty string is returned.
///
/// \param line [out] if non-NULL, will be set to the line number of the
/// source location. For an invalid source location, zero is returned.
///
/// \param column [out] if non-NULL, will be set to the column number of the
/// source location. For an invalid source location, zero is returned.
void clang_getPresumedLocation(
CXSourceLocation location,
ffi.Pointer<CXString> filename,
ffi.Pointer<ffi.Uint32> line,
ffi.Pointer<ffi.Uint32> column,
) {
return _clang_getPresumedLocation(
location,
filename,
line,
column,
);
}
late final _clang_getPresumedLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getPresumedLocation>>(
'clang_getPresumedLocation');
late final _dart_clang_getPresumedLocation _clang_getPresumedLocation =
_clang_getPresumedLocation_ptr
.asFunction<_dart_clang_getPresumedLocation>();
/// Legacy API to retrieve the file, line, column, and offset represented
/// by the given source location.
///
/// This interface has been replaced by the newer interface
/// #clang_getExpansionLocation(). See that interface's documentation for
/// details.
void clang_getInstantiationLocation(
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_getInstantiationLocation(
location,
file,
line,
column,
offset,
);
}
late final _clang_getInstantiationLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getInstantiationLocation>>(
'clang_getInstantiationLocation');
late final _dart_clang_getInstantiationLocation
_clang_getInstantiationLocation = _clang_getInstantiationLocation_ptr
.asFunction<_dart_clang_getInstantiationLocation>();
/// Retrieve the file, line, column, and offset represented by
/// the given source location.
///
/// If the location refers into a macro instantiation, return where the
/// location was originally spelled in the source file.
///
/// \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_getSpellingLocation(
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_getSpellingLocation(
location,
file,
line,
column,
offset,
);
}
late final _clang_getSpellingLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getSpellingLocation>>(
'clang_getSpellingLocation');
late final _dart_clang_getSpellingLocation _clang_getSpellingLocation =
_clang_getSpellingLocation_ptr
.asFunction<_dart_clang_getSpellingLocation>();
/// 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<Native_clang_getFileLocation>>(
'clang_getFileLocation');
late final _dart_clang_getFileLocation _clang_getFileLocation =
_clang_getFileLocation_ptr.asFunction<_dart_clang_getFileLocation>();
/// Retrieve a source location representing the first character within a
/// source range.
CXSourceLocation clang_getRangeStart(
CXSourceRange range,
) {
return _clang_getRangeStart(
range,
);
}
late final _clang_getRangeStart_ptr =
_lookup<ffi.NativeFunction<Native_clang_getRangeStart>>(
'clang_getRangeStart');
late final _dart_clang_getRangeStart _clang_getRangeStart =
_clang_getRangeStart_ptr.asFunction<_dart_clang_getRangeStart>();
/// Retrieve a source location representing the last character within a
/// source range.
CXSourceLocation clang_getRangeEnd(
CXSourceRange range,
) {
return _clang_getRangeEnd(
range,
);
}
late final _clang_getRangeEnd_ptr =
_lookup<ffi.NativeFunction<Native_clang_getRangeEnd>>(
'clang_getRangeEnd');
late final _dart_clang_getRangeEnd _clang_getRangeEnd =
_clang_getRangeEnd_ptr.asFunction<_dart_clang_getRangeEnd>();
/// Retrieve all ranges that were skipped by the preprocessor.
///
/// The preprocessor will skip lines when they are surrounded by an
/// if/ifdef/ifndef directive whose condition does not evaluate to true.
ffi.Pointer<CXSourceRangeList> clang_getSkippedRanges(
ffi.Pointer<CXTranslationUnitImpl> tu,
ffi.Pointer<ffi.Void> file,
) {
return _clang_getSkippedRanges(
tu,
file,
);
}
late final _clang_getSkippedRanges_ptr =
_lookup<ffi.NativeFunction<Native_clang_getSkippedRanges>>(
'clang_getSkippedRanges');
late final _dart_clang_getSkippedRanges _clang_getSkippedRanges =
_clang_getSkippedRanges_ptr.asFunction<_dart_clang_getSkippedRanges>();
/// Retrieve all ranges from all files that were skipped by the
/// preprocessor.
///
/// The preprocessor will skip lines when they are surrounded by an
/// if/ifdef/ifndef directive whose condition does not evaluate to true.
ffi.Pointer<CXSourceRangeList> clang_getAllSkippedRanges(
ffi.Pointer<CXTranslationUnitImpl> tu,
) {
return _clang_getAllSkippedRanges(
tu,
);
}
late final _clang_getAllSkippedRanges_ptr =
_lookup<ffi.NativeFunction<Native_clang_getAllSkippedRanges>>(
'clang_getAllSkippedRanges');
late final _dart_clang_getAllSkippedRanges _clang_getAllSkippedRanges =
_clang_getAllSkippedRanges_ptr
.asFunction<_dart_clang_getAllSkippedRanges>();
/// Destroy the given \c CXSourceRangeList.
void clang_disposeSourceRangeList(
ffi.Pointer<CXSourceRangeList> ranges,
) {
return _clang_disposeSourceRangeList(
ranges,
);
}
late final _clang_disposeSourceRangeList_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeSourceRangeList>>(
'clang_disposeSourceRangeList');
late final _dart_clang_disposeSourceRangeList _clang_disposeSourceRangeList =
_clang_disposeSourceRangeList_ptr
.asFunction<_dart_clang_disposeSourceRangeList>();
/// Determine the number of diagnostics in a CXDiagnosticSet.
int clang_getNumDiagnosticsInSet(
ffi.Pointer<ffi.Void> Diags,
) {
return _clang_getNumDiagnosticsInSet(
Diags,
);
}
late final _clang_getNumDiagnosticsInSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_getNumDiagnosticsInSet>>(
'clang_getNumDiagnosticsInSet');
late final _dart_clang_getNumDiagnosticsInSet _clang_getNumDiagnosticsInSet =
_clang_getNumDiagnosticsInSet_ptr
.asFunction<_dart_clang_getNumDiagnosticsInSet>();
/// Retrieve a diagnostic associated with the given CXDiagnosticSet.
///
/// \param Diags the CXDiagnosticSet 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_getDiagnosticInSet(
ffi.Pointer<ffi.Void> Diags,
int Index,
) {
return _clang_getDiagnosticInSet(
Diags,
Index,
);
}
late final _clang_getDiagnosticInSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticInSet>>(
'clang_getDiagnosticInSet');
late final _dart_clang_getDiagnosticInSet _clang_getDiagnosticInSet =
_clang_getDiagnosticInSet_ptr
.asFunction<_dart_clang_getDiagnosticInSet>();
/// Deserialize a set of diagnostics from a Clang diagnostics bitcode
/// file.
///
/// \param file The name of the file to deserialize.
/// \param error A pointer to a enum value recording if there was a problem
/// deserializing the diagnostics.
/// \param errorString A pointer to a CXString for recording the error string
/// if the file was not successfully loaded.
///
/// \returns A loaded CXDiagnosticSet if successful, and NULL otherwise. These
/// diagnostics should be released using clang_disposeDiagnosticSet().
ffi.Pointer<ffi.Void> clang_loadDiagnostics(
ffi.Pointer<ffi.Int8> file,
ffi.Pointer<ffi.Int32> error,
ffi.Pointer<CXString> errorString,
) {
return _clang_loadDiagnostics(
file,
error,
errorString,
);
}
late final _clang_loadDiagnostics_ptr =
_lookup<ffi.NativeFunction<Native_clang_loadDiagnostics>>(
'clang_loadDiagnostics');
late final _dart_clang_loadDiagnostics _clang_loadDiagnostics =
_clang_loadDiagnostics_ptr.asFunction<_dart_clang_loadDiagnostics>();
/// Release a CXDiagnosticSet and all of its contained diagnostics.
void clang_disposeDiagnosticSet(
ffi.Pointer<ffi.Void> Diags,
) {
return _clang_disposeDiagnosticSet(
Diags,
);
}
late final _clang_disposeDiagnosticSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeDiagnosticSet>>(
'clang_disposeDiagnosticSet');
late final _dart_clang_disposeDiagnosticSet _clang_disposeDiagnosticSet =
_clang_disposeDiagnosticSet_ptr
.asFunction<_dart_clang_disposeDiagnosticSet>();
/// Retrieve the child diagnostics of a CXDiagnostic.
///
/// This CXDiagnosticSet does not need to be released by
/// clang_disposeDiagnosticSet.
ffi.Pointer<ffi.Void> clang_getChildDiagnostics(
ffi.Pointer<ffi.Void> D,
) {
return _clang_getChildDiagnostics(
D,
);
}
late final _clang_getChildDiagnostics_ptr =
_lookup<ffi.NativeFunction<Native_clang_getChildDiagnostics>>(
'clang_getChildDiagnostics');
late final _dart_clang_getChildDiagnostics _clang_getChildDiagnostics =
_clang_getChildDiagnostics_ptr
.asFunction<_dart_clang_getChildDiagnostics>();
/// 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<Native_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<Native_clang_getDiagnostic>>(
'clang_getDiagnostic');
late final _dart_clang_getDiagnostic _clang_getDiagnostic =
_clang_getDiagnostic_ptr.asFunction<_dart_clang_getDiagnostic>();
/// Retrieve the complete set of diagnostics associated with a
/// translation unit.
///
/// \param Unit the translation unit to query.
ffi.Pointer<ffi.Void> clang_getDiagnosticSetFromTU(
ffi.Pointer<CXTranslationUnitImpl> Unit,
) {
return _clang_getDiagnosticSetFromTU(
Unit,
);
}
late final _clang_getDiagnosticSetFromTU_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticSetFromTU>>(
'clang_getDiagnosticSetFromTU');
late final _dart_clang_getDiagnosticSetFromTU _clang_getDiagnosticSetFromTU =
_clang_getDiagnosticSetFromTU_ptr
.asFunction<_dart_clang_getDiagnosticSetFromTU>();
/// Destroy a diagnostic.
void clang_disposeDiagnostic(
ffi.Pointer<ffi.Void> Diagnostic,
) {
return _clang_disposeDiagnostic(
Diagnostic,
);
}
late final _clang_disposeDiagnostic_ptr =
_lookup<ffi.NativeFunction<Native_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<Native_clang_formatDiagnostic>>(
'clang_formatDiagnostic');
late final _dart_clang_formatDiagnostic _clang_formatDiagnostic =
_clang_formatDiagnostic_ptr.asFunction<_dart_clang_formatDiagnostic>();
/// Retrieve the set of display options most similar to the
/// default behavior of the clang compiler.
///
/// \returns A set of display options suitable for use with \c
/// clang_formatDiagnostic().
int clang_defaultDiagnosticDisplayOptions() {
return _clang_defaultDiagnosticDisplayOptions();
}
late final _clang_defaultDiagnosticDisplayOptions_ptr =
_lookup<ffi.NativeFunction<Native_clang_defaultDiagnosticDisplayOptions>>(
'clang_defaultDiagnosticDisplayOptions');
late final _dart_clang_defaultDiagnosticDisplayOptions
_clang_defaultDiagnosticDisplayOptions =
_clang_defaultDiagnosticDisplayOptions_ptr
.asFunction<_dart_clang_defaultDiagnosticDisplayOptions>();
/// Determine the severity of the given diagnostic.
int clang_getDiagnosticSeverity(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticSeverity(
arg0,
);
}
late final _clang_getDiagnosticSeverity_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticSeverity>>(
'clang_getDiagnosticSeverity');
late final _dart_clang_getDiagnosticSeverity _clang_getDiagnosticSeverity =
_clang_getDiagnosticSeverity_ptr
.asFunction<_dart_clang_getDiagnosticSeverity>();
/// Retrieve the source location of the given diagnostic.
///
/// This location is where Clang would print the caret ('^') when
/// displaying the diagnostic on the command line.
CXSourceLocation clang_getDiagnosticLocation(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticLocation(
arg0,
);
}
late final _clang_getDiagnosticLocation_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticLocation>>(
'clang_getDiagnosticLocation');
late final _dart_clang_getDiagnosticLocation _clang_getDiagnosticLocation =
_clang_getDiagnosticLocation_ptr
.asFunction<_dart_clang_getDiagnosticLocation>();
/// Retrieve the text of the given diagnostic.
CXString clang_getDiagnosticSpelling(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticSpelling(
arg0,
);
}
late final _clang_getDiagnosticSpelling_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticSpelling>>(
'clang_getDiagnosticSpelling');
late final _dart_clang_getDiagnosticSpelling _clang_getDiagnosticSpelling =
_clang_getDiagnosticSpelling_ptr
.asFunction<_dart_clang_getDiagnosticSpelling>();
/// Retrieve the name of the command-line option that enabled this
/// diagnostic.
///
/// \param Diag The diagnostic to be queried.
///
/// \param Disable If non-NULL, will be set to the option that disables this
/// diagnostic (if any).
///
/// \returns A string that contains the command-line option used to enable this
/// warning, such as "-Wconversion" or "-pedantic".
CXString clang_getDiagnosticOption(
ffi.Pointer<ffi.Void> Diag,
ffi.Pointer<CXString> Disable,
) {
return _clang_getDiagnosticOption(
Diag,
Disable,
);
}
late final _clang_getDiagnosticOption_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticOption>>(
'clang_getDiagnosticOption');
late final _dart_clang_getDiagnosticOption _clang_getDiagnosticOption =
_clang_getDiagnosticOption_ptr
.asFunction<_dart_clang_getDiagnosticOption>();
/// Retrieve the category number for this diagnostic.
///
/// Diagnostics can be categorized into groups along with other, related
/// diagnostics (e.g., diagnostics under the same warning flag). This routine
/// retrieves the category number for the given diagnostic.
///
/// \returns The number of the category that contains this diagnostic, or zero
/// if this diagnostic is uncategorized.
int clang_getDiagnosticCategory(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticCategory(
arg0,
);
}
late final _clang_getDiagnosticCategory_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticCategory>>(
'clang_getDiagnosticCategory');
late final _dart_clang_getDiagnosticCategory _clang_getDiagnosticCategory =
_clang_getDiagnosticCategory_ptr
.asFunction<_dart_clang_getDiagnosticCategory>();
/// Retrieve the name of a particular diagnostic category. This
/// is now deprecated. Use clang_getDiagnosticCategoryText()
/// instead.
///
/// \param Category A diagnostic category number, as returned by
/// \c clang_getDiagnosticCategory().
///
/// \returns The name of the given diagnostic category.
CXString clang_getDiagnosticCategoryName(
int Category,
) {
return _clang_getDiagnosticCategoryName(
Category,
);
}
late final _clang_getDiagnosticCategoryName_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticCategoryName>>(
'clang_getDiagnosticCategoryName');
late final _dart_clang_getDiagnosticCategoryName
_clang_getDiagnosticCategoryName = _clang_getDiagnosticCategoryName_ptr
.asFunction<_dart_clang_getDiagnosticCategoryName>();
/// Retrieve the diagnostic category text for a given diagnostic.
///
/// \returns The text of the given diagnostic category.
CXString clang_getDiagnosticCategoryText(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticCategoryText(
arg0,
);
}
late final _clang_getDiagnosticCategoryText_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticCategoryText>>(
'clang_getDiagnosticCategoryText');
late final _dart_clang_getDiagnosticCategoryText
_clang_getDiagnosticCategoryText = _clang_getDiagnosticCategoryText_ptr
.asFunction<_dart_clang_getDiagnosticCategoryText>();
/// Determine the number of source ranges associated with the given
/// diagnostic.
int clang_getDiagnosticNumRanges(
ffi.Pointer<ffi.Void> arg0,
) {
return _clang_getDiagnosticNumRanges(
arg0,
);
}
late final _clang_getDiagnosticNumRanges_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticNumRanges>>(
'clang_getDiagnosticNumRanges');
late final _dart_clang_getDiagnosticNumRanges _clang_getDiagnosticNumRanges =
_clang_getDiagnosticNumRanges_ptr
.asFunction<_dart_clang_getDiagnosticNumRanges>();
/// Retrieve a source range associated with the diagnostic.
///
/// A diagnostic's source ranges highlight important elements in the source
/// code. On the command line, Clang displays source ranges by
/// underlining them with '~' characters.
///
/// \param Diagnostic the diagnostic whose range is being extracted.
///
/// \param Range the zero-based index specifying which range to
///
/// \returns the requested source range.
CXSourceRange clang_getDiagnosticRange(
ffi.Pointer<ffi.Void> Diagnostic,
int Range,
) {
return _clang_getDiagnosticRange(
Diagnostic,
Range,
);
}
late final _clang_getDiagnosticRange_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticRange>>(
'clang_getDiagnosticRange');
late final _dart_clang_getDiagnosticRange _clang_getDiagnosticRange =
_clang_getDiagnosticRange_ptr
.asFunction<_dart_clang_getDiagnosticRange>();
/// Determine the number of fix-it hints associated with the
/// given diagnostic.
int clang_getDiagnosticNumFixIts(
ffi.Pointer<ffi.Void> Diagnostic,
) {
return _clang_getDiagnosticNumFixIts(
Diagnostic,
);
}
late final _clang_getDiagnosticNumFixIts_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticNumFixIts>>(
'clang_getDiagnosticNumFixIts');
late final _dart_clang_getDiagnosticNumFixIts _clang_getDiagnosticNumFixIts =
_clang_getDiagnosticNumFixIts_ptr
.asFunction<_dart_clang_getDiagnosticNumFixIts>();
/// Retrieve the replacement information for a given fix-it.
///
/// Fix-its are described in terms of a source range whose contents
/// should be replaced by a string. This approach generalizes over
/// three kinds of operations: removal of source code (the range covers
/// the code to be removed and the replacement string is empty),
/// replacement of source code (the range covers the code to be
/// replaced and the replacement string provides the new code), and
/// insertion (both the start and end of the range point at the
/// insertion location, and the replacement string provides the text to
/// insert).
///
/// \param Diagnostic The diagnostic whose fix-its are being queried.
///
/// \param FixIt The zero-based index of the fix-it.
///
/// \param ReplacementRange The source range whose contents will be
/// replaced with the returned replacement string. Note that source
/// ranges are half-open ranges [a, b), so the source code should be
/// replaced from a and up to (but not including) b.
///
/// \returns A string containing text that should be replace the source
/// code indicated by the \c ReplacementRange.
CXString clang_getDiagnosticFixIt(
ffi.Pointer<ffi.Void> Diagnostic,
int FixIt,
ffi.Pointer<CXSourceRange> ReplacementRange,
) {
return _clang_getDiagnosticFixIt(
Diagnostic,
FixIt,
ReplacementRange,
);
}
late final _clang_getDiagnosticFixIt_ptr =
_lookup<ffi.NativeFunction<Native_clang_getDiagnosticFixIt>>(
'clang_getDiagnosticFixIt');
late final _dart_clang_getDiagnosticFixIt _clang_getDiagnosticFixIt =
_clang_getDiagnosticFixIt_ptr
.asFunction<_dart_clang_getDiagnosticFixIt>();
/// Get the original translation unit source file name.
CXString clang_getTranslationUnitSpelling(
ffi.Pointer<CXTranslationUnitImpl> CTUnit,
) {
return _clang_getTranslationUnitSpelling(
CTUnit,
);
}
late final _clang_getTranslationUnitSpelling_ptr =
_lookup<ffi.NativeFunction<Native_clang_getTranslationUnitSpelling>>(
'clang_getTranslationUnitSpelling');
late final _dart_clang_getTranslationUnitSpelling
_clang_getTranslationUnitSpelling = _clang_getTranslationUnitSpelling_ptr
.asFunction<_dart_clang_getTranslationUnitSpelling>();
/// Return the CXTranslationUnit for a given source file and the provided
/// command line arguments one would pass to the compiler.
///
/// Note: The 'source_filename' argument is optional. If the caller provides a
/// NULL pointer, the name of the source file is expected to reside in the
/// specified command line arguments.
///
/// Note: When encountered in 'clang_command_line_args', the following options
/// are ignored:
///
/// '-c'
/// '-emit-ast'
/// '-fsyntax-only'
/// '-o \<output file>' (both '-o' and '\<output file>' are ignored)
///
/// \param CIdx The index object with which the translation unit will be
/// associated.
///
/// \param source_filename The name of the source file to load, or NULL if the
/// source file is included in \p clang_command_line_args.
///
/// \param num_clang_command_line_args The number of command-line arguments in
/// \p clang_command_line_args.
///
/// \param clang_command_line_args The command-line arguments that would be
/// passed to the \c clang executable if it were being invoked out-of-process.
/// These command-line options will be parsed and will affect how the translation
/// unit is parsed. Note that the following options are ignored: '-c',
/// '-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.
///
/// \param num_unsaved_files the number of unsaved file entries in \p
/// unsaved_files.
///
/// \param unsaved_files the files that have not yet been saved to disk
/// but may be required for code completion, including the contents of
/// those files. The contents and name of these files (as specified by
/// CXUnsavedFile) are copied when necessary, so the client only needs to
/// guarantee their validity until the call to this function returns.
ffi.Pointer<CXTranslationUnitImpl> clang_createTranslationUnitFromSourceFile(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> source_filename,
int num_clang_command_line_args,
ffi.Pointer<ffi.Pointer<ffi.Int8>> clang_command_line_args,
int num_unsaved_files,
ffi.Pointer<CXUnsavedFile> unsaved_files,
) {
return _clang_createTranslationUnitFromSourceFile(
CIdx,
source_filename,
num_clang_command_line_args,
clang_command_line_args,
num_unsaved_files,
unsaved_files,
);
}
late final _clang_createTranslationUnitFromSourceFile_ptr = _lookup<
ffi.NativeFunction<Native_clang_createTranslationUnitFromSourceFile>>(
'clang_createTranslationUnitFromSourceFile');
late final _dart_clang_createTranslationUnitFromSourceFile
_clang_createTranslationUnitFromSourceFile =
_clang_createTranslationUnitFromSourceFile_ptr
.asFunction<_dart_clang_createTranslationUnitFromSourceFile>();
/// Same as \c clang_createTranslationUnit2, but returns
/// the \c CXTranslationUnit instead of an error code. In case of an error this
/// routine returns a \c NULL \c CXTranslationUnit, without further detailed
/// error codes.
ffi.Pointer<CXTranslationUnitImpl> clang_createTranslationUnit(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> ast_filename,
) {
return _clang_createTranslationUnit(
CIdx,
ast_filename,
);
}
late final _clang_createTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_createTranslationUnit>>(
'clang_createTranslationUnit');
late final _dart_clang_createTranslationUnit _clang_createTranslationUnit =
_clang_createTranslationUnit_ptr
.asFunction<_dart_clang_createTranslationUnit>();
/// Create a translation unit from an AST file (\c -emit-ast).
///
/// \param[out] out_TU A non-NULL pointer to store the created
/// \c CXTranslationUnit.
///
/// \returns Zero on success, otherwise returns an error code.
int clang_createTranslationUnit2(
ffi.Pointer<ffi.Void> CIdx,
ffi.Pointer<ffi.Int8> ast_filename,
ffi.Pointer<ffi.Pointer<CXTranslationUnitImpl>> out_TU,
) {
return _clang_createTranslationUnit2(
CIdx,
ast_filename,
out_TU,
);
}
late final _clang_createTranslationUnit2_ptr =
_lookup<ffi.NativeFunction<Native_clang_createTranslationUnit2>>(
'clang_createTranslationUnit2');
late final _dart_clang_createTranslationUnit2 _clang_createTranslationUnit2 =
_clang_createTranslationUnit2_ptr
.asFunction<_dart_clang_createTranslationUnit2>();
/// Returns the set of flags that is suitable for parsing a translation
/// unit that is being edited.
///
/// The set of flags returned provide options for \c clang_parseTranslationUnit()
/// to indicate that the translation unit is likely to be reparsed many times,
/// either explicitly (via \c clang_reparseTranslationUnit()) or implicitly
/// (e.g., by code completion (\c clang_codeCompletionAt())). The returned flag
/// set contains an unspecified set of optimizations (e.g., the precompiled
/// preamble) geared toward improving the performance of these routines. The
/// set of optimizations enabled may change from one version to the next.
int clang_defaultEditingTranslationUnitOptions() {
return _clang_defaultEditingTranslationUnitOptions();
}
late final _clang_defaultEditingTranslationUnitOptions_ptr = _lookup<
ffi.NativeFunction<
Native_clang_defaultEditingTranslationUnitOptions>>(
'clang_defaultEditingTranslationUnitOptions');
late final _dart_clang_defaultEditingTranslationUnitOptions
_clang_defaultEditingTranslationUnitOptions =
_clang_defaultEditingTranslationUnitOptions_ptr
.asFunction<_dart_clang_defaultEditingTranslationUnitOptions>();
/// 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<Native_clang_parseTranslationUnit>>(
'clang_parseTranslationUnit');
late final _dart_clang_parseTranslationUnit _clang_parseTranslationUnit =
_clang_parseTranslationUnit_ptr
.asFunction<_dart_clang_parseTranslationUnit>();
/// Parse the given source file and the translation unit corresponding
/// to that file.
///
/// This routine is the main entry point for the Clang C API, providing the
/// ability to parse a source file into a translation unit that can then be
/// queried by other functions in the API. This routine accepts a set of
/// command-line arguments so that the compilation can be configured in the same
/// way that the compiler is configured on the command line.
///
/// \param CIdx The index object with which the translation unit will be
/// associated.
///
/// \param source_filename The name of the source file to load, or NULL if the
/// source file is included in \c command_line_args.
///
/// \param command_line_args The command-line arguments that would be
/// passed to the \c clang executable if it were being invoked out-of-process.
/// These command-line options will be parsed and will affect how the translation
/// unit is parsed. Note that the following options are ignored: '-c',
/// '-emit-ast', '-fsyntax-only' (which is the default), and '-o \<output file>'.
///
/// \param num_command_line_args The number of command-line arguments in
/// \c command_line_args.
///
/// \param unsaved_files the files that have not yet been saved to disk
/// but may be required for parsing, including the contents of
/// those files. The contents and name of these files (as specified by
/// CXUnsavedFile) are copied when necessary, so the client only needs to
/// guarantee their validity until the call to this function returns.
///
/// \param num_unsaved_files the number of unsaved file entries in \p
/// unsaved_files.
///
/// \param options A bitmask of options that affects how the translation unit
/// is managed but not its compilation. This should be a bitwise OR of the
/// CXTranslationUnit_XXX flags.
///
/// \param[out] out_TU A non-NULL pointer to store the created
/// \c CXTranslationUnit, describing the parsed code and containing any
/// diagnostics produced by the compiler.
///
/// \returns Zero on success, otherwise returns an error code.
int clang_parseTranslationUnit2(
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,
ffi.Pointer<ffi.Pointer<CXTranslationUnitImpl>> out_TU,
) {
return _clang_parseTranslationUnit2(
CIdx,
source_filename,
command_line_args,
num_command_line_args,
unsaved_files,
num_unsaved_files,
options,
out_TU,
);
}
late final _clang_parseTranslationUnit2_ptr =
_lookup<ffi.NativeFunction<Native_clang_parseTranslationUnit2>>(
'clang_parseTranslationUnit2');
late final _dart_clang_parseTranslationUnit2 _clang_parseTranslationUnit2 =
_clang_parseTranslationUnit2_ptr
.asFunction<_dart_clang_parseTranslationUnit2>();
/// Same as clang_parseTranslationUnit2 but requires a full command line
/// for \c command_line_args including argv[0]. This is useful if the standard
/// library paths are relative to the binary.
int clang_parseTranslationUnit2FullArgv(
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,
ffi.Pointer<ffi.Pointer<CXTranslationUnitImpl>> out_TU,
) {
return _clang_parseTranslationUnit2FullArgv(
CIdx,
source_filename,
command_line_args,
num_command_line_args,
unsaved_files,
num_unsaved_files,
options,
out_TU,
);
}
late final _clang_parseTranslationUnit2FullArgv_ptr =
_lookup<ffi.NativeFunction<Native_clang_parseTranslationUnit2FullArgv>>(
'clang_parseTranslationUnit2FullArgv');
late final _dart_clang_parseTranslationUnit2FullArgv
_clang_parseTranslationUnit2FullArgv =
_clang_parseTranslationUnit2FullArgv_ptr
.asFunction<_dart_clang_parseTranslationUnit2FullArgv>();
/// Returns the set of flags that is suitable for saving a translation
/// unit.
///
/// The set of flags returned provide options for
/// \c clang_saveTranslationUnit() by default. The returned flag
/// set contains an unspecified set of options that save translation units with
/// the most commonly-requested data.
int clang_defaultSaveOptions(
ffi.Pointer<CXTranslationUnitImpl> TU,
) {
return _clang_defaultSaveOptions(
TU,
);
}
late final _clang_defaultSaveOptions_ptr =
_lookup<ffi.NativeFunction<Native_clang_defaultSaveOptions>>(
'clang_defaultSaveOptions');
late final _dart_clang_defaultSaveOptions _clang_defaultSaveOptions =
_clang_defaultSaveOptions_ptr
.asFunction<_dart_clang_defaultSaveOptions>();
/// Saves a translation unit into a serialized representation of
/// that translation unit on disk.
///
/// Any translation unit that was parsed without error can be saved
/// into a file. The translation unit can then be deserialized into a
/// new \c CXTranslationUnit with \c clang_createTranslationUnit() or,
/// if it is an incomplete translation unit that corresponds to a
/// header, used as a precompiled header when parsing other translation
/// units.
///
/// \param TU The translation unit to save.
///
/// \param FileName The file to which the translation unit will be saved.
///
/// \param options A bitmask of options that affects how the translation unit
/// is saved. This should be a bitwise OR of the
/// CXSaveTranslationUnit_XXX flags.
///
/// \returns A value that will match one of the enumerators of the CXSaveError
/// enumeration. Zero (CXSaveError_None) indicates that the translation unit was
/// saved successfully, while a non-zero value indicates that a problem occurred.
int clang_saveTranslationUnit(
ffi.Pointer<CXTranslationUnitImpl> TU,
ffi.Pointer<ffi.Int8> FileName,
int options,
) {
return _clang_saveTranslationUnit(
TU,
FileName,
options,
);
}
late final _clang_saveTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_saveTranslationUnit>>(
'clang_saveTranslationUnit');
late final _dart_clang_saveTranslationUnit _clang_saveTranslationUnit =
_clang_saveTranslationUnit_ptr
.asFunction<_dart_clang_saveTranslationUnit>();
/// Suspend a translation unit in order to free memory associated with it.
///
/// A suspended translation unit uses significantly less memory but on the other
/// side does not support any other calls than \c clang_reparseTranslationUnit
/// to resume it or \c clang_disposeTranslationUnit to dispose it completely.
int clang_suspendTranslationUnit(
ffi.Pointer<CXTranslationUnitImpl> arg0,
) {
return _clang_suspendTranslationUnit(
arg0,
);
}
late final _clang_suspendTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_suspendTranslationUnit>>(
'clang_suspendTranslationUnit');
late final _dart_clang_suspendTranslationUnit _clang_suspendTranslationUnit =
_clang_suspendTranslationUnit_ptr
.asFunction<_dart_clang_suspendTranslationUnit>();
/// Destroy the specified CXTranslationUnit object.
void clang_disposeTranslationUnit(
ffi.Pointer<CXTranslationUnitImpl> arg0,
) {
return _clang_disposeTranslationUnit(
arg0,
);
}
late final _clang_disposeTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeTranslationUnit>>(
'clang_disposeTranslationUnit');
late final _dart_clang_disposeTranslationUnit _clang_disposeTranslationUnit =
_clang_disposeTranslationUnit_ptr
.asFunction<_dart_clang_disposeTranslationUnit>();
/// Returns the set of flags that is suitable for reparsing a translation
/// unit.
///
/// The set of flags returned provide options for
/// \c clang_reparseTranslationUnit() by default. The returned flag
/// set contains an unspecified set of optimizations geared toward common uses
/// of reparsing. The set of optimizations enabled may change from one version
/// to the next.
int clang_defaultReparseOptions(
ffi.Pointer<CXTranslationUnitImpl> TU,
) {
return _clang_defaultReparseOptions(
TU,
);
}
late final _clang_defaultReparseOptions_ptr =
_lookup<ffi.NativeFunction<Native_clang_defaultReparseOptions>>(
'clang_defaultReparseOptions');
late final _dart_clang_defaultReparseOptions _clang_defaultReparseOptions =
_clang_defaultReparseOptions_ptr
.asFunction<_dart_clang_defaultReparseOptions>();
/// Reparse the source files that produced this translation unit.
///
/// This routine can be used to re-parse the source files that originally
/// created the given translation unit, for example because those source files
/// have changed (either on disk or as passed via \p unsaved_files). The
/// source code will be reparsed with the same command-line options as it
/// was originally parsed.
///
/// Reparsing a translation unit invalidates all cursors and source locations
/// that refer into that translation unit. This makes reparsing a translation
/// unit semantically equivalent to destroying the translation unit and then
/// creating a new translation unit with the same command-line arguments.
/// However, it may be more efficient to reparse a translation
/// unit using this routine.
///
/// \param TU The translation unit whose contents will be re-parsed. The
/// translation unit must originally have been built with
/// \c clang_createTranslationUnitFromSourceFile().
///
/// \param num_unsaved_files The number of unsaved file entries in \p
/// unsaved_files.
///
/// \param unsaved_files The files that have not yet been saved to disk
/// but may be required for parsing, including the contents of
/// those files. The contents and name of these files (as specified by
/// CXUnsavedFile) are copied when necessary, so the client only needs to
/// guarantee their validity until the call to this function returns.
///
/// \param options A bitset of options composed of the flags in CXReparse_Flags.
/// The function \c clang_defaultReparseOptions() produces a default set of
/// options recommended for most uses, based on the translation unit.
///
/// \returns 0 if the sources could be reparsed. A non-zero error code will be
/// returned if reparsing was impossible, such that the translation unit is
/// invalid. In such cases, the only valid call for \c TU is
/// \c clang_disposeTranslationUnit(TU). The error codes returned by this
/// routine are described by the \c CXErrorCode enum.
int clang_reparseTranslationUnit(
ffi.Pointer<CXTranslationUnitImpl> TU,
int num_unsaved_files,
ffi.Pointer<CXUnsavedFile> unsaved_files,
int options,
) {
return _clang_reparseTranslationUnit(
TU,
num_unsaved_files,
unsaved_files,
options,
);
}
late final _clang_reparseTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_reparseTranslationUnit>>(
'clang_reparseTranslationUnit');
late final _dart_clang_reparseTranslationUnit _clang_reparseTranslationUnit =
_clang_reparseTranslationUnit_ptr
.asFunction<_dart_clang_reparseTranslationUnit>();
/// Returns the human-readable null-terminated C string that represents
/// the name of the memory category. This string should never be freed.
ffi.Pointer<ffi.Int8> clang_getTUResourceUsageName(
int kind,
) {
return _clang_getTUResourceUsageName(
kind,
);
}
late final _clang_getTUResourceUsageName_ptr =
_lookup<ffi.NativeFunction<Native_clang_getTUResourceUsageName>>(
'clang_getTUResourceUsageName');
late final _dart_clang_getTUResourceUsageName _clang_getTUResourceUsageName =
_clang_getTUResourceUsageName_ptr
.asFunction<_dart_clang_getTUResourceUsageName>();
/// Return the memory usage of a translation unit. This object
/// should be released with clang_disposeCXTUResourceUsage().
CXTUResourceUsage clang_getCXTUResourceUsage(
ffi.Pointer<CXTranslationUnitImpl> TU,
) {
return _clang_getCXTUResourceUsage(
TU,
);
}
late final _clang_getCXTUResourceUsage_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCXTUResourceUsage>>(
'clang_getCXTUResourceUsage');
late final _dart_clang_getCXTUResourceUsage _clang_getCXTUResourceUsage =
_clang_getCXTUResourceUsage_ptr
.asFunction<_dart_clang_getCXTUResourceUsage>();
void clang_disposeCXTUResourceUsage(
CXTUResourceUsage usage,
) {
return _clang_disposeCXTUResourceUsage(
usage,
);
}
late final _clang_disposeCXTUResourceUsage_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeCXTUResourceUsage>>(
'clang_disposeCXTUResourceUsage');
late final _dart_clang_disposeCXTUResourceUsage
_clang_disposeCXTUResourceUsage = _clang_disposeCXTUResourceUsage_ptr
.asFunction<_dart_clang_disposeCXTUResourceUsage>();
/// Get target information for this translation unit.
///
/// The CXTargetInfo object cannot outlive the CXTranslationUnit object.
ffi.Pointer<CXTargetInfoImpl> clang_getTranslationUnitTargetInfo(
ffi.Pointer<CXTranslationUnitImpl> CTUnit,
) {
return _clang_getTranslationUnitTargetInfo(
CTUnit,
);
}
late final _clang_getTranslationUnitTargetInfo_ptr =
_lookup<ffi.NativeFunction<Native_clang_getTranslationUnitTargetInfo>>(
'clang_getTranslationUnitTargetInfo');
late final _dart_clang_getTranslationUnitTargetInfo
_clang_getTranslationUnitTargetInfo =
_clang_getTranslationUnitTargetInfo_ptr
.asFunction<_dart_clang_getTranslationUnitTargetInfo>();
/// Destroy the CXTargetInfo object.
void clang_TargetInfo_dispose(
ffi.Pointer<CXTargetInfoImpl> Info,
) {
return _clang_TargetInfo_dispose(
Info,
);
}
late final _clang_TargetInfo_dispose_ptr =
_lookup<ffi.NativeFunction<Native_clang_TargetInfo_dispose>>(
'clang_TargetInfo_dispose');
late final _dart_clang_TargetInfo_dispose _clang_TargetInfo_dispose =
_clang_TargetInfo_dispose_ptr
.asFunction<_dart_clang_TargetInfo_dispose>();
/// Get the normalized target triple as a string.
///
/// Returns the empty string in case of any error.
CXString clang_TargetInfo_getTriple(
ffi.Pointer<CXTargetInfoImpl> Info,
) {
return _clang_TargetInfo_getTriple(
Info,
);
}
late final _clang_TargetInfo_getTriple_ptr =
_lookup<ffi.NativeFunction<Native_clang_TargetInfo_getTriple>>(
'clang_TargetInfo_getTriple');
late final _dart_clang_TargetInfo_getTriple _clang_TargetInfo_getTriple =
_clang_TargetInfo_getTriple_ptr
.asFunction<_dart_clang_TargetInfo_getTriple>();
/// Get the pointer width of the target in bits.
///
/// Returns -1 in case of error.
int clang_TargetInfo_getPointerWidth(
ffi.Pointer<CXTargetInfoImpl> Info,
) {
return _clang_TargetInfo_getPointerWidth(
Info,
);
}
late final _clang_TargetInfo_getPointerWidth_ptr =
_lookup<ffi.NativeFunction<Native_clang_TargetInfo_getPointerWidth>>(
'clang_TargetInfo_getPointerWidth');
late final _dart_clang_TargetInfo_getPointerWidth
_clang_TargetInfo_getPointerWidth = _clang_TargetInfo_getPointerWidth_ptr
.asFunction<_dart_clang_TargetInfo_getPointerWidth>();
/// Retrieve the NULL cursor, which represents no entity.
CXCursor clang_getNullCursor() {
return _clang_getNullCursor();
}
late final _clang_getNullCursor_ptr =
_lookup<ffi.NativeFunction<Native_clang_getNullCursor>>(
'clang_getNullCursor');
late final _dart_clang_getNullCursor _clang_getNullCursor =
_clang_getNullCursor_ptr.asFunction<_dart_clang_getNullCursor>();
/// 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<Native_clang_getTranslationUnitCursor>>(
'clang_getTranslationUnitCursor');
late final _dart_clang_getTranslationUnitCursor
_clang_getTranslationUnitCursor = _clang_getTranslationUnitCursor_ptr
.asFunction<_dart_clang_getTranslationUnitCursor>();
/// Determine whether two cursors are equivalent.
int clang_equalCursors(
CXCursor arg0,
CXCursor arg1,
) {
return _clang_equalCursors(
arg0,
arg1,
);
}
late final _clang_equalCursors_ptr =
_lookup<ffi.NativeFunction<Native_clang_equalCursors>>(
'clang_equalCursors');
late final _dart_clang_equalCursors _clang_equalCursors =
_clang_equalCursors_ptr.asFunction<_dart_clang_equalCursors>();
/// 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<Native_clang_Cursor_isNull>>(
'clang_Cursor_isNull');
late final _dart_clang_Cursor_isNull _clang_Cursor_isNull =
_clang_Cursor_isNull_ptr.asFunction<_dart_clang_Cursor_isNull>();
/// Compute a hash value for the given cursor.
int clang_hashCursor(
CXCursor arg0,
) {
return _clang_hashCursor(
arg0,
);
}
late final _clang_hashCursor_ptr =
_lookup<ffi.NativeFunction<Native_clang_hashCursor>>('clang_hashCursor');
late final _dart_clang_hashCursor _clang_hashCursor =
_clang_hashCursor_ptr.asFunction<_dart_clang_hashCursor>();
/// Retrieve the kind of the given cursor.
int clang_getCursorKind(
CXCursor arg0,
) {
return _clang_getCursorKind(
arg0,
);
}
late final _clang_getCursorKind_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorKind>>(
'clang_getCursorKind');
late final _dart_clang_getCursorKind _clang_getCursorKind =
_clang_getCursorKind_ptr.asFunction<_dart_clang_getCursorKind>();
/// Determine whether the given cursor kind represents a declaration.
int clang_isDeclaration(
int arg0,
) {
return _clang_isDeclaration(
arg0,
);
}
late final _clang_isDeclaration_ptr =
_lookup<ffi.NativeFunction<Native_clang_isDeclaration>>(
'clang_isDeclaration');
late final _dart_clang_isDeclaration _clang_isDeclaration =
_clang_isDeclaration_ptr.asFunction<_dart_clang_isDeclaration>();
/// Determine whether the given declaration is invalid.
///
/// A declaration is invalid if it could not be parsed successfully.
///
/// \returns non-zero if the cursor represents a declaration and it is
/// invalid, otherwise NULL.
int clang_isInvalidDeclaration(
CXCursor arg0,
) {
return _clang_isInvalidDeclaration(
arg0,
);
}
late final _clang_isInvalidDeclaration_ptr =
_lookup<ffi.NativeFunction<Native_clang_isInvalidDeclaration>>(
'clang_isInvalidDeclaration');
late final _dart_clang_isInvalidDeclaration _clang_isInvalidDeclaration =
_clang_isInvalidDeclaration_ptr
.asFunction<_dart_clang_isInvalidDeclaration>();
/// Determine whether the given cursor kind represents a simple
/// reference.
///
/// Note that other kinds of cursors (such as expressions) can also refer to
/// other cursors. Use clang_getCursorReferenced() to determine whether a
/// particular cursor refers to another entity.
int clang_isReference(
int arg0,
) {
return _clang_isReference(
arg0,
);
}
late final _clang_isReference_ptr =
_lookup<ffi.NativeFunction<Native_clang_isReference>>(
'clang_isReference');
late final _dart_clang_isReference _clang_isReference =
_clang_isReference_ptr.asFunction<_dart_clang_isReference>();
/// Determine whether the given cursor kind represents an expression.
int clang_isExpression(
int arg0,
) {
return _clang_isExpression(
arg0,
);
}
late final _clang_isExpression_ptr =
_lookup<ffi.NativeFunction<Native_clang_isExpression>>(
'clang_isExpression');
late final _dart_clang_isExpression _clang_isExpression =
_clang_isExpression_ptr.asFunction<_dart_clang_isExpression>();
/// Determine whether the given cursor kind represents a statement.
int clang_isStatement(
int arg0,
) {
return _clang_isStatement(
arg0,
);
}
late final _clang_isStatement_ptr =
_lookup<ffi.NativeFunction<Native_clang_isStatement>>(
'clang_isStatement');
late final _dart_clang_isStatement _clang_isStatement =
_clang_isStatement_ptr.asFunction<_dart_clang_isStatement>();
/// Determine whether the given cursor kind represents an attribute.
int clang_isAttribute(
int arg0,
) {
return _clang_isAttribute(
arg0,
);
}
late final _clang_isAttribute_ptr =
_lookup<ffi.NativeFunction<Native_clang_isAttribute>>(
'clang_isAttribute');
late final _dart_clang_isAttribute _clang_isAttribute =
_clang_isAttribute_ptr.asFunction<_dart_clang_isAttribute>();
/// 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<Native_clang_Cursor_hasAttrs>>(
'clang_Cursor_hasAttrs');
late final _dart_clang_Cursor_hasAttrs _clang_Cursor_hasAttrs =
_clang_Cursor_hasAttrs_ptr.asFunction<_dart_clang_Cursor_hasAttrs>();
/// Determine whether the given cursor kind represents an invalid
/// cursor.
int clang_isInvalid(
int arg0,
) {
return _clang_isInvalid(
arg0,
);
}
late final _clang_isInvalid_ptr =
_lookup<ffi.NativeFunction<Native_clang_isInvalid>>('clang_isInvalid');
late final _dart_clang_isInvalid _clang_isInvalid =
_clang_isInvalid_ptr.asFunction<_dart_clang_isInvalid>();
/// Determine whether the given cursor kind represents a translation
/// unit.
int clang_isTranslationUnit(
int arg0,
) {
return _clang_isTranslationUnit(
arg0,
);
}
late final _clang_isTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_isTranslationUnit>>(
'clang_isTranslationUnit');
late final _dart_clang_isTranslationUnit _clang_isTranslationUnit =
_clang_isTranslationUnit_ptr.asFunction<_dart_clang_isTranslationUnit>();
/// Determine whether the given cursor represents a preprocessing
/// element, such as a preprocessor directive or macro instantiation.
int clang_isPreprocessing(
int arg0,
) {
return _clang_isPreprocessing(
arg0,
);
}
late final _clang_isPreprocessing_ptr =
_lookup<ffi.NativeFunction<Native_clang_isPreprocessing>>(
'clang_isPreprocessing');
late final _dart_clang_isPreprocessing _clang_isPreprocessing =
_clang_isPreprocessing_ptr.asFunction<_dart_clang_isPreprocessing>();
/// Determine whether the given cursor represents a currently
/// unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
int clang_isUnexposed(
int arg0,
) {
return _clang_isUnexposed(
arg0,
);
}
late final _clang_isUnexposed_ptr =
_lookup<ffi.NativeFunction<Native_clang_isUnexposed>>(
'clang_isUnexposed');
late final _dart_clang_isUnexposed _clang_isUnexposed =
_clang_isUnexposed_ptr.asFunction<_dart_clang_isUnexposed>();
/// Determine the linkage of the entity referred to by a given cursor.
int clang_getCursorLinkage(
CXCursor cursor,
) {
return _clang_getCursorLinkage(
cursor,
);
}
late final _clang_getCursorLinkage_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorLinkage>>(
'clang_getCursorLinkage');
late final _dart_clang_getCursorLinkage _clang_getCursorLinkage =
_clang_getCursorLinkage_ptr.asFunction<_dart_clang_getCursorLinkage>();
/// Describe the visibility of the entity referred to by a cursor.
///
/// This returns the default visibility if not explicitly specified by
/// a visibility attribute. The default visibility may be changed by
/// commandline arguments.
///
/// \param cursor The cursor to query.
///
/// \returns The visibility of the cursor.
int clang_getCursorVisibility(
CXCursor cursor,
) {
return _clang_getCursorVisibility(
cursor,
);
}
late final _clang_getCursorVisibility_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorVisibility>>(
'clang_getCursorVisibility');
late final _dart_clang_getCursorVisibility _clang_getCursorVisibility =
_clang_getCursorVisibility_ptr
.asFunction<_dart_clang_getCursorVisibility>();
/// Determine the availability of the entity that this cursor refers to,
/// taking the current target platform into account.
///
/// \param cursor The cursor to query.
///
/// \returns The availability of the cursor.
int clang_getCursorAvailability(
CXCursor cursor,
) {
return _clang_getCursorAvailability(
cursor,
);
}
late final _clang_getCursorAvailability_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorAvailability>>(
'clang_getCursorAvailability');
late final _dart_clang_getCursorAvailability _clang_getCursorAvailability =
_clang_getCursorAvailability_ptr
.asFunction<_dart_clang_getCursorAvailability>();
/// Determine the availability of the entity that this cursor refers to
/// on any platforms for which availability information is known.
///
/// \param cursor The cursor to query.
///
/// \param always_deprecated If non-NULL, will be set to indicate whether the
/// entity is deprecated on all platforms.
///
/// \param deprecated_message If non-NULL, will be set to the message text
/// provided along with the unconditional deprecation of this entity. The client
/// is responsible for deallocating this string.
///
/// \param always_unavailable If non-NULL, will be set to indicate whether the
/// entity is unavailable on all platforms.
///
/// \param unavailable_message If non-NULL, will be set to the message text
/// provided along with the unconditional unavailability of this entity. The
/// client is responsible for deallocating this string.
///
/// \param availability If non-NULL, an array of CXPlatformAvailability instances
/// that will be populated with platform availability information, up to either
/// the number of platforms for which availability information is available (as
/// returned by this function) or \c availability_size, whichever is smaller.
///
/// \param availability_size The number of elements available in the
/// \c availability array.
///
/// \returns The number of platforms (N) for which availability information is
/// available (which is unrelated to \c availability_size).
///
/// Note that the client is responsible for calling
/// \c clang_disposeCXPlatformAvailability to free each of the
/// platform-availability structures returned. There are
/// \c min(N, availability_size) such structures.
int clang_getCursorPlatformAvailability(
CXCursor cursor,
ffi.Pointer<ffi.Int32> always_deprecated,
ffi.Pointer<CXString> deprecated_message,
ffi.Pointer<ffi.Int32> always_unavailable,
ffi.Pointer<CXString> unavailable_message,
ffi.Pointer<CXPlatformAvailability> availability,
int availability_size,
) {
return _clang_getCursorPlatformAvailability(
cursor,
always_deprecated,
deprecated_message,
always_unavailable,
unavailable_message,
availability,
availability_size,
);
}
late final _clang_getCursorPlatformAvailability_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorPlatformAvailability>>(
'clang_getCursorPlatformAvailability');
late final _dart_clang_getCursorPlatformAvailability
_clang_getCursorPlatformAvailability =
_clang_getCursorPlatformAvailability_ptr
.asFunction<_dart_clang_getCursorPlatformAvailability>();
/// Free the memory associated with a \c CXPlatformAvailability structure.
void clang_disposeCXPlatformAvailability(
ffi.Pointer<CXPlatformAvailability> availability,
) {
return _clang_disposeCXPlatformAvailability(
availability,
);
}
late final _clang_disposeCXPlatformAvailability_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeCXPlatformAvailability>>(
'clang_disposeCXPlatformAvailability');
late final _dart_clang_disposeCXPlatformAvailability
_clang_disposeCXPlatformAvailability =
_clang_disposeCXPlatformAvailability_ptr
.asFunction<_dart_clang_disposeCXPlatformAvailability>();
/// Determine the "language" of the entity referred to by a given cursor.
int clang_getCursorLanguage(
CXCursor cursor,
) {
return _clang_getCursorLanguage(
cursor,
);
}
late final _clang_getCursorLanguage_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorLanguage>>(
'clang_getCursorLanguage');
late final _dart_clang_getCursorLanguage _clang_getCursorLanguage =
_clang_getCursorLanguage_ptr.asFunction<_dart_clang_getCursorLanguage>();
/// Determine the "thread-local storage (TLS) kind" of the declaration
/// referred to by a cursor.
int clang_getCursorTLSKind(
CXCursor cursor,
) {
return _clang_getCursorTLSKind(
cursor,
);
}
late final _clang_getCursorTLSKind_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorTLSKind>>(
'clang_getCursorTLSKind');
late final _dart_clang_getCursorTLSKind _clang_getCursorTLSKind =
_clang_getCursorTLSKind_ptr.asFunction<_dart_clang_getCursorTLSKind>();
/// Returns the translation unit that a cursor originated from.
ffi.Pointer<CXTranslationUnitImpl> clang_Cursor_getTranslationUnit(
CXCursor arg0,
) {
return _clang_Cursor_getTranslationUnit(
arg0,
);
}
late final _clang_Cursor_getTranslationUnit_ptr =
_lookup<ffi.NativeFunction<Native_clang_Cursor_getTranslationUnit>>(
'clang_Cursor_getTranslationUnit');
late final _dart_clang_Cursor_getTranslationUnit
_clang_Cursor_getTranslationUnit = _clang_Cursor_getTranslationUnit_ptr
.asFunction<_dart_clang_Cursor_getTranslationUnit>();
/// Creates an empty CXCursorSet.
ffi.Pointer<CXCursorSetImpl> clang_createCXCursorSet() {
return _clang_createCXCursorSet();
}
late final _clang_createCXCursorSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_createCXCursorSet>>(
'clang_createCXCursorSet');
late final _dart_clang_createCXCursorSet _clang_createCXCursorSet =
_clang_createCXCursorSet_ptr.asFunction<_dart_clang_createCXCursorSet>();
/// Disposes a CXCursorSet and releases its associated memory.
void clang_disposeCXCursorSet(
ffi.Pointer<CXCursorSetImpl> cset,
) {
return _clang_disposeCXCursorSet(
cset,
);
}
late final _clang_disposeCXCursorSet_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeCXCursorSet>>(
'clang_disposeCXCursorSet');
late final _dart_clang_disposeCXCursorSet _clang_disposeCXCursorSet =
_clang_disposeCXCursorSet_ptr
.asFunction<_dart_clang_disposeCXCursorSet>();
/// Queries a CXCursorSet to see if it contains a specific CXCursor.
///
/// \returns non-zero if the set contains the specified cursor.
int clang_CXCursorSet_contains(
ffi.Pointer<CXCursorSetImpl> cset,
CXCursor cursor,
) {
return _clang_CXCursorSet_contains(
cset,
cursor,
);
}
late final _clang_CXCursorSet_contains_ptr =
_lookup<ffi.NativeFunction<Native_clang_CXCursorSet_contains>>(
'clang_CXCursorSet_contains');
late final _dart_clang_CXCursorSet_contains _clang_CXCursorSet_contains =
_clang_CXCursorSet_contains_ptr
.asFunction<_dart_clang_CXCursorSet_contains>();
/// Inserts a CXCursor into a CXCursorSet.
///
/// \returns zero if the CXCursor was already in the set, and non-zero otherwise.
int clang_CXCursorSet_insert(
ffi.Pointer<CXCursorSetImpl> cset,
CXCursor cursor,
) {
return _clang_CXCursorSet_insert(
cset,
cursor,
);
}
late final _clang_CXCursorSet_insert_ptr =
_lookup<ffi.NativeFunction<Native_clang_CXCursorSet_insert>>(
'clang_CXCursorSet_insert');
late final _dart_clang_CXCursorSet_insert _clang_CXCursorSet_insert =
_clang_CXCursorSet_insert_ptr
.asFunction<_dart_clang_CXCursorSet_insert>();
/// Determine the semantic parent of the given cursor.
///
/// The semantic parent of a cursor is the cursor that semantically contains
/// the given \p cursor. For many declarations, the lexical and semantic parents
/// are equivalent (the lexical parent is returned by
/// \c clang_getCursorLexicalParent()). They diverge when declarations or
/// definitions are provided out-of-line. For example:
///
/// \code
/// class C {
/// void f();
/// };
///
/// void C::f() { }
/// \endcode
///
/// In the out-of-line definition of \c C::f, the semantic parent is
/// the class \c C, of which this function is a member. The lexical parent is
/// the place where the declaration actually occurs in the source code; in this
/// case, the definition occurs in the translation unit. In general, the
/// lexical parent for a given entity can change without affecting the semantics
/// of the program, and the lexical parent of different declarations of the
/// same entity may be different. Changing the semantic parent of a declaration,
/// on the other hand, can have a major impact on semantics, and redeclarations
/// of a particular entity should all have the same semantic context.
///
/// In the example above, both declarations of \c C::f have \c C as their
/// semantic context, while the lexical context of the first \c C::f is \c C
/// and the lexical context of the second \c C::f is the translation unit.
///
/// For global declarations, the semantic parent is the translation unit.
CXCursor clang_getCursorSemanticParent(
CXCursor cursor,
) {
return _clang_getCursorSemanticParent(
cursor,
);
}
late final _clang_getCursorSemanticParent_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorSemanticParent>>(
'clang_getCursorSemanticParent');
late final _dart_clang_getCursorSemanticParent
_clang_getCursorSemanticParent = _clang_getCursorSemanticParent_ptr
.asFunction<_dart_clang_getCursorSemanticParent>();
/// Determine the lexical parent of the given cursor.
///
/// The lexical parent of a cursor is the cursor in which the given \p cursor
/// was actually written. For many declarations, the lexical and semantic parents
/// are equivalent (the semantic parent is returned by
/// \c clang_getCursorSemanticParent()). They diverge when declarations or
/// definitions are provided out-of-line. For example:
///
/// \code
/// class C {
/// void f();
/// };
///
/// void C::f() { }
/// \endcode
///
/// In the out-of-line definition of \c C::f, the semantic parent is
/// the class \c C, of which this function is a member. The lexical parent is
/// the place where the declaration actually occurs in the source code; in this
/// case, the definition occurs in the translation unit. In general, the
/// lexical parent for a given entity can change without affecting the semantics
/// of the program, and the lexical parent of different declarations of the
/// same entity may be different. Changing the semantic parent of a declaration,
/// on the other hand, can have a major impact on semantics, and redeclarations
/// of a particular entity should all have the same semantic context.
///
/// In the example above, both declarations of \c C::f have \c C as their
/// semantic context, while the lexical context of the first \c C::f is \c C
/// and the lexical context of the second \c C::f is the translation unit.
///
/// For declarations written in the global scope, the lexical parent is
/// the translation unit.
CXCursor clang_getCursorLexicalParent(
CXCursor cursor,
) {
return _clang_getCursorLexicalParent(
cursor,
);
}
late final _clang_getCursorLexicalParent_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorLexicalParent>>(
'clang_getCursorLexicalParent');
late final _dart_clang_getCursorLexicalParent _clang_getCursorLexicalParent =
_clang_getCursorLexicalParent_ptr
.asFunction<_dart_clang_getCursorLexicalParent>();
/// Determine the set of methods that are overridden by the given
/// method.
///
/// In both Objective-C and C++, a method (aka virtual member function,
/// in C++) can override a virtual method in a base class. For
/// Objective-C, a method is said to override any method in the class's
/// base class, its protocols, or its categories' protocols, that has the same
/// selector and is of the same kind (class or instance).
/// If no such method exists, the search continues to the class's superclass,
/// its protocols, and its categories, and so on. A method from an Objective-C
/// implementation is considered to override the same methods as its
/// corresponding method in the interface.
///
/// For C++, a virtual member function overrides any virtual member
/// function with the same signature that occurs in its base
/// classes. With multiple inheritance, a virtual member function can
/// override several virtual member functions coming from different
/// base classes.
///
/// In all cases, this function determines the immediate overridden
/// method, rather than all of the overridden methods. For example, if
/// a method is originally declared in a class A, then overridden in B
/// (which in inherits from A) and also in C (which inherited from B),
/// then the only overridden method returned from this function when
/// invoked on C's method will be B's method. The client may then
/// invoke this function again, given the previously-found overridden
/// methods, to map out the complete method-override set.
///
/// \param cursor A cursor representing an Objective-C or C++
/// method. This routine will compute the set of methods that this
/// method overrides.
///
/// \param overridden A pointer whose pointee will be replaced with a
/// pointer to an array of cursors, representing the set of overridden
/// methods. If there are no overridden methods, the pointee will be
/// set to NULL. The pointee must be freed via a call to
/// \c clang_disposeOverriddenCursors().
///
/// \param num_overridden A pointer to the number of overridden
/// functions, will be set to the number of overridden functions in the
/// array pointed to by \p overridden.
void clang_getOverriddenCursors(
CXCursor cursor,
ffi.Pointer<ffi.Pointer<CXCursor>> overridden,
ffi.Pointer<ffi.Uint32> num_overridden,
) {
return _clang_getOverriddenCursors(
cursor,
overridden,
num_overridden,
);
}
late final _clang_getOverriddenCursors_ptr =
_lookup<ffi.NativeFunction<Native_clang_getOverriddenCursors>>(
'clang_getOverriddenCursors');
late final _dart_clang_getOverriddenCursors _clang_getOverriddenCursors =
_clang_getOverriddenCursors_ptr
.asFunction<_dart_clang_getOverriddenCursors>();
/// Free the set of overridden cursors returned by \c
/// clang_getOverriddenCursors().
void clang_disposeOverriddenCursors(
ffi.Pointer<CXCursor> overridden,
) {
return _clang_disposeOverriddenCursors(
overridden,
);
}
late final _clang_disposeOverriddenCursors_ptr =
_lookup<ffi.NativeFunction<Native_clang_disposeOverriddenCursors>>(
'clang_disposeOverriddenCursors');
late final _dart_clang_disposeOverriddenCursors
_clang_disposeOverriddenCursors = _clang_disposeOverriddenCursors_ptr
.asFunction<_dart_clang_disposeOverriddenCursors>();
/// Retrieve the file that is included by the given inclusion directive
/// cursor.
ffi.Pointer<ffi.Void> clang_getIncludedFile(
CXCursor cursor,
) {
return _clang_getIncludedFile(
cursor,
);
}
late final _clang_getIncludedFile_ptr =
_lookup<ffi.NativeFunction<Native_clang_getIncludedFile>>(
'clang_getIncludedFile');
late final _dart_clang_getIncludedFile _clang_getIncludedFile =
_clang_getIncludedFile_ptr.asFunction<_dart_clang_getIncludedFile>();
/// Map a source location to the cursor that describes the entity at that
/// location in the source code.
///
/// clang_getCursor() maps an arbitrary source location within a translation
/// unit down to the most specific cursor that describes the entity at that
/// location. For example, given an expression \c x + y, invoking
/// clang_getCursor() with a source location pointing to "x" will return the
/// cursor for "x"; similarly for "y". If the cursor points anywhere between
/// "x" or "y" (e.g., on the + or the whitespace around it), clang_getCursor()
/// will return a cursor referring to the "+" expression.
///
/// \returns a cursor representing the entity at the given source location, or
/// a NULL cursor if no such entity can be found.
CXCursor clang_getCursor(
ffi.Pointer<CXTranslationUnitImpl> arg0,
CXSourceLocation arg1,
) {
return _clang_getCursor(
arg0,
arg1,
);
}
late final _clang_getCursor_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursor>>('clang_getCursor');
late final _dart_clang_getCursor _clang_getCursor =
_clang_getCursor_ptr.asFunction<_dart_clang_getCursor>();
/// 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<Native_clang_getCursorLocation>>(
'clang_getCursorLocation');
late final _dart_clang_getCursorLocation _clang_getCursorLocation =
_clang_getCursorLocation_ptr.asFunction<_dart_clang_getCursorLocation>();
/// Retrieve the physical extent of the source construct referenced by
/// the given cursor.
///
/// The extent of a cursor starts with the file/line/column pointing at the
/// first character within the source construct that the cursor refers to and
/// ends with the last character within that source construct. For a
/// declaration, the extent covers the declaration itself. For a reference,
/// the extent covers the location of the reference (e.g., where the referenced
/// entity was actually used).
CXSourceRange clang_getCursorExtent(
CXCursor arg0,
) {
return _clang_getCursorExtent(
arg0,
);
}
late final _clang_getCursorExtent_ptr =
_lookup<ffi.NativeFunction<Native_clang_getCursorExtent>>(
'clang_getCursorExtent');
late final _dart_clang_getCursorExtent _clang_getCursorExtent =
_clang_getCursorExtent_ptr.asFunction<_dart_clang_getCursorExtent>();
/// 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<Native_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<Native_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<Native_clang_getTypedefDeclUnderlyingType>>(
'clang_getTypedefDeclUnderlyingType');
late final _dart_clang_getTypedefDeclUnderlyingType
_clang_getTypedefDeclUnderlyingType =
_clang_getTypedefDeclUnderlyingType_ptr
.asFunction<_dart_clang_getTypedefDeclUnderlyingType>();
/// Retrieve the integer type of an enum declaration.
///
/// If the cursor does not reference an enum declaration, an invalid type is
/// returned.
CXType clang_getEnumDeclIntegerType(
CXCursor C,
) {
return _clang_getEnumDeclIntegerType(
C,
);
}
late final _clang_getEnumDeclIntegerType_ptr =
_lookup<ffi.NativeFunction<Native_clang_getEnumDeclIntegerType>>(
'clang_getEnumDeclIntegerType');
late final _dart_clang_getEnumDeclIntegerType _clang_getEnumDeclIntegerType =
_clang_getEnumDeclIntegerType_ptr
.asFunction<_dart_clang_getEnumDeclIntegerType>();
/// 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<Native_clang_getEnumConstantDeclValue>>(
'clang_getEnumConstantDeclValue');
late final _dart_clang_getEnumConstantDeclValue
_clang_getEnumConstantDeclValue = _clang_getEnumConstantDeclValue_ptr
.asFunction<_dart_clang_getEnumConstantDeclValue>();
/// Retrieve the integer value of an enum constant declaration as an unsigned
/// long long.
///
/// If the cursor does not reference an enum constant declaration, ULLONG_MAX 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_getEnumConstantDeclUnsignedValue(
CXCursor C,
) {
return _clang_getEnumConstantDeclUnsignedValue(
C,
);
}
late final _clang_getEnumConstantDeclUnsignedValue_ptr = _lookup<
ffi.NativeFunction<Native_clang_getEnumConstantDeclUnsignedValue>>(
'clang_getEnumConstantDeclUnsignedValue');
late final _dart_clang_getEnumConstantDeclUnsignedValue
_clang_getEnumConstantDeclUnsignedValue =
_clang_getEnumConstantDeclUnsignedValue_ptr
.asFunction<_dart_clang_getEnumConstantDeclUnsignedValue>();
/// 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<Native_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<Native_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<Native_clang_Cursor_getArgument>>(
'clang_Cursor_getArgument');
late final _dart_clang_Cursor_getArgument _clang_Cursor_getArgument =
_clang_Cursor_getArgument_ptr
.asFunction<_dart_clang_Cursor_getArgument>();
/// Returns the number of template args of a function decl representing a
/// template specialization.
///
/// If the argument cursor cannot be converted into a template function
/// declaration, -1 is returned.
///
/// For example, for the following declaration and specialization:
/// template <typename T, int kInt, bool kBool>
/// void foo() { ... }
///
/// template <>
/// void foo<float, -7, true>();
///
/// The value 3 would be returned from this call.
int clang_Cursor_getNumTemplateArguments(
CXCursor C,
) {
return _clang_Cursor_getNumTemplateArguments(
C,
);
}
late final _clang_Cursor_getNumTemplateArguments_ptr =
_lookup<ffi.NativeFunction<Native_clang_Cursor_getNumTemplateArguments>>(
'clang_Cursor_getNumTemplateArguments');
late final _dart_clang_Cursor_getNumTemplateArguments
_clang_Cursor_getNumTemplateArguments =
_clang_Cursor_getNumTemplateArguments_ptr
.asFunction<_dart_clang_Cursor_getNumTemplateArguments>();
/// Retrieve the kind of the I'th template argument of the CXCursor C.
///
/// If the argument CXCursor does not represent a FunctionDecl, an invalid
/// template argument kind is returned.
///
/// For example, for the following declaration and specialization:
/// template <typename T, int kInt, bool kBool>
/// void foo() { ... }
///
/// template <>
/// void foo<float, -7, true>();
///
/// For I = 0, 1, and 2, Type, Integral, and Integral will be returned,
/// respectively.
int clang_Cursor_getTemplateArgumentKind(
CXCursor C,
int I,
) {
return _clang_Cursor_getTemplateArgumentKind(
C,
I,
);
}
late final _clang_Cursor_getTemplateArgumentKind_ptr =
_lookup<ffi.NativeFunction<Native_clang_Cursor_getTemplateArgumentKind>>(
'clang_Cursor_getTemplateArgumentKind');
late final _dart_clang_Cursor_getTemplateArgumentKind
_clang_Cursor_getTemplateArgumentKind =
_clang_Cursor_getTemplateArgumentKind_ptr
.asFunction<_dart_clang_Cursor_getTemplateArgumentKind>();
/// Retrieve a CXType representing the type of a TemplateArgument of a
/// function decl representing a template specialization.
///
/// If the argument CXCursor does not represent a FunctionDecl whose I'th
/// template argument has a kind of CXTemplateArgKind_Integral, an invalid type
/// is returned.
///
/// For example, for the following declaration and specialization:
/// template <typename T, int kInt, bool kBool>
/// void foo() { ... }
///
/// template <>
/// void foo<float, -7, true>();
///
/// If called with I = 0, "float", will be returned.
/// Invalid types will be returned for I == 1 or 2.
CXType clang_Cursor_getTemplateArgumentType(
CXCursor C,
int I,
) {
return _clang_Cursor_getTemplateArgumentType(
C,
I,
);
}
late final _clang_Cursor_getTemplateArgumentType_ptr =
_lookup<ffi.NativeFunction<Native_clang_Cursor_getTemplateArgumentType>>(
'clang_Cursor_getTemplateArgumentType');
late final _dart_clang_Cursor_getTemplateArgumentType
_clang_Cursor_getTemplateArgumentType =
_clang_Cursor_getTemplateArgumentType_ptr
.asFunction<_dart_clang_Cursor_getTemplateArgumentType>();
/// Retrieve the value of an Integral TemplateArgument (of a function
/// decl representing a template specialization) as a signed long long.
///
/// It is undefined to call this function on a CXCursor that does not represent a
/// FunctionDecl or whose I'th template argument is not an integral value.
///
/// For example, for the following declaration and specialization:
/// template <typename T, int kInt, bool kBool>
/// void foo() { ... }
///
/// template <>
/// void foo<float, -7, true>();
///
/// If called with I = 1 or 2, -7 or true will be returned, respectively.
/// For I == 0, this function's behavior is undefined.
int clang_Cursor_getTemplateArgumentValue(
CXCursor C,
int I,
) {
return _clang_Cursor_getTemplateArgumentValue(
C,
I,
);
}
late final _clang_Cursor_getTemplateArgumentValue_ptr =
_lookup<ffi.NativeFunction<Native_clang_Cursor_getTemplateArgumentValue>>(
'clang_Cursor_getTemplateArgumentValue');
late final _dart_clang_Cursor_getTemplateArgumentValue
_clang_Cursor_getTemplateArgumentValue =
_clang_Cursor_getTemplateArgumentValue_ptr
.asFunction<_dart_clang_Cursor_getTemplateArgumentValue>();
/// Retrieve the value of an Integral TemplateArgument (of a function
/// decl representing a template specialization) as an unsigned long long.
///
/// It is undefined to call this function on a CXCursor that does not represent a
/// FunctionDecl or whose I'th template argument is not an integral value.
///
/// For example, for the following declaration and specialization:
/// template <typename T, int kInt, bool kBool>
/// void foo() { ... }
///
/// template <>
/// void foo<float, 2147483649, true>();
///
/// If called with I = 1 or 2, 2147483649 or true will be returned, respectively.
/// For I == 0, this function's behavior is undefined.
int clang_Cursor_getTemplateArgumentUnsignedValue(
CXCursor C,
int I,
) {
return _clang_Cursor_getTemplateArgumentUnsignedValue(
C,
I,
);
}
late final _clang_Cursor_getTemplateArgumentUnsignedValue_ptr = _lookup<
ffi.NativeFunction<
Native_clang_Cursor_getTemplateArgumentUnsignedValue>>(
'clang_Cursor_getTemplateArgumentUnsignedValue');
late final _dart_clang_Cursor_getTemplateArgumentUnsignedValue
_clang_Cursor_getTemplateArgumentUnsignedValue =
_clang_Cursor_getTemplateArgumentUnsignedValue_ptr
.asFunction<_dart_clang_Cursor_getTemplateArgumentUnsignedValue>();
/// Determine whether two CXTypes represent the same type.
///
/// \returns non-zero if the CXTypes represent the same type and
/// zero otherwise.
int clang_equalTypes(
CXType A,
CXType B,
) {
return _clang_equalTypes(
A,
B,
);
}
late final _clang_equalTypes_ptr =
_lookup<ffi.NativeFunction<Native_clang_equalTypes>>('clang_equalTypes');
late final _dart_clang_equalTypes _clang_equalTypes =
_clang_equalTypes_ptr.asFunction<_dart_clang_equalTypes>();
/// 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<Native_clang_getCanonicalType>>(
'clang_getCanonicalType');
late final _dart_clang_getCanonicalType _clang_getCanonicalType =
_clang_getCanonicalType_ptr.asFunction<_dart_clang_getCanonicalType>();
/// Determine whether a CXType has the "const" qualifier set,
/// without looking through typedefs that may have added "const" at a
/// different level.
int clang_isConstQualifiedType(
CXType T,
) {
return _clang_isConstQualifiedType(
T,
);
}
late final _clang_isConstQualifiedType_ptr =
_lookup<ffi.NativeFunction<Native_clang_isConstQualifiedType>>(
'clang_isConstQualifiedType');
late final _dart_clang_isConstQualifiedType _clang_isConstQualifiedType =
_clang_isConstQualifiedType_ptr
.asFunction<_dart_clang_i