blob: 1c7c15b633be32c99a31f4fa6452d446978ac38d [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
// ignore_for_file: camel_case_types, non_constant_identifier_names
// 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_getCStringPtr =
_lookup<ffi.NativeFunction<NativeClang_getCString>>('clang_getCString');
late final _clang_getCString =
_clang_getCStringPtr.asFunction<DartClang_getCString>();
/// Free the given string.
void clang_disposeString(
CXString string,
) {
return _clang_disposeString(
string,
);
}
late final _clang_disposeStringPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeString>>(
'clang_disposeString');
late final _clang_disposeString =
_clang_disposeStringPtr.asFunction<DartClang_disposeString>();
/// Free the given string set.
void clang_disposeStringSet(
ffi.Pointer<CXStringSet> set1,
) {
return _clang_disposeStringSet(
set1,
);
}
late final _clang_disposeStringSetPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeStringSet>>(
'clang_disposeStringSet');
late final _clang_disposeStringSet =
_clang_disposeStringSetPtr.asFunction<DartClang_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).
CXIndex clang_createIndex(
int excludeDeclarationsFromPCH,
int displayDiagnostics,
) {
return _clang_createIndex(
excludeDeclarationsFromPCH,
displayDiagnostics,
);
}
late final _clang_createIndexPtr =
_lookup<ffi.NativeFunction<NativeClang_createIndex>>('clang_createIndex');
late final _clang_createIndex =
_clang_createIndexPtr.asFunction<DartClang_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(
CXIndex index,
) {
return _clang_disposeIndex(
index,
);
}
late final _clang_disposeIndexPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeIndex>>(
'clang_disposeIndex');
late final _clang_disposeIndex =
_clang_disposeIndexPtr.asFunction<DartClang_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(
CXIndex arg0,
int options,
) {
return _clang_CXIndex_setGlobalOptions(
arg0,
options,
);
}
late final _clang_CXIndex_setGlobalOptionsPtr =
_lookup<ffi.NativeFunction<NativeClang_CXIndex_setGlobalOptions>>(
'clang_CXIndex_setGlobalOptions');
late final _clang_CXIndex_setGlobalOptions =
_clang_CXIndex_setGlobalOptionsPtr
.asFunction<DartClang_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(
CXIndex arg0,
) {
return _clang_CXIndex_getGlobalOptions(
arg0,
);
}
late final _clang_CXIndex_getGlobalOptionsPtr =
_lookup<ffi.NativeFunction<NativeClang_CXIndex_getGlobalOptions>>(
'clang_CXIndex_getGlobalOptions');
late final _clang_CXIndex_getGlobalOptions =
_clang_CXIndex_getGlobalOptionsPtr
.asFunction<DartClang_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(
CXIndex arg0,
ffi.Pointer<ffi.Int8> Path,
) {
return _clang_CXIndex_setInvocationEmissionPathOption(
arg0,
Path,
);
}
late final _clang_CXIndex_setInvocationEmissionPathOptionPtr = _lookup<
ffi.NativeFunction<
NativeClang_CXIndex_setInvocationEmissionPathOption>>(
'clang_CXIndex_setInvocationEmissionPathOption');
late final _clang_CXIndex_setInvocationEmissionPathOption =
_clang_CXIndex_setInvocationEmissionPathOptionPtr
.asFunction<DartClang_CXIndex_setInvocationEmissionPathOption>();
/// Retrieve the complete file and path name of the given file.
CXString clang_getFileName(
CXFile SFile,
) {
return _clang_getFileName(
SFile,
);
}
late final _clang_getFileNamePtr =
_lookup<ffi.NativeFunction<NativeClang_getFileName>>('clang_getFileName');
late final _clang_getFileName =
_clang_getFileNamePtr.asFunction<DartClang_getFileName>();
/// Retrieve the last modification time of the given file.
int clang_getFileTime(
CXFile SFile,
) {
return _clang_getFileTime(
SFile,
);
}
late final _clang_getFileTimePtr =
_lookup<ffi.NativeFunction<NativeClang_getFileTime>>('clang_getFileTime');
late final _clang_getFileTime =
_clang_getFileTimePtr.asFunction<DartClang_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(
CXFile file,
ffi.Pointer<CXFileUniqueID> outID,
) {
return _clang_getFileUniqueID(
file,
outID,
);
}
late final _clang_getFileUniqueIDPtr =
_lookup<ffi.NativeFunction<NativeClang_getFileUniqueID>>(
'clang_getFileUniqueID');
late final _clang_getFileUniqueID =
_clang_getFileUniqueIDPtr.asFunction<DartClang_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(
CXTranslationUnit tu,
CXFile file,
) {
return _clang_isFileMultipleIncludeGuarded(
tu,
file,
);
}
late final _clang_isFileMultipleIncludeGuardedPtr =
_lookup<ffi.NativeFunction<NativeClang_isFileMultipleIncludeGuarded>>(
'clang_isFileMultipleIncludeGuarded');
late final _clang_isFileMultipleIncludeGuarded =
_clang_isFileMultipleIncludeGuardedPtr
.asFunction<DartClang_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.
CXFile clang_getFile(
CXTranslationUnit tu,
ffi.Pointer<ffi.Int8> file_name,
) {
return _clang_getFile(
tu,
file_name,
);
}
late final _clang_getFilePtr =
_lookup<ffi.NativeFunction<NativeClang_getFile>>('clang_getFile');
late final _clang_getFile = _clang_getFilePtr.asFunction<DartClang_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(
CXTranslationUnit tu,
CXFile file,
ffi.Pointer<ffi.IntPtr> size,
) {
return _clang_getFileContents(
tu,
file,
size,
);
}
late final _clang_getFileContentsPtr =
_lookup<ffi.NativeFunction<NativeClang_getFileContents>>(
'clang_getFileContents');
late final _clang_getFileContents =
_clang_getFileContentsPtr.asFunction<DartClang_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(
CXFile file1,
CXFile file2,
) {
return _clang_File_isEqual(
file1,
file2,
);
}
late final _clang_File_isEqualPtr =
_lookup<ffi.NativeFunction<NativeClang_File_isEqual>>(
'clang_File_isEqual');
late final _clang_File_isEqual =
_clang_File_isEqualPtr.asFunction<DartClang_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(
CXFile file,
) {
return _clang_File_tryGetRealPathName(
file,
);
}
late final _clang_File_tryGetRealPathNamePtr =
_lookup<ffi.NativeFunction<NativeClang_File_tryGetRealPathName>>(
'clang_File_tryGetRealPathName');
late final _clang_File_tryGetRealPathName = _clang_File_tryGetRealPathNamePtr
.asFunction<DartClang_File_tryGetRealPathName>();
/// Retrieve a NULL (invalid) source location.
CXSourceLocation clang_getNullLocation() {
return _clang_getNullLocation();
}
late final _clang_getNullLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getNullLocation>>(
'clang_getNullLocation');
late final _clang_getNullLocation =
_clang_getNullLocationPtr.asFunction<DartClang_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_equalLocationsPtr =
_lookup<ffi.NativeFunction<NativeClang_equalLocations>>(
'clang_equalLocations');
late final _clang_equalLocations =
_clang_equalLocationsPtr.asFunction<DartClang_equalLocations>();
/// Retrieves the source location associated with a given file/line/column
/// in a particular translation unit.
CXSourceLocation clang_getLocation(
CXTranslationUnit tu,
CXFile file,
int line,
int column,
) {
return _clang_getLocation(
tu,
file,
line,
column,
);
}
late final _clang_getLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getLocation>>('clang_getLocation');
late final _clang_getLocation =
_clang_getLocationPtr.asFunction<DartClang_getLocation>();
/// Retrieves the source location associated with a given character offset
/// in a particular translation unit.
CXSourceLocation clang_getLocationForOffset(
CXTranslationUnit tu,
CXFile file,
int offset,
) {
return _clang_getLocationForOffset(
tu,
file,
offset,
);
}
late final _clang_getLocationForOffsetPtr =
_lookup<ffi.NativeFunction<NativeClang_getLocationForOffset>>(
'clang_getLocationForOffset');
late final _clang_getLocationForOffset = _clang_getLocationForOffsetPtr
.asFunction<DartClang_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_isInSystemHeaderPtr =
_lookup<ffi.NativeFunction<NativeClang_Location_isInSystemHeader>>(
'clang_Location_isInSystemHeader');
late final _clang_Location_isInSystemHeader =
_clang_Location_isInSystemHeaderPtr
.asFunction<DartClang_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_isFromMainFilePtr =
_lookup<ffi.NativeFunction<NativeClang_Location_isFromMainFile>>(
'clang_Location_isFromMainFile');
late final _clang_Location_isFromMainFile = _clang_Location_isFromMainFilePtr
.asFunction<DartClang_Location_isFromMainFile>();
/// Retrieve a NULL (invalid) source range.
CXSourceRange clang_getNullRange() {
return _clang_getNullRange();
}
late final _clang_getNullRangePtr =
_lookup<ffi.NativeFunction<NativeClang_getNullRange>>(
'clang_getNullRange');
late final _clang_getNullRange =
_clang_getNullRangePtr.asFunction<DartClang_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_getRangePtr =
_lookup<ffi.NativeFunction<NativeClang_getRange>>('clang_getRange');
late final _clang_getRange =
_clang_getRangePtr.asFunction<DartClang_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_equalRangesPtr =
_lookup<ffi.NativeFunction<NativeClang_equalRanges>>('clang_equalRanges');
late final _clang_equalRanges =
_clang_equalRangesPtr.asFunction<DartClang_equalRanges>();
/// Returns non-zero if \p range is null.
int clang_Range_isNull(
CXSourceRange range,
) {
return _clang_Range_isNull(
range,
);
}
late final _clang_Range_isNullPtr =
_lookup<ffi.NativeFunction<NativeClang_Range_isNull>>(
'clang_Range_isNull');
late final _clang_Range_isNull =
_clang_Range_isNullPtr.asFunction<DartClang_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<CXFile> 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_getExpansionLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getExpansionLocation>>(
'clang_getExpansionLocation');
late final _clang_getExpansionLocation = _clang_getExpansionLocationPtr
.asFunction<DartClang_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_getPresumedLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getPresumedLocation>>(
'clang_getPresumedLocation');
late final _clang_getPresumedLocation =
_clang_getPresumedLocationPtr.asFunction<DartClang_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<CXFile> 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_getInstantiationLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getInstantiationLocation>>(
'clang_getInstantiationLocation');
late final _clang_getInstantiationLocation =
_clang_getInstantiationLocationPtr
.asFunction<DartClang_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<CXFile> 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_getSpellingLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getSpellingLocation>>(
'clang_getSpellingLocation');
late final _clang_getSpellingLocation =
_clang_getSpellingLocationPtr.asFunction<DartClang_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<CXFile> 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_getFileLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getFileLocation>>(
'clang_getFileLocation');
late final _clang_getFileLocation =
_clang_getFileLocationPtr.asFunction<DartClang_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_getRangeStartPtr =
_lookup<ffi.NativeFunction<NativeClang_getRangeStart>>(
'clang_getRangeStart');
late final _clang_getRangeStart =
_clang_getRangeStartPtr.asFunction<DartClang_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_getRangeEndPtr =
_lookup<ffi.NativeFunction<NativeClang_getRangeEnd>>('clang_getRangeEnd');
late final _clang_getRangeEnd =
_clang_getRangeEndPtr.asFunction<DartClang_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(
CXTranslationUnit tu,
CXFile file,
) {
return _clang_getSkippedRanges(
tu,
file,
);
}
late final _clang_getSkippedRangesPtr =
_lookup<ffi.NativeFunction<NativeClang_getSkippedRanges>>(
'clang_getSkippedRanges');
late final _clang_getSkippedRanges =
_clang_getSkippedRangesPtr.asFunction<DartClang_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(
CXTranslationUnit tu,
) {
return _clang_getAllSkippedRanges(
tu,
);
}
late final _clang_getAllSkippedRangesPtr =
_lookup<ffi.NativeFunction<NativeClang_getAllSkippedRanges>>(
'clang_getAllSkippedRanges');
late final _clang_getAllSkippedRanges =
_clang_getAllSkippedRangesPtr.asFunction<DartClang_getAllSkippedRanges>();
/// Destroy the given \c CXSourceRangeList.
void clang_disposeSourceRangeList(
ffi.Pointer<CXSourceRangeList> ranges,
) {
return _clang_disposeSourceRangeList(
ranges,
);
}
late final _clang_disposeSourceRangeListPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeSourceRangeList>>(
'clang_disposeSourceRangeList');
late final _clang_disposeSourceRangeList = _clang_disposeSourceRangeListPtr
.asFunction<DartClang_disposeSourceRangeList>();
/// Determine the number of diagnostics in a CXDiagnosticSet.
int clang_getNumDiagnosticsInSet(
CXDiagnosticSet Diags,
) {
return _clang_getNumDiagnosticsInSet(
Diags,
);
}
late final _clang_getNumDiagnosticsInSetPtr =
_lookup<ffi.NativeFunction<NativeClang_getNumDiagnosticsInSet>>(
'clang_getNumDiagnosticsInSet');
late final _clang_getNumDiagnosticsInSet = _clang_getNumDiagnosticsInSetPtr
.asFunction<DartClang_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().
CXDiagnostic clang_getDiagnosticInSet(
CXDiagnosticSet Diags,
int Index,
) {
return _clang_getDiagnosticInSet(
Diags,
Index,
);
}
late final _clang_getDiagnosticInSetPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticInSet>>(
'clang_getDiagnosticInSet');
late final _clang_getDiagnosticInSet =
_clang_getDiagnosticInSetPtr.asFunction<DartClang_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().
CXDiagnosticSet 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_loadDiagnosticsPtr =
_lookup<ffi.NativeFunction<NativeClang_loadDiagnostics>>(
'clang_loadDiagnostics');
late final _clang_loadDiagnostics =
_clang_loadDiagnosticsPtr.asFunction<DartClang_loadDiagnostics>();
/// Release a CXDiagnosticSet and all of its contained diagnostics.
void clang_disposeDiagnosticSet(
CXDiagnosticSet Diags,
) {
return _clang_disposeDiagnosticSet(
Diags,
);
}
late final _clang_disposeDiagnosticSetPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeDiagnosticSet>>(
'clang_disposeDiagnosticSet');
late final _clang_disposeDiagnosticSet = _clang_disposeDiagnosticSetPtr
.asFunction<DartClang_disposeDiagnosticSet>();
/// Retrieve the child diagnostics of a CXDiagnostic.
///
/// This CXDiagnosticSet does not need to be released by
/// clang_disposeDiagnosticSet.
CXDiagnosticSet clang_getChildDiagnostics(
CXDiagnostic D,
) {
return _clang_getChildDiagnostics(
D,
);
}
late final _clang_getChildDiagnosticsPtr =
_lookup<ffi.NativeFunction<NativeClang_getChildDiagnostics>>(
'clang_getChildDiagnostics');
late final _clang_getChildDiagnostics =
_clang_getChildDiagnosticsPtr.asFunction<DartClang_getChildDiagnostics>();
/// Determine the number of diagnostics produced for the given
/// translation unit.
int clang_getNumDiagnostics(
CXTranslationUnit Unit,
) {
return _clang_getNumDiagnostics(
Unit,
);
}
late final _clang_getNumDiagnosticsPtr =
_lookup<ffi.NativeFunction<NativeClang_getNumDiagnostics>>(
'clang_getNumDiagnostics');
late final _clang_getNumDiagnostics =
_clang_getNumDiagnosticsPtr.asFunction<DartClang_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().
CXDiagnostic clang_getDiagnostic(
CXTranslationUnit Unit,
int Index,
) {
return _clang_getDiagnostic(
Unit,
Index,
);
}
late final _clang_getDiagnosticPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnostic>>(
'clang_getDiagnostic');
late final _clang_getDiagnostic =
_clang_getDiagnosticPtr.asFunction<DartClang_getDiagnostic>();
/// Retrieve the complete set of diagnostics associated with a
/// translation unit.
///
/// \param Unit the translation unit to query.
CXDiagnosticSet clang_getDiagnosticSetFromTU(
CXTranslationUnit Unit,
) {
return _clang_getDiagnosticSetFromTU(
Unit,
);
}
late final _clang_getDiagnosticSetFromTUPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticSetFromTU>>(
'clang_getDiagnosticSetFromTU');
late final _clang_getDiagnosticSetFromTU = _clang_getDiagnosticSetFromTUPtr
.asFunction<DartClang_getDiagnosticSetFromTU>();
/// Destroy a diagnostic.
void clang_disposeDiagnostic(
CXDiagnostic Diagnostic,
) {
return _clang_disposeDiagnostic(
Diagnostic,
);
}
late final _clang_disposeDiagnosticPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeDiagnostic>>(
'clang_disposeDiagnostic');
late final _clang_disposeDiagnostic =
_clang_disposeDiagnosticPtr.asFunction<DartClang_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(
CXDiagnostic Diagnostic,
int Options,
) {
return _clang_formatDiagnostic(
Diagnostic,
Options,
);
}
late final _clang_formatDiagnosticPtr =
_lookup<ffi.NativeFunction<NativeClang_formatDiagnostic>>(
'clang_formatDiagnostic');
late final _clang_formatDiagnostic =
_clang_formatDiagnosticPtr.asFunction<DartClang_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_defaultDiagnosticDisplayOptionsPtr =
_lookup<ffi.NativeFunction<NativeClang_defaultDiagnosticDisplayOptions>>(
'clang_defaultDiagnosticDisplayOptions');
late final _clang_defaultDiagnosticDisplayOptions =
_clang_defaultDiagnosticDisplayOptionsPtr
.asFunction<DartClang_defaultDiagnosticDisplayOptions>();
/// Determine the severity of the given diagnostic.
int clang_getDiagnosticSeverity(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticSeverity(
arg0,
);
}
late final _clang_getDiagnosticSeverityPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticSeverity>>(
'clang_getDiagnosticSeverity');
late final _clang_getDiagnosticSeverity = _clang_getDiagnosticSeverityPtr
.asFunction<DartClang_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(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticLocation(
arg0,
);
}
late final _clang_getDiagnosticLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticLocation>>(
'clang_getDiagnosticLocation');
late final _clang_getDiagnosticLocation = _clang_getDiagnosticLocationPtr
.asFunction<DartClang_getDiagnosticLocation>();
/// Retrieve the text of the given diagnostic.
CXString clang_getDiagnosticSpelling(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticSpelling(
arg0,
);
}
late final _clang_getDiagnosticSpellingPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticSpelling>>(
'clang_getDiagnosticSpelling');
late final _clang_getDiagnosticSpelling = _clang_getDiagnosticSpellingPtr
.asFunction<DartClang_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(
CXDiagnostic Diag,
ffi.Pointer<CXString> Disable,
) {
return _clang_getDiagnosticOption(
Diag,
Disable,
);
}
late final _clang_getDiagnosticOptionPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticOption>>(
'clang_getDiagnosticOption');
late final _clang_getDiagnosticOption =
_clang_getDiagnosticOptionPtr.asFunction<DartClang_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(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticCategory(
arg0,
);
}
late final _clang_getDiagnosticCategoryPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticCategory>>(
'clang_getDiagnosticCategory');
late final _clang_getDiagnosticCategory = _clang_getDiagnosticCategoryPtr
.asFunction<DartClang_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_getDiagnosticCategoryNamePtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticCategoryName>>(
'clang_getDiagnosticCategoryName');
late final _clang_getDiagnosticCategoryName =
_clang_getDiagnosticCategoryNamePtr
.asFunction<DartClang_getDiagnosticCategoryName>();
/// Retrieve the diagnostic category text for a given diagnostic.
///
/// \returns The text of the given diagnostic category.
CXString clang_getDiagnosticCategoryText(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticCategoryText(
arg0,
);
}
late final _clang_getDiagnosticCategoryTextPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticCategoryText>>(
'clang_getDiagnosticCategoryText');
late final _clang_getDiagnosticCategoryText =
_clang_getDiagnosticCategoryTextPtr
.asFunction<DartClang_getDiagnosticCategoryText>();
/// Determine the number of source ranges associated with the given
/// diagnostic.
int clang_getDiagnosticNumRanges(
CXDiagnostic arg0,
) {
return _clang_getDiagnosticNumRanges(
arg0,
);
}
late final _clang_getDiagnosticNumRangesPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticNumRanges>>(
'clang_getDiagnosticNumRanges');
late final _clang_getDiagnosticNumRanges = _clang_getDiagnosticNumRangesPtr
.asFunction<DartClang_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(
CXDiagnostic Diagnostic,
int Range,
) {
return _clang_getDiagnosticRange(
Diagnostic,
Range,
);
}
late final _clang_getDiagnosticRangePtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticRange>>(
'clang_getDiagnosticRange');
late final _clang_getDiagnosticRange =
_clang_getDiagnosticRangePtr.asFunction<DartClang_getDiagnosticRange>();
/// Determine the number of fix-it hints associated with the
/// given diagnostic.
int clang_getDiagnosticNumFixIts(
CXDiagnostic Diagnostic,
) {
return _clang_getDiagnosticNumFixIts(
Diagnostic,
);
}
late final _clang_getDiagnosticNumFixItsPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticNumFixIts>>(
'clang_getDiagnosticNumFixIts');
late final _clang_getDiagnosticNumFixIts = _clang_getDiagnosticNumFixItsPtr
.asFunction<DartClang_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(
CXDiagnostic Diagnostic,
int FixIt,
ffi.Pointer<CXSourceRange> ReplacementRange,
) {
return _clang_getDiagnosticFixIt(
Diagnostic,
FixIt,
ReplacementRange,
);
}
late final _clang_getDiagnosticFixItPtr =
_lookup<ffi.NativeFunction<NativeClang_getDiagnosticFixIt>>(
'clang_getDiagnosticFixIt');
late final _clang_getDiagnosticFixIt =
_clang_getDiagnosticFixItPtr.asFunction<DartClang_getDiagnosticFixIt>();
/// Get the original translation unit source file name.
CXString clang_getTranslationUnitSpelling(
CXTranslationUnit CTUnit,
) {
return _clang_getTranslationUnitSpelling(
CTUnit,
);
}
late final _clang_getTranslationUnitSpellingPtr =
_lookup<ffi.NativeFunction<NativeClang_getTranslationUnitSpelling>>(
'clang_getTranslationUnitSpelling');
late final _clang_getTranslationUnitSpelling =
_clang_getTranslationUnitSpellingPtr
.asFunction<DartClang_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.
CXTranslationUnit clang_createTranslationUnitFromSourceFile(
CXIndex 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_createTranslationUnitFromSourceFilePtr = _lookup<
ffi.NativeFunction<NativeClang_createTranslationUnitFromSourceFile>>(
'clang_createTranslationUnitFromSourceFile');
late final _clang_createTranslationUnitFromSourceFile =
_clang_createTranslationUnitFromSourceFilePtr
.asFunction<DartClang_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.
CXTranslationUnit clang_createTranslationUnit(
CXIndex CIdx,
ffi.Pointer<ffi.Int8> ast_filename,
) {
return _clang_createTranslationUnit(
CIdx,
ast_filename,
);
}
late final _clang_createTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_createTranslationUnit>>(
'clang_createTranslationUnit');
late final _clang_createTranslationUnit = _clang_createTranslationUnitPtr
.asFunction<DartClang_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(
CXIndex CIdx,
ffi.Pointer<ffi.Int8> ast_filename,
ffi.Pointer<CXTranslationUnit> out_TU,
) {
return _clang_createTranslationUnit2(
CIdx,
ast_filename,
out_TU,
);
}
late final _clang_createTranslationUnit2Ptr =
_lookup<ffi.NativeFunction<NativeClang_createTranslationUnit2>>(
'clang_createTranslationUnit2');
late final _clang_createTranslationUnit2 = _clang_createTranslationUnit2Ptr
.asFunction<DartClang_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_defaultEditingTranslationUnitOptionsPtr = _lookup<
ffi.NativeFunction<NativeClang_defaultEditingTranslationUnitOptions>>(
'clang_defaultEditingTranslationUnitOptions');
late final _clang_defaultEditingTranslationUnitOptions =
_clang_defaultEditingTranslationUnitOptionsPtr
.asFunction<DartClang_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.
CXTranslationUnit clang_parseTranslationUnit(
CXIndex 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_parseTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_parseTranslationUnit>>(
'clang_parseTranslationUnit');
late final _clang_parseTranslationUnit = _clang_parseTranslationUnitPtr
.asFunction<DartClang_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(
CXIndex 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<CXTranslationUnit> 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_parseTranslationUnit2Ptr =
_lookup<ffi.NativeFunction<NativeClang_parseTranslationUnit2>>(
'clang_parseTranslationUnit2');
late final _clang_parseTranslationUnit2 = _clang_parseTranslationUnit2Ptr
.asFunction<DartClang_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(
CXIndex 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<CXTranslationUnit> 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_parseTranslationUnit2FullArgvPtr =
_lookup<ffi.NativeFunction<NativeClang_parseTranslationUnit2FullArgv>>(
'clang_parseTranslationUnit2FullArgv');
late final _clang_parseTranslationUnit2FullArgv =
_clang_parseTranslationUnit2FullArgvPtr
.asFunction<DartClang_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(
CXTranslationUnit TU,
) {
return _clang_defaultSaveOptions(
TU,
);
}
late final _clang_defaultSaveOptionsPtr =
_lookup<ffi.NativeFunction<NativeClang_defaultSaveOptions>>(
'clang_defaultSaveOptions');
late final _clang_defaultSaveOptions =
_clang_defaultSaveOptionsPtr.asFunction<DartClang_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(
CXTranslationUnit TU,
ffi.Pointer<ffi.Int8> FileName,
int options,
) {
return _clang_saveTranslationUnit(
TU,
FileName,
options,
);
}
late final _clang_saveTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_saveTranslationUnit>>(
'clang_saveTranslationUnit');
late final _clang_saveTranslationUnit =
_clang_saveTranslationUnitPtr.asFunction<DartClang_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(
CXTranslationUnit arg0,
) {
return _clang_suspendTranslationUnit(
arg0,
);
}
late final _clang_suspendTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_suspendTranslationUnit>>(
'clang_suspendTranslationUnit');
late final _clang_suspendTranslationUnit = _clang_suspendTranslationUnitPtr
.asFunction<DartClang_suspendTranslationUnit>();
/// Destroy the specified CXTranslationUnit object.
void clang_disposeTranslationUnit(
CXTranslationUnit arg0,
) {
return _clang_disposeTranslationUnit(
arg0,
);
}
late final _clang_disposeTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeTranslationUnit>>(
'clang_disposeTranslationUnit');
late final _clang_disposeTranslationUnit = _clang_disposeTranslationUnitPtr
.asFunction<DartClang_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(
CXTranslationUnit TU,
) {
return _clang_defaultReparseOptions(
TU,
);
}
late final _clang_defaultReparseOptionsPtr =
_lookup<ffi.NativeFunction<NativeClang_defaultReparseOptions>>(
'clang_defaultReparseOptions');
late final _clang_defaultReparseOptions = _clang_defaultReparseOptionsPtr
.asFunction<DartClang_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(
CXTranslationUnit 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_reparseTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_reparseTranslationUnit>>(
'clang_reparseTranslationUnit');
late final _clang_reparseTranslationUnit = _clang_reparseTranslationUnitPtr
.asFunction<DartClang_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_getTUResourceUsageNamePtr =
_lookup<ffi.NativeFunction<NativeClang_getTUResourceUsageName>>(
'clang_getTUResourceUsageName');
late final _clang_getTUResourceUsageName = _clang_getTUResourceUsageNamePtr
.asFunction<DartClang_getTUResourceUsageName>();
/// Return the memory usage of a translation unit. This object
/// should be released with clang_disposeCXTUResourceUsage().
CXTUResourceUsage clang_getCXTUResourceUsage(
CXTranslationUnit TU,
) {
return _clang_getCXTUResourceUsage(
TU,
);
}
late final _clang_getCXTUResourceUsagePtr =
_lookup<ffi.NativeFunction<NativeClang_getCXTUResourceUsage>>(
'clang_getCXTUResourceUsage');
late final _clang_getCXTUResourceUsage = _clang_getCXTUResourceUsagePtr
.asFunction<DartClang_getCXTUResourceUsage>();
void clang_disposeCXTUResourceUsage(
CXTUResourceUsage usage,
) {
return _clang_disposeCXTUResourceUsage(
usage,
);
}
late final _clang_disposeCXTUResourceUsagePtr =
_lookup<ffi.NativeFunction<NativeClang_disposeCXTUResourceUsage>>(
'clang_disposeCXTUResourceUsage');
late final _clang_disposeCXTUResourceUsage =
_clang_disposeCXTUResourceUsagePtr
.asFunction<DartClang_disposeCXTUResourceUsage>();
/// Get target information for this translation unit.
///
/// The CXTargetInfo object cannot outlive the CXTranslationUnit object.
CXTargetInfo clang_getTranslationUnitTargetInfo(
CXTranslationUnit CTUnit,
) {
return _clang_getTranslationUnitTargetInfo(
CTUnit,
);
}
late final _clang_getTranslationUnitTargetInfoPtr =
_lookup<ffi.NativeFunction<NativeClang_getTranslationUnitTargetInfo>>(
'clang_getTranslationUnitTargetInfo');
late final _clang_getTranslationUnitTargetInfo =
_clang_getTranslationUnitTargetInfoPtr
.asFunction<DartClang_getTranslationUnitTargetInfo>();
/// Destroy the CXTargetInfo object.
void clang_TargetInfo_dispose(
CXTargetInfo Info,
) {
return _clang_TargetInfo_dispose(
Info,
);
}
late final _clang_TargetInfo_disposePtr =
_lookup<ffi.NativeFunction<NativeClang_TargetInfo_dispose>>(
'clang_TargetInfo_dispose');
late final _clang_TargetInfo_dispose =
_clang_TargetInfo_disposePtr.asFunction<DartClang_TargetInfo_dispose>();
/// Get the normalized target triple as a string.
///
/// Returns the empty string in case of any error.
CXString clang_TargetInfo_getTriple(
CXTargetInfo Info,
) {
return _clang_TargetInfo_getTriple(
Info,
);
}
late final _clang_TargetInfo_getTriplePtr =
_lookup<ffi.NativeFunction<NativeClang_TargetInfo_getTriple>>(
'clang_TargetInfo_getTriple');
late final _clang_TargetInfo_getTriple = _clang_TargetInfo_getTriplePtr
.asFunction<DartClang_TargetInfo_getTriple>();
/// Get the pointer width of the target in bits.
///
/// Returns -1 in case of error.
int clang_TargetInfo_getPointerWidth(
CXTargetInfo Info,
) {
return _clang_TargetInfo_getPointerWidth(
Info,
);
}
late final _clang_TargetInfo_getPointerWidthPtr =
_lookup<ffi.NativeFunction<NativeClang_TargetInfo_getPointerWidth>>(
'clang_TargetInfo_getPointerWidth');
late final _clang_TargetInfo_getPointerWidth =
_clang_TargetInfo_getPointerWidthPtr
.asFunction<DartClang_TargetInfo_getPointerWidth>();
/// Retrieve the NULL cursor, which represents no entity.
CXCursor clang_getNullCursor() {
return _clang_getNullCursor();
}
late final _clang_getNullCursorPtr =
_lookup<ffi.NativeFunction<NativeClang_getNullCursor>>(
'clang_getNullCursor');
late final _clang_getNullCursor =
_clang_getNullCursorPtr.asFunction<DartClang_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(
CXTranslationUnit arg0,
) {
return _clang_getTranslationUnitCursor(
arg0,
);
}
late final _clang_getTranslationUnitCursorPtr =
_lookup<ffi.NativeFunction<NativeClang_getTranslationUnitCursor>>(
'clang_getTranslationUnitCursor');
late final _clang_getTranslationUnitCursor =
_clang_getTranslationUnitCursorPtr
.asFunction<DartClang_getTranslationUnitCursor>();
/// Determine whether two cursors are equivalent.
int clang_equalCursors(
CXCursor arg0,
CXCursor arg1,
) {
return _clang_equalCursors(
arg0,
arg1,
);
}
late final _clang_equalCursorsPtr =
_lookup<ffi.NativeFunction<NativeClang_equalCursors>>(
'clang_equalCursors');
late final _clang_equalCursors =
_clang_equalCursorsPtr.asFunction<DartClang_equalCursors>();
/// Returns non-zero if \p cursor is null.
int clang_Cursor_isNull(
CXCursor cursor,
) {
return _clang_Cursor_isNull(
cursor,
);
}
late final _clang_Cursor_isNullPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_isNull>>(
'clang_Cursor_isNull');
late final _clang_Cursor_isNull =
_clang_Cursor_isNullPtr.asFunction<DartClang_Cursor_isNull>();
/// Compute a hash value for the given cursor.
int clang_hashCursor(
CXCursor arg0,
) {
return _clang_hashCursor(
arg0,
);
}
late final _clang_hashCursorPtr =
_lookup<ffi.NativeFunction<NativeClang_hashCursor>>('clang_hashCursor');
late final _clang_hashCursor =
_clang_hashCursorPtr.asFunction<DartClang_hashCursor>();
/// Retrieve the kind of the given cursor.
int clang_getCursorKind(
CXCursor arg0,
) {
return _clang_getCursorKind(
arg0,
);
}
late final _clang_getCursorKindPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorKind>>(
'clang_getCursorKind');
late final _clang_getCursorKind =
_clang_getCursorKindPtr.asFunction<DartClang_getCursorKind>();
/// Determine whether the given cursor kind represents a declaration.
int clang_isDeclaration(
int arg0,
) {
return _clang_isDeclaration(
arg0,
);
}
late final _clang_isDeclarationPtr =
_lookup<ffi.NativeFunction<NativeClang_isDeclaration>>(
'clang_isDeclaration');
late final _clang_isDeclaration =
_clang_isDeclarationPtr.asFunction<DartClang_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_isInvalidDeclarationPtr =
_lookup<ffi.NativeFunction<NativeClang_isInvalidDeclaration>>(
'clang_isInvalidDeclaration');
late final _clang_isInvalidDeclaration = _clang_isInvalidDeclarationPtr
.asFunction<DartClang_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_isReferencePtr =
_lookup<ffi.NativeFunction<NativeClang_isReference>>('clang_isReference');
late final _clang_isReference =
_clang_isReferencePtr.asFunction<DartClang_isReference>();
/// Determine whether the given cursor kind represents an expression.
int clang_isExpression(
int arg0,
) {
return _clang_isExpression(
arg0,
);
}
late final _clang_isExpressionPtr =
_lookup<ffi.NativeFunction<NativeClang_isExpression>>(
'clang_isExpression');
late final _clang_isExpression =
_clang_isExpressionPtr.asFunction<DartClang_isExpression>();
/// Determine whether the given cursor kind represents a statement.
int clang_isStatement(
int arg0,
) {
return _clang_isStatement(
arg0,
);
}
late final _clang_isStatementPtr =
_lookup<ffi.NativeFunction<NativeClang_isStatement>>('clang_isStatement');
late final _clang_isStatement =
_clang_isStatementPtr.asFunction<DartClang_isStatement>();
/// Determine whether the given cursor kind represents an attribute.
int clang_isAttribute(
int arg0,
) {
return _clang_isAttribute(
arg0,
);
}
late final _clang_isAttributePtr =
_lookup<ffi.NativeFunction<NativeClang_isAttribute>>('clang_isAttribute');
late final _clang_isAttribute =
_clang_isAttributePtr.asFunction<DartClang_isAttribute>();
/// Determine whether the given cursor has any attributes.
int clang_Cursor_hasAttrs(
CXCursor C,
) {
return _clang_Cursor_hasAttrs(
C,
);
}
late final _clang_Cursor_hasAttrsPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_hasAttrs>>(
'clang_Cursor_hasAttrs');
late final _clang_Cursor_hasAttrs =
_clang_Cursor_hasAttrsPtr.asFunction<DartClang_Cursor_hasAttrs>();
/// Determine whether the given cursor kind represents an invalid
/// cursor.
int clang_isInvalid(
int arg0,
) {
return _clang_isInvalid(
arg0,
);
}
late final _clang_isInvalidPtr =
_lookup<ffi.NativeFunction<NativeClang_isInvalid>>('clang_isInvalid');
late final _clang_isInvalid =
_clang_isInvalidPtr.asFunction<DartClang_isInvalid>();
/// Determine whether the given cursor kind represents a translation
/// unit.
int clang_isTranslationUnit(
int arg0,
) {
return _clang_isTranslationUnit(
arg0,
);
}
late final _clang_isTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_isTranslationUnit>>(
'clang_isTranslationUnit');
late final _clang_isTranslationUnit =
_clang_isTranslationUnitPtr.asFunction<DartClang_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_isPreprocessingPtr =
_lookup<ffi.NativeFunction<NativeClang_isPreprocessing>>(
'clang_isPreprocessing');
late final _clang_isPreprocessing =
_clang_isPreprocessingPtr.asFunction<DartClang_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_isUnexposedPtr =
_lookup<ffi.NativeFunction<NativeClang_isUnexposed>>('clang_isUnexposed');
late final _clang_isUnexposed =
_clang_isUnexposedPtr.asFunction<DartClang_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_getCursorLinkagePtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorLinkage>>(
'clang_getCursorLinkage');
late final _clang_getCursorLinkage =
_clang_getCursorLinkagePtr.asFunction<DartClang_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_getCursorVisibilityPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorVisibility>>(
'clang_getCursorVisibility');
late final _clang_getCursorVisibility =
_clang_getCursorVisibilityPtr.asFunction<DartClang_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_getCursorAvailabilityPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorAvailability>>(
'clang_getCursorAvailability');
late final _clang_getCursorAvailability = _clang_getCursorAvailabilityPtr
.asFunction<DartClang_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_getCursorPlatformAvailabilityPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorPlatformAvailability>>(
'clang_getCursorPlatformAvailability');
late final _clang_getCursorPlatformAvailability =
_clang_getCursorPlatformAvailabilityPtr
.asFunction<DartClang_getCursorPlatformAvailability>();
/// Free the memory associated with a \c CXPlatformAvailability structure.
void clang_disposeCXPlatformAvailability(
ffi.Pointer<CXPlatformAvailability> availability,
) {
return _clang_disposeCXPlatformAvailability(
availability,
);
}
late final _clang_disposeCXPlatformAvailabilityPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeCXPlatformAvailability>>(
'clang_disposeCXPlatformAvailability');
late final _clang_disposeCXPlatformAvailability =
_clang_disposeCXPlatformAvailabilityPtr
.asFunction<DartClang_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_getCursorLanguagePtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorLanguage>>(
'clang_getCursorLanguage');
late final _clang_getCursorLanguage =
_clang_getCursorLanguagePtr.asFunction<DartClang_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_getCursorTLSKindPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorTLSKind>>(
'clang_getCursorTLSKind');
late final _clang_getCursorTLSKind =
_clang_getCursorTLSKindPtr.asFunction<DartClang_getCursorTLSKind>();
/// Returns the translation unit that a cursor originated from.
CXTranslationUnit clang_Cursor_getTranslationUnit(
CXCursor arg0,
) {
return _clang_Cursor_getTranslationUnit(
arg0,
);
}
late final _clang_Cursor_getTranslationUnitPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getTranslationUnit>>(
'clang_Cursor_getTranslationUnit');
late final _clang_Cursor_getTranslationUnit =
_clang_Cursor_getTranslationUnitPtr
.asFunction<DartClang_Cursor_getTranslationUnit>();
/// Creates an empty CXCursorSet.
CXCursorSet clang_createCXCursorSet() {
return _clang_createCXCursorSet();
}
late final _clang_createCXCursorSetPtr =
_lookup<ffi.NativeFunction<NativeClang_createCXCursorSet>>(
'clang_createCXCursorSet');
late final _clang_createCXCursorSet =
_clang_createCXCursorSetPtr.asFunction<DartClang_createCXCursorSet>();
/// Disposes a CXCursorSet and releases its associated memory.
void clang_disposeCXCursorSet(
CXCursorSet cset,
) {
return _clang_disposeCXCursorSet(
cset,
);
}
late final _clang_disposeCXCursorSetPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeCXCursorSet>>(
'clang_disposeCXCursorSet');
late final _clang_disposeCXCursorSet =
_clang_disposeCXCursorSetPtr.asFunction<DartClang_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(
CXCursorSet cset,
CXCursor cursor,
) {
return _clang_CXCursorSet_contains(
cset,
cursor,
);
}
late final _clang_CXCursorSet_containsPtr =
_lookup<ffi.NativeFunction<NativeClang_CXCursorSet_contains>>(
'clang_CXCursorSet_contains');
late final _clang_CXCursorSet_contains = _clang_CXCursorSet_containsPtr
.asFunction<DartClang_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(
CXCursorSet cset,
CXCursor cursor,
) {
return _clang_CXCursorSet_insert(
cset,
cursor,
);
}
late final _clang_CXCursorSet_insertPtr =
_lookup<ffi.NativeFunction<NativeClang_CXCursorSet_insert>>(
'clang_CXCursorSet_insert');
late final _clang_CXCursorSet_insert =
_clang_CXCursorSet_insertPtr.asFunction<DartClang_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_getCursorSemanticParentPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorSemanticParent>>(
'clang_getCursorSemanticParent');
late final _clang_getCursorSemanticParent = _clang_getCursorSemanticParentPtr
.asFunction<DartClang_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_getCursorLexicalParentPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorLexicalParent>>(
'clang_getCursorLexicalParent');
late final _clang_getCursorLexicalParent = _clang_getCursorLexicalParentPtr
.asFunction<DartClang_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_getOverriddenCursorsPtr =
_lookup<ffi.NativeFunction<NativeClang_getOverriddenCursors>>(
'clang_getOverriddenCursors');
late final _clang_getOverriddenCursors = _clang_getOverriddenCursorsPtr
.asFunction<DartClang_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_disposeOverriddenCursorsPtr =
_lookup<ffi.NativeFunction<NativeClang_disposeOverriddenCursors>>(
'clang_disposeOverriddenCursors');
late final _clang_disposeOverriddenCursors =
_clang_disposeOverriddenCursorsPtr
.asFunction<DartClang_disposeOverriddenCursors>();
/// Retrieve the file that is included by the given inclusion directive
/// cursor.
CXFile clang_getIncludedFile(
CXCursor cursor,
) {
return _clang_getIncludedFile(
cursor,
);
}
late final _clang_getIncludedFilePtr =
_lookup<ffi.NativeFunction<NativeClang_getIncludedFile>>(
'clang_getIncludedFile');
late final _clang_getIncludedFile =
_clang_getIncludedFilePtr.asFunction<DartClang_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(
CXTranslationUnit arg0,
CXSourceLocation arg1,
) {
return _clang_getCursor(
arg0,
arg1,
);
}
late final _clang_getCursorPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursor>>('clang_getCursor');
late final _clang_getCursor =
_clang_getCursorPtr.asFunction<DartClang_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_getCursorLocationPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorLocation>>(
'clang_getCursorLocation');
late final _clang_getCursorLocation =
_clang_getCursorLocationPtr.asFunction<DartClang_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_getCursorExtentPtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorExtent>>(
'clang_getCursorExtent');
late final _clang_getCursorExtent =
_clang_getCursorExtentPtr.asFunction<DartClang_getCursorExtent>();
/// Retrieve the type of a CXCursor (if any).
CXType clang_getCursorType(
CXCursor C,
) {
return _clang_getCursorType(
C,
);
}
late final _clang_getCursorTypePtr =
_lookup<ffi.NativeFunction<NativeClang_getCursorType>>(
'clang_getCursorType');
late final _clang_getCursorType =
_clang_getCursorTypePtr.asFunction<DartClang_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_getTypeSpellingPtr =
_lookup<ffi.NativeFunction<NativeClang_getTypeSpelling>>(
'clang_getTypeSpelling');
late final _clang_getTypeSpelling =
_clang_getTypeSpellingPtr.asFunction<DartClang_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_getTypedefDeclUnderlyingTypePtr =
_lookup<ffi.NativeFunction<NativeClang_getTypedefDeclUnderlyingType>>(
'clang_getTypedefDeclUnderlyingType');
late final _clang_getTypedefDeclUnderlyingType =
_clang_getTypedefDeclUnderlyingTypePtr
.asFunction<DartClang_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_getEnumDeclIntegerTypePtr =
_lookup<ffi.NativeFunction<NativeClang_getEnumDeclIntegerType>>(
'clang_getEnumDeclIntegerType');
late final _clang_getEnumDeclIntegerType = _clang_getEnumDeclIntegerTypePtr
.asFunction<DartClang_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_getEnumConstantDeclValuePtr =
_lookup<ffi.NativeFunction<NativeClang_getEnumConstantDeclValue>>(
'clang_getEnumConstantDeclValue');
late final _clang_getEnumConstantDeclValue =
_clang_getEnumConstantDeclValuePtr
.asFunction<DartClang_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_getEnumConstantDeclUnsignedValuePtr =
_lookup<ffi.NativeFunction<NativeClang_getEnumConstantDeclUnsignedValue>>(
'clang_getEnumConstantDeclUnsignedValue');
late final _clang_getEnumConstantDeclUnsignedValue =
_clang_getEnumConstantDeclUnsignedValuePtr
.asFunction<DartClang_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_getFieldDeclBitWidthPtr =
_lookup<ffi.NativeFunction<NativeClang_getFieldDeclBitWidth>>(
'clang_getFieldDeclBitWidth');
late final _clang_getFieldDeclBitWidth = _clang_getFieldDeclBitWidthPtr
.asFunction<DartClang_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_getNumArgumentsPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getNumArguments>>(
'clang_Cursor_getNumArguments');
late final _clang_Cursor_getNumArguments = _clang_Cursor_getNumArgumentsPtr
.asFunction<DartClang_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_getArgumentPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getArgument>>(
'clang_Cursor_getArgument');
late final _clang_Cursor_getArgument =
_clang_Cursor_getArgumentPtr.asFunction<DartClang_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_getNumTemplateArgumentsPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getNumTemplateArguments>>(
'clang_Cursor_getNumTemplateArguments');
late final _clang_Cursor_getNumTemplateArguments =
_clang_Cursor_getNumTemplateArgumentsPtr
.asFunction<DartClang_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_getTemplateArgumentKindPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getTemplateArgumentKind>>(
'clang_Cursor_getTemplateArgumentKind');
late final _clang_Cursor_getTemplateArgumentKind =
_clang_Cursor_getTemplateArgumentKindPtr
.asFunction<DartClang_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_getTemplateArgumentTypePtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getTemplateArgumentType>>(
'clang_Cursor_getTemplateArgumentType');
late final _clang_Cursor_getTemplateArgumentType =
_clang_Cursor_getTemplateArgumentTypePtr
.asFunction<DartClang_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_getTemplateArgumentValuePtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_getTemplateArgumentValue>>(
'clang_Cursor_getTemplateArgumentValue');
late final _clang_Cursor_getTemplateArgumentValue =
_clang_Cursor_getTemplateArgumentValuePtr
.asFunction<DartClang_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_getTemplateArgumentUnsignedValuePtr = _lookup<
ffi.NativeFunction<
NativeClang_Cursor_getTemplateArgumentUnsignedValue>>(
'clang_Cursor_getTemplateArgumentUnsignedValue');
late final _clang_Cursor_getTemplateArgumentUnsignedValue =
_clang_Cursor_getTemplateArgumentUnsignedValuePtr
.asFunction<DartClang_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_equalTypesPtr =
_lookup<ffi.NativeFunction<NativeClang_equalTypes>>('clang_equalTypes');
late final _clang_equalTypes =
_clang_equalTypesPtr.asFunction<DartClang_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_getCanonicalTypePtr =
_lookup<ffi.NativeFunction<NativeClang_getCanonicalType>>(
'clang_getCanonicalType');
late final _clang_getCanonicalType =
_clang_getCanonicalTypePtr.asFunction<DartClang_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_isConstQualifiedTypePtr =
_lookup<ffi.NativeFunction<NativeClang_isConstQualifiedType>>(
'clang_isConstQualifiedType');
late final _clang_isConstQualifiedType = _clang_isConstQualifiedTypePtr
.asFunction<DartClang_isConstQualifiedType>();
/// Determine whether a CXCursor that is a macro, is
/// function like.
int clang_Cursor_isMacroFunctionLike(
CXCursor C,
) {
return _clang_Cursor_isMacroFunctionLike(
C,
);
}
late final _clang_Cursor_isMacroFunctionLikePtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_isMacroFunctionLike>>(
'clang_Cursor_isMacroFunctionLike');
late final _clang_Cursor_isMacroFunctionLike =
_clang_Cursor_isMacroFunctionLikePtr
.asFunction<DartClang_Cursor_isMacroFunctionLike>();
/// Determine whether a CXCursor that is a macro, is a
/// builtin one.
int clang_Cursor_isMacroBuiltin(
CXCursor C,
) {
return _clang_Cursor_isMacroBuiltin(
C,
);
}
late final _clang_Cursor_isMacroBuiltinPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_isMacroBuiltin>>(
'clang_Cursor_isMacroBuiltin');
late final _clang_Cursor_isMacroBuiltin = _clang_Cursor_isMacroBuiltinPtr
.asFunction<DartClang_Cursor_isMacroBuiltin>();
/// Determine whether a CXCursor that is a function declaration, is an
/// inline declaration.
int clang_Cursor_isFunctionInlined(
CXCursor C,
) {
return _clang_Cursor_isFunctionInlined(
C,
);
}
late final _clang_Cursor_isFunctionInlinedPtr =
_lookup<ffi.NativeFunction<NativeClang_Cursor_isFunctionInlined>>(
'clang_Cursor_isFunctionInlined');
late final _clang_Cursor_isFunctionInlined =
_clang_Cursor_isFunctionInlinedPtr
.asFunction<DartClang_Cursor_isFunctionInlined>();
/// Determine whether a CXType has the "volatile" qualifier set,
/// without looking through typedefs that may have added "volatile" at
/// a different level.
int clang_isVolatileQualifiedType(
CXType T,
) {
return _clang_isVolatileQualifiedType(
T,
);
}
late final _clang_isVolatileQualifiedTypePtr =
_lookup<ffi.NativeFunction<NativeClang_isVolatileQualifiedType>>(
'clang_isVolatileQualifiedType');
late final _clang_isVolatileQualifiedType = _clang_isVolatileQualifiedTypePtr
.asFunction<DartClang_isVolatileQualifiedType>();
/// Determine whether a CXType has the "restrict" qualifier set,
/// without looking through typedefs that may have added "restrict" at a
/// different level.
int clang_isRestrictQualifiedType(
CXType T,
) {
return _clang_isRestrictQualifiedType(
T,
);
}
late final _clang_isRestrictQualifiedTypePtr =
_lookup<ffi.NativeFunction<NativeClang_isRestrictQualifiedType>>(
'clang_isRestrictQualifiedType');
late final _clang_isRestrictQualifiedType = _clang_isRestrictQualifiedTypePtr
.asFunction<DartClang_isRestrictQualifiedType>();
/// Returns the address space of the given type.
int clang_getAddressSpace(
CXType T,
) {
return _clang_getAddressSpace(
T,
);
}
late final _clang_getAddressSpacePtr =
_lookup<ffi.NativeFunction<NativeClang_getAddressSpace>>(
'clang_getAddressSpace');
late final _clang_getAddressSpace =
_clang_getAddressSpacePtr.asFunction<DartClang_getAddressSpace>();
/// Returns the typedef name of the given type.
CXString clang_getTypedefName(
CXType CT,
) {
return _clang_getTypedefName(
CT,
);
}
late final _clang_getTypedefNamePtr =
_lookup<ffi.NativeFunction<NativeClang_getTypedefName>>(
'clang_getTypedefName');
late final _clang_getTypedefName =
_clang_getTypedefNamePtr.asFunction<DartClang_getTypedefName>();
/// For pointer types, returns the type of the pointee.
CXType clang_getPointeeType(
CXType T,
) {
return _clang_getPointeeType(
T,
);