libclang-bindings-0.1.0.0: src/Clang/LowLevel/FFI.hs
{-# LANGUAGE CPP #-}
{-| this module is autogenerated with cabal run libclang-bootstrap -}
module Clang.LowLevel.FFI (module Clang.LowLevel.FFI) where
#include "clang_config.h"
import Clang.Enum.Simple
import Clang.Internal.ByValue
import Clang.Internal.ConstPtr
import Clang.LowLevel.Core.Enums
import Clang.LowLevel.Core.Pointers
import Clang.LowLevel.Core.Structs
import Foreign.C.Types
import Foreign.Ptr
-- *** Top-level ***
-- <https://clang.llvm.org/doxygen/group__CINDEX.html>
foreign import capi unsafe "clang_wrappers.h clang_createIndex"
nowrapper_createIndex :: CInt -> CInt -> IO CXIndex
foreign import capi unsafe "clang_wrappers.h clang_disposeIndex"
nowrapper_disposeIndex :: CXIndex -> IO ()
-- OMITTED: CXIndex clang_createIndexWithOptions (const CXIndexOptions * options);
-- OMITTED: void clang_CXIndex_setGlobalOptions (CXIndex, unsigned options);
-- OMITTED: unsigned clang_CXIndex_getGlobalOptions (CXIndex);
-- OMITTED: void clang_CXIndex_setInvocationEmissionPathOption (CXIndex, const char * Path);
-- OMITTED: unsigned clang_isFileMultipleIncludeGuarded (CXTranslationUnit tu, CXFile file);
foreign import capi unsafe "clang_wrappers.h clang_getFile"
nowrapper_getFile :: CXTranslationUnit -> ConstPtr CChar -> IO CXFile
foreign import capi unsafe "clang_wrappers.h clang_getFileContents"
nowrapper_getFileContents :: CXTranslationUnit -> CXFile -> Ptr CSize -> IO (ConstPtr CChar)
foreign import capi unsafe "clang_wrappers.h"
wrap_getLocation :: CXTranslationUnit -> CXFile -> CUInt -> CUInt -> W CXSourceLocation_ -> IO ()
-- OMITTED: CXSourceLocation clang_getLocationForOffset (CXTranslationUnit tu, CXFile file, unsigned offset);
-- OMITTED: CXSourceRangeList * clang_getSkippedRanges (CXTranslationUnit tu, CXFile file);
-- OMITTED: CXSourceRangeList * clang_getAllSkippedRanges (CXTranslationUnit tu);
foreign import capi unsafe "clang_wrappers.h clang_getNumDiagnostics"
nowrapper_getNumDiagnostics :: CXTranslationUnit -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_getDiagnostic"
nowrapper_getDiagnostic :: CXTranslationUnit -> CUInt -> IO CXDiagnostic
-- OMITTED: CXDiagnosticSet clang_getDiagnosticSetFromTU (CXTranslationUnit Unit);
-- *** Diagnostic reporting ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__DIAG.html>
foreign import capi unsafe "clang_wrappers.h clang_getNumDiagnosticsInSet"
nowrapper_getNumDiagnosticsInSet :: CXDiagnosticSet -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_getDiagnosticInSet"
nowrapper_getDiagnosticInSet :: CXDiagnosticSet -> CUInt -> IO CXDiagnostic
-- OMITTED: CXDiagnosticSet clang_loadDiagnostics (const char * file, enum CXLoadDiag_Error * error, CXString * errorString);
foreign import capi unsafe "clang_wrappers.h clang_disposeDiagnosticSet"
nowrapper_disposeDiagnosticSet :: CXDiagnosticSet -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_getChildDiagnostics"
nowrapper_getChildDiagnostics :: CXDiagnostic -> IO CXDiagnosticSet
foreign import capi unsafe "clang_wrappers.h clang_disposeDiagnostic"
nowrapper_disposeDiagnostic :: CXDiagnostic -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_formatDiagnostic :: CXDiagnostic -> CUInt -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_defaultDiagnosticDisplayOptions"
nowrapper_defaultDiagnosticDisplayOptions :: IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_getDiagnosticSeverity"
nowrapper_getDiagnosticSeverity :: CXDiagnostic -> IO (SimpleEnum CXDiagnosticSeverity)
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticLocation :: CXDiagnostic -> W CXSourceLocation_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticSpelling :: CXDiagnostic -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticOption :: CXDiagnostic -> W CXString_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_getDiagnosticCategory"
nowrapper_getDiagnosticCategory :: CXDiagnostic -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticCategoryText :: CXDiagnostic -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_getDiagnosticNumRanges"
nowrapper_getDiagnosticNumRanges :: CXDiagnostic -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticRange :: CXDiagnostic -> CUInt -> W CXSourceRange_ -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_getDiagnosticNumFixIts"
nowrapper_getDiagnosticNumFixIts :: CXDiagnostic -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getDiagnosticFixIt :: CXDiagnostic -> CUInt -> W CXSourceRange_ -> W CXString_ -> IO ()
-- *** File manipulation routines ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__FILES.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getFileName :: CXFile -> W CXString_ -> IO ()
-- OMITTED: time_t clang_getFileTime (CXFile SFile);
-- OMITTED: int clang_getFileUniqueID (CXFile file, CXFileUniqueID * outID);
-- OMITTED: int clang_File_isEqual (CXFile file1, CXFile file2);
-- OMITTED: CXString clang_File_tryGetRealPathName (CXFile file);
-- *** Physical source locations ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__LOCATIONS.html>
-- OMITTED: CXSourceLocation clang_getNullLocation (void);
-- OMITTED: unsigned clang_equalLocations (CXSourceLocation loc1, CXSourceLocation loc2);
#ifdef HAVE_CLANG_ISBEFOREINTRANSLATIONUNIT
foreign import capi unsafe "clang_wrappers.h"
wrap_isBeforeInTranslationUnit :: R CXSourceLocation_ -> R CXSourceLocation_ -> IO CUInt
#endif
-- OMITTED: int clang_Location_isInSystemHeader (CXSourceLocation location);
foreign import capi unsafe "clang_wrappers.h"
wrap_Location_isFromMainFile :: R CXSourceLocation_ -> IO CInt
-- OMITTED: CXSourceRange clang_getNullRange (void);
foreign import capi unsafe "clang_wrappers.h"
wrap_getRange :: R CXSourceLocation_ -> R CXSourceLocation_ -> W CXSourceRange_ -> IO ()
-- OMITTED: unsigned clang_equalRanges (CXSourceRange range1, CXSourceRange range2);
foreign import capi unsafe "clang_wrappers.h"
wrap_Range_isNull :: R CXSourceRange_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getExpansionLocation :: R CXSourceLocation_ -> Ptr CXFile -> Ptr CUInt -> Ptr CUInt -> Ptr CUInt -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getPresumedLocation :: R CXSourceLocation_ -> W CXString_ -> Ptr CUInt -> Ptr CUInt -> IO ()
-- OMITTED: void clang_getInstantiationLocation (CXSourceLocation location, CXFile * file, unsigned * line, unsigned * column, unsigned * offset);
foreign import capi unsafe "clang_wrappers.h"
wrap_getSpellingLocation :: R CXSourceLocation_ -> Ptr CXFile -> Ptr CUInt -> Ptr CUInt -> Ptr CUInt -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getFileLocation :: R CXSourceLocation_ -> Ptr CXFile -> Ptr CUInt -> Ptr CUInt -> Ptr CUInt -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getRangeStart :: R CXSourceRange_ -> W CXSourceLocation_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getRangeEnd :: R CXSourceRange_ -> W CXSourceLocation_ -> IO ()
-- OMITTED: void clang_disposeSourceRangeList (CXSourceRangeList * ranges);
-- *** String manipulation routines ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__STRING.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getCString :: R CXString_ -> IO (ConstPtr CChar)
foreign import capi unsafe "clang_wrappers.h"
wrap_disposeString :: R CXString_ -> IO ()
-- OMITTED: void clang_disposeStringSet (CXStringSet * set);
-- *** Translation unit manipulation ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__TRANSLATION__UNIT.html>
-- OMITTED: CXString clang_getTranslationUnitSpelling (CXTranslationUnit CTUnit);
-- OMITTED: CXTranslationUnit clang_createTranslationUnitFromSourceFile (CXIndex CIdx, const char * source_filename, int num_clang_command_line_args, const char * const * clang_command_line_args, unsigned num_unsaved_files, struct CXUnsavedFile * unsaved_files);
-- OMITTED: CXTranslationUnit clang_createTranslationUnit (CXIndex CIdx, const char * ast_filename);
-- OMITTED: enum CXErrorCode clang_createTranslationUnit2 (CXIndex CIdx, const char * ast_filename, CXTranslationUnit * out_TU);
-- OMITTED: unsigned clang_defaultEditingTranslationUnitOptions (void);
foreign import capi unsafe "clang_wrappers.h clang_parseTranslationUnit"
nowrapper_parseTranslationUnit :: CXIndex -> ConstPtr CChar -> ConstPtr (ConstPtr CChar) -> CInt -> Ptr CXUnsavedFile -> CUInt -> CUInt -> IO CXTranslationUnit
foreign import capi unsafe "clang_wrappers.h clang_parseTranslationUnit2"
nowrapper_parseTranslationUnit2 :: CXIndex -> ConstPtr CChar -> ConstPtr (ConstPtr CChar) -> CInt -> Ptr CXUnsavedFile -> CUInt -> CUInt -> Ptr CXTranslationUnit -> IO (SimpleEnum (Maybe CXErrorCode))
-- OMITTED: enum CXErrorCode clang_parseTranslationUnit2FullArgv (CXIndex CIdx, const char * source_filename, const char * const * command_line_args, int num_command_line_args, struct CXUnsavedFile * unsaved_files, unsigned num_unsaved_files, unsigned options, CXTranslationUnit * out_TU);
-- OMITTED: unsigned clang_defaultSaveOptions (CXTranslationUnit TU);
-- OMITTED: int clang_saveTranslationUnit (CXTranslationUnit TU, const char * FileName, unsigned options);
-- OMITTED: unsigned clang_suspendTranslationUnit (CXTranslationUnit TU);
foreign import capi unsafe "clang_wrappers.h clang_disposeTranslationUnit"
nowrapper_disposeTranslationUnit :: CXTranslationUnit -> IO ()
-- OMITTED: unsigned clang_defaultReparseOptions (CXTranslationUnit TU);
-- OMITTED: int clang_reparseTranslationUnit (CXTranslationUnit TU, unsigned num_unsaved_files, struct CXUnsavedFile * unsaved_files, unsigned options);
-- OMITTED: const char * clang_getTUResourceUsageName (enum CXTUResourceUsageKind kind);
-- OMITTED: CXTUResourceUsage clang_getCXTUResourceUsage (CXTranslationUnit TU);
-- OMITTED: void clang_disposeCXTUResourceUsage (CXTUResourceUsage usage);
foreign import capi unsafe "clang_wrappers.h clang_getTranslationUnitTargetInfo"
nowrapper_getTranslationUnitTargetInfo :: CXTranslationUnit -> IO CXTargetInfo
foreign import capi unsafe "clang_wrappers.h clang_TargetInfo_dispose"
nowrapper_TargetInfo_dispose :: CXTargetInfo -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_TargetInfo_getTriple :: CXTargetInfo -> W CXString_ -> IO ()
-- OMITTED: int clang_TargetInfo_getPointerWidth (CXTargetInfo Info);
-- *** Cursor manipulations ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__CURSOR__MANIP.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getNullCursor :: W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getTranslationUnitCursor :: CXTranslationUnit -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_equalCursors :: R CXCursor_ -> R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isNull :: R CXCursor_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_hashCursor :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorKind :: R CXCursor_ -> IO (SimpleEnum CXCursorKind)
foreign import capi unsafe "clang_wrappers.h clang_isDeclaration"
nowrapper_isDeclaration :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_isInvalidDeclaration :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isReference"
nowrapper_isReference :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isExpression"
nowrapper_isExpression :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isStatement"
nowrapper_isStatement :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isAttribute"
nowrapper_isAttribute :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_hasAttrs :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isInvalid"
nowrapper_isInvalid :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isTranslationUnit"
nowrapper_isTranslationUnit :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isPreprocessing"
nowrapper_isPreprocessing :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_isUnexposed"
nowrapper_isUnexposed :: SimpleEnum CXCursorKind -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorLinkage :: R CXCursor_ -> IO (SimpleEnum CXLinkageKind)
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorVisibility :: R CXCursor_ -> IO (SimpleEnum CXVisibilityKind)
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorAvailability :: R CXCursor_ -> IO (SimpleEnum CXAvailabilityKind)
-- OMITTED: int clang_getCursorPlatformAvailability (CXCursor cursor, int * always_deprecated, CXString * deprecated_message, int * always_unavailable, CXString * unavailable_message, CXPlatformAvailability * availability, int availability_size);
-- OMITTED: void clang_disposeCXPlatformAvailability (CXPlatformAvailability * availability);
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getVarDeclInitializer :: R CXCursor_ -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_hasVarDeclGlobalStorage :: R CXCursor_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_hasVarDeclExternalStorage :: R CXCursor_ -> IO CInt
-- OMITTED: enum CXLanguageKind clang_getCursorLanguage (CXCursor cursor);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorTLSKind :: R CXCursor_ -> IO (SimpleEnum CXTLSKind)
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getTranslationUnit :: R CXCursor_ -> IO CXTranslationUnit
-- OMITTED: CXCursorSet clang_createCXCursorSet (void);
-- OMITTED: void clang_disposeCXCursorSet (CXCursorSet cset);
-- OMITTED: unsigned clang_CXCursorSet_contains (CXCursorSet cset, CXCursor cursor);
-- OMITTED: unsigned clang_CXCursorSet_insert (CXCursorSet cset, CXCursor cursor);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorSemanticParent :: R CXCursor_ -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorLexicalParent :: R CXCursor_ -> W CXCursor_ -> IO ()
-- OMITTED: void clang_getOverriddenCursors (CXCursor cursor, CXCursor * * overridden, unsigned * num_overridden);
-- OMITTED: void clang_disposeOverriddenCursors (CXCursor * overridden);
foreign import capi unsafe "clang_wrappers.h"
wrap_getIncludedFile :: R CXCursor_ -> IO CXFile
-- *** Mapping between cursors and source code ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__CURSOR__SOURCE.html>
-- OMITTED: CXCursor clang_getCursor (CXTranslationUnit TU, CXSourceLocation Source);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorLocation :: R CXCursor_ -> W CXSourceLocation_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorExtent :: R CXCursor_ -> W CXSourceRange_ -> IO ()
-- *** Type information for CXCursors ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__TYPES.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorType :: R CXCursor_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getTypeSpelling :: R CXType_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getTypedefDeclUnderlyingType :: R CXCursor_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getEnumDeclIntegerType :: R CXCursor_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getEnumConstantDeclValue :: R CXCursor_ -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_getEnumConstantDeclUnsignedValue :: R CXCursor_ -> IO CULLong
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isBitField :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getFieldDeclBitWidth :: R CXCursor_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getNumArguments :: R CXCursor_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getArgument :: R CXCursor_ -> CUInt -> W CXCursor_ -> IO ()
-- OMITTED: int clang_Cursor_getNumTemplateArguments (CXCursor C);
-- OMITTED: enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind (CXCursor C, unsigned I);
-- OMITTED: CXType clang_Cursor_getTemplateArgumentType (CXCursor C, unsigned I);
-- OMITTED: long long clang_Cursor_getTemplateArgumentValue (CXCursor C, unsigned I);
-- OMITTED: unsigned long long clang_Cursor_getTemplateArgumentUnsignedValue (CXCursor C, unsigned I);
foreign import capi unsafe "clang_wrappers.h"
wrap_equalTypes :: R CXType_ -> R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getCanonicalType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_isConstQualifiedType :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isMacroFunctionLike :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isMacroBuiltin :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isFunctionInlined :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_isVolatileQualifiedType :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_isRestrictQualifiedType :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getAddressSpace :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getTypedefName :: R CXType_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getPointeeType :: R CXType_ -> W CXType_ -> IO ()
-- OMITTED: CXType clang_getUnqualifiedType (CXType CT); // NOTE: does not exist before clang-16, so we define a custom wrapper in clang_wrappers.h
-- OMITTED: CXType clang_getNonReferenceType (CXType CT);
foreign import capi unsafe "clang_wrappers.h"
wrap_getTypeDeclaration :: R CXType_ -> W CXCursor_ -> IO ()
-- OMITTED: CXString clang_getDeclObjCTypeEncoding (CXCursor C);
-- OMITTED: CXString clang_Type_getObjCEncoding (CXType type);
foreign import capi unsafe "clang_wrappers.h"
wrap_getTypeKindSpelling :: SimpleEnum CXTypeKind -> W CXString_ -> IO ()
-- OMITTED: enum CXCallingConv clang_getFunctionTypeCallingConv (CXType T);
foreign import capi unsafe "clang_wrappers.h"
wrap_getResultType :: R CXType_ -> W CXType_ -> IO ()
-- OMITTED: int clang_getExceptionSpecificationType (CXType T);
foreign import capi unsafe "clang_wrappers.h"
wrap_getNumArgTypes :: R CXType_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getArgType :: R CXType_ -> CUInt -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getObjCObjectBaseType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getNumObjCProtocolRefs :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getObjCProtocolDecl :: R CXType_ -> CUInt -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getNumObjCTypeArgs :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getObjCTypeArg :: R CXType_ -> CUInt -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_isFunctionTypeVariadic :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorResultType :: R CXCursor_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorExceptionSpecificationType :: R CXCursor_ -> IO CInt
foreign import capi unsafe "clang_wrappers.h"
wrap_isPODType :: R CXType_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getElementType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getNumElements :: R CXType_ -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_getArrayElementType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getArraySize :: R CXType_ -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getNamedType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_isTransparentTagTypedef :: R CXType_ -> IO CUInt
-- OMITTED: enum CXTypeNullabilityKind clang_Type_getNullability (CXType T);
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getAlignOf :: R CXType_ -> IO CLLong
-- OMITTED: CXType clang_Type_getClassType (CXType T);
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getSizeOf :: R CXType_ -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getOffsetOf :: R CXType_ -> ConstPtr CChar -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getModifiedType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Type_getValueType :: R CXType_ -> W CXType_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getOffsetOfField :: R CXCursor_ -> IO CLLong
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isAnonymous :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_isAnonymousRecordDecl :: R CXCursor_ -> IO CUInt
-- OMITTED: unsigned clang_Cursor_isInlineNamespace (CXCursor C);
-- OMITTED: int clang_Type_getNumTemplateArguments (CXType T);
-- OMITTED: CXType clang_Type_getTemplateArgumentAsType (CXType T, unsigned i);
-- OMITTED: enum CXRefQualifierKind clang_Type_getCXXRefQualifier (CXType T);
-- OMITTED: unsigned clang_isVirtualBase (CXCursor C);
-- OMITTED: long long clang_getOffsetOfBase (CXCursor Parent, CXCursor Base);
-- OMITTED: enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier (CXCursor C);
-- OMITTED: enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode (CXCursor C);
-- OMITTED: CXString clang_Cursor_getBinaryOpcodeStr (enum CX_BinaryOperatorKind Op);
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getStorageClass :: R CXCursor_ -> IO (SimpleEnum CX_StorageClass)
-- OMITTED: unsigned clang_getNumOverloadedDecls (CXCursor cursor);
-- OMITTED: CXCursor clang_getOverloadedDecl (CXCursor cursor, unsigned index);
-- *** Traversing the AST with cursors ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__CURSOR__TRAVERSAL.html>
-- OMITTED: unsigned clang_visitChildren (CXCursor parent, CXCursorVisitor visitor, CXClientData client_data);
-- OMITTED: unsigned clang_visitChildrenWithBlock (CXCursor parent, CXCursorVisitorBlock block);
-- *** Cross-referencing in the AST ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__CURSOR__XREF.html>
-- OMITTED: CXString clang_getCursorUSR (CXCursor);
-- OMITTED: CXString clang_constructUSR_ObjCClass (const char * class_name);
-- OMITTED: CXString clang_constructUSR_ObjCCategory (const char * class_name, const char * category_name);
-- OMITTED: CXString clang_constructUSR_ObjCProtocol (const char * protocol_name);
-- OMITTED: CXString clang_constructUSR_ObjCIvar (const char * name, CXString classUSR);
-- OMITTED: CXString clang_constructUSR_ObjCMethod (const char * name, unsigned isInstanceMethod, CXString classUSR);
-- OMITTED: CXString clang_constructUSR_ObjCProperty (const char * property, CXString classUSR);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorSpelling :: R CXCursor_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getSpellingNameRange :: R CXCursor_ -> CUInt -> CUInt -> W CXSourceRange_ -> IO ()
-- OMITTED: unsigned clang_PrintingPolicy_getProperty (CXPrintingPolicy Policy, enum CXPrintingPolicyProperty Property);
-- OMITTED: void clang_PrintingPolicy_setProperty (CXPrintingPolicy Policy, enum CXPrintingPolicyProperty Property, unsigned Value);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorPrintingPolicy :: R CXCursor_ -> IO CXPrintingPolicy
foreign import capi unsafe "clang_wrappers.h clang_PrintingPolicy_dispose"
nowrapper_PrintingPolicy_dispose :: CXPrintingPolicy -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorPrettyPrinted :: R CXCursor_ -> CXPrintingPolicy -> W CXString_ -> IO ()
-- OMITTED: CXString clang_getTypePrettyPrinted (CXType CT, CXPrintingPolicy cxPolicy);
-- OMITTED: CXString clang_getFullyQualifiedName (CXType CT, CXPrintingPolicy Policy, unsigned WithGlobalNsPrefix);
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorDisplayName :: R CXCursor_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorReferenced :: R CXCursor_ -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorDefinition :: R CXCursor_ -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_isCursorDefinition :: R CXCursor_ -> IO CUInt
foreign import capi unsafe "clang_wrappers.h"
wrap_getCanonicalCursor :: R CXCursor_ -> W CXCursor_ -> IO ()
-- OMITTED: int clang_Cursor_getObjCSelectorIndex (CXCursor);
-- OMITTED: int clang_Cursor_isDynamicCall (CXCursor C);
-- OMITTED: CXType clang_Cursor_getReceiverType (CXCursor C);
-- OMITTED: unsigned clang_Cursor_getObjCPropertyAttributes (CXCursor C, unsigned reserved);
-- OMITTED: CXString clang_Cursor_getObjCPropertyGetterName (CXCursor C);
-- OMITTED: CXString clang_Cursor_getObjCPropertySetterName (CXCursor C);
-- OMITTED: unsigned clang_Cursor_getObjCDeclQualifiers (CXCursor C);
-- OMITTED: unsigned clang_Cursor_isObjCOptional (CXCursor C);
-- OMITTED: unsigned clang_Cursor_isVariadic (CXCursor C);
-- OMITTED: unsigned clang_Cursor_isExternalSymbol (CXCursor C, CXString * language, CXString * definedIn, unsigned * isGenerated);
-- OMITTED: CXSourceRange clang_Cursor_getCommentRange (CXCursor C);
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getRawCommentText :: R CXCursor_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_getBriefCommentText :: R CXCursor_ -> W CXString_ -> IO ()
-- *** Token extraction and manipulation ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__LEX.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getToken :: CXTranslationUnit -> R CXSourceLocation_ -> IO (Ptr CXToken_)
foreign import capi unsafe "clang_wrappers.h"
wrap_getTokenKind :: Ptr CXToken_ -> IO (SimpleEnum CXTokenKind)
foreign import capi unsafe "clang_wrappers.h"
wrap_getTokenSpelling :: CXTranslationUnit -> Ptr CXToken_ -> W CXString_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getTokenLocation :: CXTranslationUnit -> Ptr CXToken_ -> W CXSourceLocation_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_getTokenExtent :: CXTranslationUnit -> Ptr CXToken_ -> W CXSourceRange_ -> IO ()
foreign import capi unsafe "clang_wrappers.h"
wrap_tokenize :: CXTranslationUnit -> R CXSourceRange_ -> Ptr (Ptr CXToken_) -> Ptr CUInt -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_annotateTokens"
nowrapper_annotateTokens :: CXTranslationUnit -> Ptr CXToken_ -> CUInt -> W CXCursor_ -> IO ()
foreign import capi unsafe "clang_wrappers.h clang_disposeTokens"
nowrapper_disposeTokens :: CXTranslationUnit -> Ptr CXToken_ -> CUInt -> IO ()
-- *** Debugging facilities ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__DEBUG.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getCursorKindSpelling :: SimpleEnum CXCursorKind -> W CXString_ -> IO ()
-- OMITTED: void clang_getDefinitionSpellingAndExtent (CXCursor, const char * * startBuf, const char * * endBuf, unsigned * startLine, unsigned * startColumn, unsigned * endLine, unsigned * endColumn);
-- OMITTED: void clang_enableStackTraces (void);
-- OMITTED: void clang_executeOnThread (void(*fn)(void *), void * user_data, unsigned stack_size); // NOTE: function pointer syntax not supported by the libclang-bootstrap parser
-- *** Miscellaneous utility functions ***
-- <https://clang.llvm.org/doxygen/group__CINDEX__MISC.html>
foreign import capi unsafe "clang_wrappers.h"
wrap_getClangVersion :: W CXString_ -> IO ()
-- OMITTED: void clang_toggleCrashRecovery (unsigned isEnabled);
-- OMITTED: void clang_getInclusions (CXTranslationUnit tu, CXInclusionVisitor visitor, CXClientData client_data);
foreign import capi unsafe "clang_wrappers.h"
wrap_Cursor_Evaluate :: R CXCursor_ -> IO CXEvalResult
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getKind"
nowrapper_EvalResult_getKind :: CXEvalResult -> IO (SimpleEnum CXEvalResultKind)
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getAsInt"
nowrapper_EvalResult_getAsInt :: CXEvalResult -> IO CInt
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getAsLongLong"
nowrapper_EvalResult_getAsLongLong :: CXEvalResult -> IO CLLong
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_isUnsignedInt"
nowrapper_EvalResult_isUnsignedInt :: CXEvalResult -> IO CUInt
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getAsUnsigned"
nowrapper_EvalResult_getAsUnsigned :: CXEvalResult -> IO CULLong
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getAsDouble"
nowrapper_EvalResult_getAsDouble :: CXEvalResult -> IO CDouble
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_getAsStr"
nowrapper_EvalResult_getAsStr :: CXEvalResult -> IO (ConstPtr CChar)
foreign import capi unsafe "clang_wrappers.h clang_EvalResult_dispose"
nowrapper_EvalResult_dispose :: CXEvalResult -> IO ()