clang

package
v0.9.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 6

Documentation

Index

Constants

View Source
const (
	LLGoFiles   = "$(llvm-config --cflags): _wrap/cursor.cpp"
	LLGoPackage = "link: -L$(llvm-config --libdir) -lclang; -lclang"
)
View Source
const (
	/* Declarations */
	/**
	 * A declaration whose specific kind is not exposed via this
	 * interface.
	 *
	 * Unexposed declarations have the same operations as any other kind
	 * of declaration; one can extract their location information,
	 * spelling, find their definitions, etc. However, the specific kind
	 * of the declaration is not reported.
	 */
	CursorUnexposedDecl CursorKind = iota + 1

	/** A C or C++ struct. */
	CursorStructDecl

	/** A C or C++ union. */
	CursorUnionDecl

	/** A C++ class. */
	CursorClassDecl

	/** An enumeration. */
	CursorEnumDecl

	/**
	 * A field (in C) or non-static data member (in C++) in a
	 * struct, union, or C++ class.
	 */
	CursorFieldDecl

	/** An enumerator constant. */
	CursorEnumConstantDecl

	/** A function. */
	CursorFunctionDecl

	/** A variable. */
	CursorVarDecl

	/** A function or method parameter. */
	CursorParmDecl

	/** An Objective-C \@interface. */
	CursorObjCInterfaceDecl

	/** An Objective-C \@interface for a category. */
	CursorObjCCategoryDecl

	/** An Objective-C \@protocol declaration. */
	CursorObjCProtocolDecl

	/** An Objective-C \@property declaration. */
	CursorObjCPropertyDecl

	/** An Objective-C instance variable. */
	CursorObjCIvarDecl

	/** An Objective-C instance method. */
	CursorObjCInstanceMethodDecl

	/** An Objective-C class method. */
	CursorObjCClassMethodDecl

	/** An Objective-C \@implementation. */
	CursorObjCImplementationDecl

	/** An Objective-C \@implementation for a category. */
	CursorObjCCategoryImplDecl

	/** A typedef. */
	CursorTypedefDecl

	/** A C++ class method. */
	CursorCXXMethod

	/** A C++ namespace. */
	CursorNamespace

	/** A linkage specification, e.g. 'extern "C"'. */
	CursorLinkageSpec

	/** A C++ constructor. */
	CursorConstructor

	/** A C++ destructor. */
	CursorDestructor

	/** A C++ conversion function. */
	CursorConversionFunction

	/** A C++ template type parameter. */
	CursorTemplateTypeParameter

	/** A C++ non-type template parameter. */
	CursorNonTypeTemplateParameter

	/** A C++ template template parameter. */
	CursorTemplateTemplateParameter

	/** A C++ function template. */
	CursorFunctionTemplate

	/** A C++ class template. */
	CursorClassTemplate

	/** A C++ class template partial specialization. */
	CursorClassTemplatePartialSpecialization

	/** A C++ namespace alias declaration. */
	CursorNamespaceAlias

	/** A C++ using directive. */
	CursorUsingDirective

	/** A C++ using declaration. */
	CursorUsingDeclaration

	/** A C++ alias declaration */
	CursorTypeAliasDecl

	/** An Objective-C \@synthesize definition. */
	CursorObjCSynthesizeDecl

	/** An Objective-C \@dynamic definition. */
	CursorObjCDynamicDecl

	/** An access specifier. */
	CursorCXXAccessSpecifier

	CursorFirstDecl = CursorUnexposedDecl
	CursorLastDecl  = CursorCXXAccessSpecifier

	/* References */
	CursorFirstRef          = 40
	CursorObjCSuperClassRef = iota - 2 //40
	CursorObjCProtocolRef
	CursorObjCClassRef

	/**
	 * A reference to a type declaration.
	 *
	 * A type reference occurs anywhere where a type is named but not
	 * declared. For example, given:
	 *
	 * \code
	 * typedef unsigned size_type;
	 * size_type size;
	 * \endcode
	 *
	 * The typedef is a declaration of size_type (CXCursor_TypedefDecl),
	 * while the type of the variable "size" is referenced. The cursor
	 * referenced by the type of size is the typedef for size_type.
	 */
	CursorTypeRef

	CursorCXXBaseSpecifier

	/**
	 * A reference to a class template, function template, template
	 * template parameter, or class template partial specialization.
	 */
	CursorTemplateRef

	/**
	 * A reference to a namespace or namespace alias.
	 */
	CursorNamespaceRef

	/**
	 * A reference to a member of a struct, union, or class that occurs in
	 * some non-expression context, e.g., a designated initializer.
	 */
	CursorMemberRef

	/**
	 * A reference to a labeled statement.
	 *
	 * This cursor kind is used to describe the jump to "start_over" in the
	 * goto statement in the following example:
	 *
	 * \code
	 *   start_over:
	 *     ++counter;
	 *
	 *     goto start_over;
	 * \endcode
	 *
	 * A label reference cursor refers to a label statement.
	 */
	CursorLabelRef

	/**
	 * A reference to a set of overloaded functions or function templates
	 * that has not yet been resolved to a specific function or function template.
	 *
	 * An overloaded declaration reference cursor occurs in C++ templates where
	 * a dependent name refers to a function. For example:
	 *
	 * \code
	 * template<typename T> void swap(T&, T&);
	 *
	 * struct X { ... };
	 * void swap(X&, X&);
	 *
	 * template<typename T>
	 * void reverse(T* first, T* last) {
	 *   while (first < last - 1) {
	 *     swap(*first, *--last);
	 *     ++first;
	 *   }
	 * }
	 *
	 * struct Y { };
	 * void swap(Y&, Y&);
	 * \endcode
	 *
	 * Here, the identifier "swap" is associated with an overloaded declaration
	 * reference. In the template definition, "swap" refers to either of the two
	 * "swap" functions declared above, so both results will be available. At
	 * instantiation time, "swap" may also refer to other functions found via
	 * argument-dependent lookup (e.g., the "swap" function at the end of the
	 * example).
	 *
	 * The functions \c clang_getNumOverloadedDecls() and
	 * \c clang_getOverloadedDecl() can be used to retrieve the definitions
	 * referenced by this cursor.
	 */
	CursorOverloadedDeclRef

	/**
	 * A reference to a variable that occurs in some non-expression
	 * context, e.g., a C++ lambda capture list.
	 */
	CursorVariableRef

	CursorLastRef = CursorVariableRef

	/* Error conditions */
	CursorFirstInvalid = 70
	CursorInvalidFile  = iota + 15 //70
	CursorNoDeclFound
	CursorNotImplemented
	CursorInvalidCode
	CursorLastInvalid = CursorInvalidCode

	/* Expressions */
	CursorFirstExpr = 100

	/**
	 * An expression whose specific kind is not exposed via this
	 * interface.
	 *
	 * Unexposed expressions have the same operations as any other kind
	 * of expression; one can extract their location information,
	 * spelling, children, etc. However, the specific kind of the
	 * expression is not reported.
	 */
	CursorUnexposedExpr = iota + 39 //100

	/**
	 * An expression that refers to some value declaration, such
	 * as a function, variable, or enumerator.
	 */
	CursorDeclRefExpr

	/**
	 * An expression that refers to a member of a struct, union,
	 * class, Objective-C class, etc.
	 */
	CursorMemberRefExpr

	/** An expression that calls a function. */
	CursorCallExpr

	/** An expression that sends a message to an Objective-C
	object or class. */
	CursorObjCMessageExpr

	/** An expression that represents a block literal. */
	CursorBlockExpr

	/** An integer literal.
	 */
	CursorIntegerLiteral

	/** A floating point number literal.
	 */
	CursorFloatingLiteral

	/** An imaginary number literal.
	 */
	CursorImaginaryLiteral

	/** A string literal.
	 */
	CursorStringLiteral

	/** A character literal.
	 */
	CursorCharacterLiteral

	/** A parenthesized expression, e.g. "(1)".
	 *
	 * This AST node is only formed if full location information is requested.
	 */
	CursorParenExpr

	/** This represents the unary-expression's (except sizeof and
	 * alignof).
	 */
	CursorUnaryOperator

	/** [C99 6.5.2.1] Array Subscripting.
	 */
	CursorArraySubscriptExpr

	/** A builtin binary operation expression such as "x + y" or
	 * "x <= y".
	 */
	CursorBinaryOperator

	/** Compound assignment such as "+=".
	 */
	CursorCompoundAssignOperator

	/** The ?: ternary operator.
	 */
	CursorConditionalOperator

	/** An explicit cast in C (C99 6.5.4) or a C-style cast in C++
	 * (C++ [expr.cast]), which uses the syntax (Type)expr.
	 *
	 * For example: (int)f.
	 */
	CursorCStyleCastExpr

	/** [C99 6.5.2.5]
	 */
	CursorCompoundLiteralExpr

	/** Describes an C or C++ initializer list.
	 */
	CursorInitListExpr

	/** The GNU address of label extension, representing &&label.
	 */
	CursorAddrLabelExpr

	/** This is the GNU Statement Expression extension: ({int X=4; X;})
	 */
	CursorStmtExpr

	/** Represents a C11 generic selection.
	 */
	CursorGenericSelectionExpr

	/** Implements the GNU __null extension, which is a name for a null
	 * pointer constant that has integral type (e.g., int or long) and is the same
	 * size and alignment as a pointer.
	 *
	 * The __null extension is typically only used by system headers, which define
	 * NULL as __null in C++ rather than using 0 (which is an integer that may not
	 * match the size of a pointer).
	 */
	CursorGNUNullExpr

	/** C++'s static_cast<> expression.
	 */
	CursorCXXStaticCastExpr

	/** C++'s dynamic_cast<> expression.
	 */
	CursorCXXDynamicCastExpr

	/** C++'s reinterpret_cast<> expression.
	 */
	CursorCXXReinterpretCastExpr

	/** C++'s const_cast<> expression.
	 */
	CursorCXXConstCastExpr

	/** Represents an explicit C++ type conversion that uses "functional"
	 * notion (C++ [expr.type.conv]).
	 *
	 * Example:
	 * \code
	 *   x = int(0.5);
	 * \endcode
	 */
	CursorCXXFunctionalCastExpr

	/** A C++ typeid expression (C++ [expr.typeid]).
	 */
	CursorCXXTypeidExpr

	/** [C++ 2.13.5] C++ Boolean Literal.
	 */
	CursorCXXBoolLiteralExpr

	/** [C++0x 2.14.7] C++ Pointer Literal.
	 */
	CursorCXXNullPtrLiteralExpr

	/** Represents the "this" expression in C++
	 */
	CursorCXXThisExpr

	/** [C++ 15] C++ Throw Expression.
	 *
	 * This handles 'throw' and 'throw' assignment-expression. When
	 * assignment-expression isn't present, Op will be null.
	 */
	CursorCXXThrowExpr

	/** A new expression for memory allocation and constructor calls, e.g:
	 * "new CXXNewExpr(foo)".
	 */
	CursorCXXNewExpr

	/** A delete expression for memory deallocation and destructor calls,
	 * e.g. "delete[] pArray".
	 */
	CursorCXXDeleteExpr

	/** A unary expression. (noexcept, sizeof, or other traits)
	 */
	CursorUnaryExpr

	/** An Objective-C string literal i.e. @"foo".
	 */
	CursorObjCStringLiteral

	/** An Objective-C \@encode expression.
	 */
	CursorObjCEncodeExpr

	/** An Objective-C \@selector expression.
	 */
	CursorObjCSelectorExpr

	/** An Objective-C \@protocol expression.
	 */
	CursorObjCProtocolExpr

	/** An Objective-C "bridged" cast expression, which casts between
	 * Objective-C pointers and C pointers, transferring ownership in the process.
	 *
	 * \code
	 *   NSString *str = (__bridge_transfer NSString *)CFCreateString();
	 * \endcode
	 */
	CursorObjCBridgedCastExpr

	/** Represents a C++0x pack expansion that produces a sequence of
	 * expressions.
	 *
	 * A pack expansion expression contains a pattern (which itself is an
	 * expression) followed by an ellipsis. For example:
	 *
	 * \code
	 * template<typename F, typename ...Types>
	 * void forward(F f, Types &&...args) {
	 *  f(static_cast<Types&&>(args)...);
	 * }
	 * \endcode
	 */
	CursorPackExpansionExpr

	/** Represents an expression that computes the length of a parameter
	 * pack.
	 *
	 * \code
	 * template<typename ...Types>
	 * struct count {
	 *   static const unsigned value = sizeof...(Types);
	 * };
	 * \endcode
	 */
	CursorSizeOfPackExpr
	/* Represents a C++ lambda expression that produces a local function
	 * object.
	 *
	 * \code
	 * void abssort(float *x, unsigned N) {
	 *   std::sort(x, x + N,
	 *             [](float a, float b) {
	 *               return std::abs(a) < std::abs(b);
	 *             });
	 * }
	 * \endcode
	 */
	CursorLambdaExpr

	/** Objective-c Boolean Literal.
	 */
	CursorObjCBoolLiteralExpr

	/** Represents the "self" expression in an Objective-C method.
	 */
	CursorObjCSelfExpr

	/** OpenMP 5.0 [2.1.5, Array Section].
	 */
	CursorOMPArraySectionExpr

	/** Represents an @available(...) check.
	 */
	CursorObjCAvailabilityCheckExpr

	/**
	 * Fixed point literal
	 */
	CursorFixedPointLiteral

	/** OpenMP 5.0 [2.1.4, Array Shaping].
	 */
	CursorOMPArrayShapingExpr

	/**
	 * OpenMP 5.0 [2.1.6 Iterators]
	 */
	CursorOMPIteratorExpr

	/** OpenCL's addrspace_cast<> expression.
	 */
	CursorCXXAddrspaceCastExpr

	/**
	 * Expression that references a C++20 concept.
	 */
	CursorConceptSpecializationExpr

	/**
	 * Expression that references a C++20 concept.
	 */
	CursorRequiresExpr

	/**
	 * Expression that references a C++20 parenthesized list aggregate
	 * initializer.
	 */
	CursorCXXParenListInitExpr

	CursorLastExpr = CursorCXXParenListInitExpr

	/* Statements */
	CursorFirstStmt = 200
	/**
	 * A statement whose specific kind is not exposed via this
	 * interface.
	 *
	 * Unexposed statements have the same operations as any other kind of
	 * statement; one can extract their location information, spelling,
	 * children, etc. However, the specific kind of the statement is not
	 * reported.
	 */
	CursorUnexposedStmt = iota + 81 //200

	/** A labelled statement in a function.
	 *
	 * This cursor kind is used to describe the "start_over:" label statement in
	 * the following example:
	 *
	 * \code
	 *   start_over:
	 *     ++counter;
	 * \endcode
	 *
	 */
	CursorLabelStmt

	/** A group of statements like { stmt stmt }.
	 *
	 * This cursor kind is used to describe compound statements, e.g. function
	 * bodies.
	 */
	CursorCompoundStmt

	/** A case statement.
	 */
	CursorCaseStmt

	/** A default statement.
	 */
	CursorDefaultStmt

	/** An if statement
	 */
	CursorIfStmt

	/** A switch statement.
	 */
	CursorSwitchStmt

	/** A while statement.
	 */
	CursorWhileStmt

	/** A do statement.
	 */
	CursorDoStmt

	/** A for statement.
	 */
	CursorForStmt

	/** A goto statement.
	 */
	CursorGotoStmt

	/** An indirect goto statement.
	 */
	CursorIndirectGotoStmt

	/** A continue statement.
	 */
	CursorContinueStmt

	/** A break statement.
	 */
	CursorBreakStmt

	/** A return statement.
	 */
	CursorReturnStmt

	/** A GCC inline assembly statement extension.
	 */
	CursorGCCAsmStmt
	CursorAsmStmt = CursorGCCAsmStmt

	/** Objective-C's overall \@try-\@catch-\@finally statement.
	 */
	CursorObjCAtTryStmt = iota + 80 //216

	/** Objective-C's \@catch statement.
	 */
	CursorObjCAtCatchStmt

	/** Objective-C's \@finally statement.
	 */
	CursorObjCAtFinallyStmt

	/** Objective-C's \@throw statement.
	 */
	CursorObjCAtThrowStmt

	/** Objective-C's \@synchronized statement.
	 */
	CursorObjCAtSynchronizedStmt

	/** Objective-C's autorelease pool statement.
	 */
	CursorObjCAutoreleasePoolStmt

	/** Objective-C's collection statement.
	 */
	CursorObjCForCollectionStmt

	/** C++'s catch statement.
	 */
	CursorCXXCatchStmt

	/** C++'s try statement.
	 */
	CursorCXXTryStmt

	/** C++'s for (* : *) statement.
	 */
	CursorCXXForRangeStmt

	/** Windows Structured Exception Handling's try statement.
	 */
	CursorSEHTryStmt

	/** Windows Structured Exception Handling's except statement.
	 */
	CursorSEHExceptStmt

	/** Windows Structured Exception Handling's finally statement.
	 */
	CursorSEHFinallyStmt

	/** A MS inline assembly statement extension.
	 */
	CursorMSAsmStmt

	/** The null statement ";": C99 6.8.3p3.
	 *
	 * This cursor kind is used to describe the null statement.
	 */
	CursorNullStmt

	/** Adaptor class for mixing declarations with statements and
	 * expressions.
	 */
	CursorDeclStmt

	/** OpenMP parallel directive.
	 */
	CursorOMPParallelDirective

	/** OpenMP SIMD directive.
	 */
	CursorOMPSimdDirective

	/** OpenMP for directive.
	 */
	CursorOMPForDirective

	/** OpenMP sections directive.
	 */
	CursorOMPSectionsDirective

	/** OpenMP section directive.
	 */
	CursorOMPSectionDirective

	/** OpenMP single directive.
	 */
	CursorOMPSingleDirective

	/** OpenMP parallel for directive.
	 */
	CursorOMPParallelForDirective

	/** OpenMP parallel sections directive.
	 */
	CursorOMPParallelSectionsDirective

	/** OpenMP task directive.
	 */
	CursorOMPTaskDirective

	/** OpenMP master directive.
	 */
	CursorOMPMasterDirective

	/** OpenMP critical directive.
	 */
	CursorOMPCriticalDirective

	/** OpenMP taskyield directive.
	 */
	CursorOMPTaskyieldDirective

	/** OpenMP barrier directive.
	 */
	CursorOMPBarrierDirective

	/** OpenMP taskwait directive.
	 */
	CursorOMPTaskwaitDirective

	/** OpenMP flush directive.
	 */
	CursorOMPFlushDirective

	/** Windows Structured Exception Handling's leave statement.
	 */
	CursorSEHLeaveStmt

	/** OpenMP ordered directive.
	 */
	CursorOMPOrderedDirective

	/** OpenMP atomic directive.
	 */
	CursorOMPAtomicDirective

	/** OpenMP for SIMD directive.
	 */
	CursorOMPForSimdDirective

	/** OpenMP parallel for SIMD directive.
	 */
	CursorOMPParallelForSimdDirective

	/** OpenMP target directive.
	 */
	CursorOMPTargetDirective

	/** OpenMP teams directive.
	 */
	CursorOMPTeamsDirective

	/** OpenMP taskgroup directive.
	 */
	CursorOMPTaskgroupDirective

	/** OpenMP cancellation point directive.
	 */
	CursorOMPCancellationPointDirective

	/** OpenMP cancel directive.
	 */
	CursorOMPCancelDirective

	/** OpenMP target data directive.
	 */
	CursorOMPTargetDataDirective

	/** OpenMP taskloop directive.
	 */
	CursorOMPTaskLoopDirective

	/** OpenMP taskloop simd directive.
	 */
	CursorOMPTaskLoopSimdDirective

	/** OpenMP distribute directive.
	 */
	CursorOMPDistributeDirective

	/** OpenMP target enter data directive.
	 */
	CursorOMPTargetEnterDataDirective

	/** OpenMP target exit data directive.
	 */
	CursorOMPTargetExitDataDirective

	/** OpenMP target parallel directive.
	 */
	CursorOMPTargetParallelDirective

	/** OpenMP target parallel for directive.
	 */
	CursorOMPTargetParallelForDirective

	/** OpenMP target update directive.
	 */
	CursorOMPTargetUpdateDirective

	/** OpenMP distribute parallel for directive.
	 */
	CursorOMPDistributeParallelForDirective

	/** OpenMP distribute parallel for simd directive.
	 */
	CursorOMPDistributeParallelForSimdDirective

	/** OpenMP distribute simd directive.
	 */
	CursorOMPDistributeSimdDirective

	/** OpenMP target parallel for simd directive.
	 */
	CursorOMPTargetParallelForSimdDirective

	/** OpenMP target simd directive.
	 */
	CursorOMPTargetSimdDirective

	/** OpenMP teams distribute directive.
	 */
	CursorOMPTeamsDistributeDirective

	/** OpenMP teams distribute simd directive.
	 */
	CursorOMPTeamsDistributeSimdDirective

	/** OpenMP teams distribute parallel for simd directive.
	 */
	CursorOMPTeamsDistributeParallelForSimdDirective

	/** OpenMP teams distribute parallel for directive.
	 */
	CursorOMPTeamsDistributeParallelForDirective

	/** OpenMP target teams directive.
	 */
	CursorOMPTargetTeamsDirective

	/** OpenMP target teams distribute directive.
	 */
	CursorOMPTargetTeamsDistributeDirective

	/** OpenMP target teams distribute parallel for directive.
	 */
	CursorOMPTargetTeamsDistributeParallelForDirective

	/** OpenMP target teams distribute parallel for simd directive.
	 */
	CursorOMPTargetTeamsDistributeParallelForSimdDirective

	/** OpenMP target teams distribute simd directive.
	 */
	CursorOMPTargetTeamsDistributeSimdDirective

	/** C++2a std::bit_cast expression.
	 */
	CursorBuiltinBitCastExpr

	/** OpenMP master taskloop directive.
	 */
	CursorOMPMasterTaskLoopDirective

	/** OpenMP parallel master taskloop directive.
	 */
	CursorOMPParallelMasterTaskLoopDirective

	/** OpenMP master taskloop simd directive.
	 */
	CursorOMPMasterTaskLoopSimdDirective

	/** OpenMP parallel master taskloop simd directive.
	 */
	CursorOMPParallelMasterTaskLoopSimdDirective

	/** OpenMP parallel master directive.
	 */
	CursorOMPParallelMasterDirective

	/** OpenMP depobj directive.
	 */
	CursorOMPDepobjDirective

	/** OpenMP scan directive.
	 */
	CursorOMPScanDirective

	/** OpenMP tile directive.
	 */
	CursorOMPTileDirective

	/** OpenMP canonical loop.
	 */
	CursorOMPCanonicalLoop

	/** OpenMP interop directive.
	 */
	CursorOMPInteropDirective

	/** OpenMP dispatch directive.
	 */
	CursorOMPDispatchDirective

	/** OpenMP masked directive.
	 */
	CursorOMPMaskedDirective

	/** OpenMP unroll directive.
	 */
	CursorOMPUnrollDirective

	/** OpenMP metadirective directive.
	 */
	CursorOMPMetaDirective

	/** OpenMP loop directive.
	 */
	CursorOMPGenericLoopDirective

	/** OpenMP teams loop directive.
	 */
	CursorOMPTeamsGenericLoopDirective

	/** OpenMP target teams loop directive.
	 */
	CursorOMPTargetTeamsGenericLoopDirective

	/** OpenMP parallel loop directive.
	 */
	CursorOMPParallelGenericLoopDirective

	/** OpenMP target parallel loop directive.
	 */
	CursorOMPTargetParallelGenericLoopDirective

	/** OpenMP parallel masked directive.
	 */
	CursorOMPParallelMaskedDirective

	/** OpenMP masked taskloop directive.
	 */
	CursorOMPMaskedTaskLoopDirective

	/** OpenMP masked taskloop simd directive.
	 */
	CursorOMPMaskedTaskLoopSimdDirective

	/** OpenMP parallel masked taskloop directive.
	 */
	CursorOMPParallelMaskedTaskLoopDirective

	/** OpenMP parallel masked taskloop simd directive.
	 */
	CursorOMPParallelMaskedTaskLoopSimdDirective

	/** OpenMP error directive.
	 */
	CursorOMPErrorDirective

	/** OpenMP scope directive.
	 */
	CursorOMPScopeDirective

	CursorLastStmt = CursorOMPScopeDirective

	/**
	 * Cursor that represents the translation unit itself.
	 *
	 * The translation unit cursor exists primarily to act as the root
	 * cursor for traversing the contents of a translation unit.
	 */
	CursorTranslationUnit = 350

	/* Attributes */
	CursorFirstAttr = 400
	/**
	 * An attribute whose specific kind is not exposed via this
	 * interface.
	 */
	CursorUnexposedAttr = iota + 170

	CursorIBActionAttr
	CursorIBOutletAttr
	CursorIBOutletCollectionAttr
	CursorCXXFinalAttr
	CursorCXXOverrideAttr
	CursorAnnotateAttr
	CursorAsmLabelAttr
	CursorPackedAttr
	CursorPureAttr
	CursorConstAttr
	CursorNoDuplicateAttr
	CursorCUDAConstantAttr
	CursorCUDADeviceAttr
	CursorCUDAGlobalAttr
	CursorCUDAHostAttr
	CursorCUDASharedAttr
	CursorVisibilityAttr
	CursorDLLExport
	CursorDLLImport
	CursorNSReturnsRetained
	CursorNSReturnsNotRetained
	CursorNSReturnsAutoreleased
	CursorNSConsumesSelf
	CursorNSConsumed
	CursorObjCException
	CursorObjCNSObject
	CursorObjCIndependentClass
	CursorObjCPreciseLifetime
	CursorObjCReturnsInnerPointer
	CursorObjCRequiresSuper
	CursorObjCRootClass
	CursorObjCSubclassingRestricted
	CursorObjCExplicitProtocolImpl
	CursorObjCDesignatedInitializer
	CursorObjCRuntimeVisible
	CursorObjCBoxable
	CursorFlagEnum
	CursorConvergentAttr
	CursorWarnUnusedAttr
	CursorWarnUnusedResultAttr
	CursorAlignedAttr
	CursorLastAttr = CursorAlignedAttr

	/* Preprocessing */
	CursorPreprocessingDirective = iota + 227 //500
	CursorMacroDefinition
	CursorMacroExpansion
	CursorMacroInstantiation = CursorMacroExpansion
	CursorInclusionDirective = 503
	CursorFirstPreprocessing = CursorPreprocessingDirective
	CursorLastPreprocessing  = CursorInclusionDirective

	/* Extra Declarations */
	/**
	 * A module import declaration.
	 */
	CursorModuleImportDecl = iota + 320 //600
	CursorTypeAliasTemplateDecl
	/**
	 * A static_assert or _Static_assert node
	 */
	CursorStaticAssert
	/**
	 * a friend declaration.
	 */
	CursorFriendDecl
	/**
	 * a concept declaration.
	 */
	CursorConceptDecl

	CursorFirstExtraDecl = CursorModuleImportDecl
	CursorLastExtraDecl  = CursorConceptDecl

	/**
	 * A code completion overload candidate.
	 */
	CursorOverloadCandidate = 700
)
View Source
const (
	/**
	 * Used to indicate that no special translation-unit options are
	 * needed.
	 */
	TranslationUnit_None = 0x0
	/**
	 * Used to indicate that the parser should construct a "detailed"
	 * preprocessing record, including all macro definitions and instantiations.
	 *
	 * Constructing a detailed preprocessing record requires more memory
	 * and time to parse, since the information contained in the record
	 * is usually not retained. However, it can be useful for
	 * applications that require more detailed information about the
	 * behavior of the preprocessor.
	 */
	DetailedPreprocessingRecord = 0x01
)

*

  • Flags that control the creation of translation units. *
  • The enumerators in this enumeration type are meant to be bitwise
  • ORed together to specify which options should be used when
  • constructing the translation unit.

Variables

This section is empty.

Functions

func GetInclusions added in v0.9.8

func GetInclusions(tu *TranslationUnit, visitor InclusionVisitor, client_data ClientData)

*

  • Visit the set of preprocessor inclusions in a translation unit.
  • The visitor function is called with the provided data for every included
  • file. This does not include headers included by the PCH file (unless one
  • is inspecting the inclusions in the PCH file itself).

func VisitChildren

func VisitChildren(
	root Cursor,
	fn Visitor,
	clientData ClientData) c.Uint

Types

type CXXAccessSpecifier added in v0.9.3

type CXXAccessSpecifier c.Int

*

  • Represents the C++ access control level to a base class for a
  • cursor with kind CX_CXXBaseSpecifier.
const (
	CXXInvalidAccessSpecifier CXXAccessSpecifier = iota
	CXXPublic
	CXXProtected
	CXXPrivate
)

type ChildVisitResult

type ChildVisitResult c.Int

*

  • Describes how the traversal of the children of a particular
  • cursor should proceed after visiting a particular child cursor. *
  • A value of this enumeration type should be returned by each
  • \c CXCursorVisitor to indicate how clang_visitChildren() proceed.
const (
	/**
	 * Terminates the cursor traversal.
	 */
	ChildVisit_Break ChildVisitResult = iota
	/**
	 * Continues the cursor traversal with the next sibling of
	 * the cursor just visited, without visiting its children.
	 */
	ChildVisit_Continue
	/**
	 * Recursively traverse the children of this cursor, using
	 * the same visitor and client data.
	 */
	ChildVisit_Recurse
)

type ClientData

type ClientData = c.Pointer

*

  • Opaque pointer representing client data that will be passed through
  • to various callbacks and visitors.

type Cursor

type Cursor struct {
	Kind CursorKind
	// contains filtered or unexported fields
}

*

  • A cursor representing some element in the abstract syntax tree for
  • a translation unit. *
  • The cursor abstraction unifies the different kinds of entities in a
  • program--declaration, statements, expressions, references to declarations,
  • etc.--under a single "cursor" abstraction with a common set of operations.
  • Common operation for a cursor include: getting the physical location in
  • a source file where the cursor points, getting the name associated with a
  • cursor, and retrieving cursors for any child nodes of a particular cursor. *
  • Cursors can be produced in two specific ways.
  • clang_getTranslationUnitCursor() produces a cursor for a translation unit,
  • from which one can use clang_visitChildren() to explore the rest of the
  • translation unit. clang_getCursor() maps from a physical source location
  • to the entity that resides at that location, allowing one to map from the
  • source code into the AST.

func (Cursor) Argument added in v0.9.3

func (c Cursor) Argument(index c.Uint) (arg Cursor)

func (Cursor) CXXAccessSpecifier added in v0.9.5

func (c Cursor) CXXAccessSpecifier() CXXAccessSpecifier

func (Cursor) CommentRange added in v0.9.8

func (c Cursor) CommentRange() (loc SourceRange)

func (Cursor) DisplayName added in v0.9.8

func (c Cursor) DisplayName() (ret String)

func (*Cursor) DisposeOverriddenCursors added in v0.9.7

func (c *Cursor) DisposeOverriddenCursors()

*

  • Free the set of overridden cursors returned by \c
  • clang_getOverriddenCursors().

llgo:link (*Cursor).DisposeOverriddenCursors C.clang_disposeOverriddenCursors

func (Cursor) EnumConstantDeclValue added in v0.9.5

func (c Cursor) EnumConstantDeclValue() (ret c.LongLong)

func (Cursor) Equal added in v0.9.7

func (c Cursor) Equal(cursor Cursor) c.Uint

func (Cursor) Extent added in v0.9.5

func (c Cursor) Extent() (loc SourceRange)

func (Cursor) IncludedFile added in v0.9.8

func (c Cursor) IncludedFile() (file File)

func (Cursor) IsAbstract added in v0.9.7

func (c Cursor) IsAbstract() (ret c.Uint)

func (Cursor) IsAnonymous added in v0.9.7

func (c Cursor) IsAnonymous() (ret c.Uint)

func (Cursor) IsAnonymousRecordDecl added in v0.9.7

func (c Cursor) IsAnonymousRecordDecl() (ret c.Uint)

func (Cursor) IsConst added in v0.9.7

func (c Cursor) IsConst() (ret c.Uint)

func (Cursor) IsConvertingConstructor added in v0.9.7

func (c Cursor) IsConvertingConstructor() (ret c.Uint)

func (Cursor) IsCopyAssignmentOperator added in v0.9.7

func (c Cursor) IsCopyAssignmentOperator() (ret c.Uint)

func (Cursor) IsCopyConstructor added in v0.9.7

func (c Cursor) IsCopyConstructor() (ret c.Uint)

func (Cursor) IsDefaultConstructor added in v0.9.7

func (c Cursor) IsDefaultConstructor() (ret c.Uint)

func (Cursor) IsDefaulted added in v0.9.7

func (c Cursor) IsDefaulted() (ret c.Uint)

func (Cursor) IsDeleted added in v0.9.7

func (c Cursor) IsDeleted() (ret c.Uint)

func (Cursor) IsExplicit added in v0.9.7

func (c Cursor) IsExplicit() (ret c.Uint)

func (Cursor) IsFunctionInlined added in v0.9.7

func (c Cursor) IsFunctionInlined() (ret c.Uint)

func (Cursor) IsMacroBuiltin added in v0.9.7

func (c Cursor) IsMacroBuiltin() (ret c.Uint)

func (Cursor) IsMacroFunctionLike added in v0.9.7

func (c Cursor) IsMacroFunctionLike() (ret c.Uint)

func (Cursor) IsMoveAssignmentOperator added in v0.9.7

func (c Cursor) IsMoveAssignmentOperator() (ret c.Uint)

func (Cursor) IsMoveConstructor added in v0.9.7

func (c Cursor) IsMoveConstructor() (ret c.Uint)

func (Cursor) IsMutable added in v0.9.7

func (c Cursor) IsMutable() (ret c.Uint)

func (Cursor) IsNull added in v0.9.7

func (c Cursor) IsNull() c.Int

func (Cursor) IsPureVirtual added in v0.9.7

func (c Cursor) IsPureVirtual() (ret c.Uint)

func (Cursor) IsScoped added in v0.9.7

func (c Cursor) IsScoped() (ret c.Uint)

func (Cursor) IsStatic added in v0.9.7

func (c Cursor) IsStatic() (ret c.Uint)

func (Cursor) IsVariadic added in v0.9.7

func (c Cursor) IsVariadic() (ret c.Uint)

func (Cursor) IsVirtual added in v0.9.7

func (c Cursor) IsVirtual() (ret c.Uint)

func (Cursor) LexicalParent added in v0.9.7

func (c Cursor) LexicalParent() (parent Cursor)

func (Cursor) Location added in v0.9.3

func (c Cursor) Location() (loc SourceLocation)

func (Cursor) Mangling added in v0.9.3

func (c Cursor) Mangling() (ret String)

func (Cursor) NumArguments added in v0.9.3

func (c Cursor) NumArguments() (num c.Int)

func (Cursor) OverriddenCursors added in v0.9.7

func (c Cursor) OverriddenCursors(overridden **Cursor, numOverridden *c.Uint)

func (Cursor) RawCommentText added in v0.9.7

func (c Cursor) RawCommentText() (ret String)

func (Cursor) Referenced added in v0.9.8

func (c Cursor) Referenced() (referenced Cursor)

func (Cursor) ResultType added in v0.9.3

func (c Cursor) ResultType() (ret Type)

func (Cursor) SemanticParent added in v0.9.7

func (c Cursor) SemanticParent() (parent Cursor)

func (Cursor) StorageClass added in v0.9.7

func (c Cursor) StorageClass() (ret StorageClass)

func (Cursor) String

func (c Cursor) String() (ret String)

func (Cursor) Type added in v0.9.3

func (c Cursor) Type() (ret Type)

func (Cursor) TypedefDeclUnderlyingType added in v0.9.7

func (c Cursor) TypedefDeclUnderlyingType() (ret Type)

func (Cursor) USR added in v0.9.8

func (c Cursor) USR() (ret String)

type CursorKind

type CursorKind c.Int

*

  • Describes the kind of entity that a cursor refers to.

func (CursorKind) String

func (CursorKind) String() (ret String)
for debug/testing

llgo:link CursorKind.String C.clang_getCursorKindSpelling

type File added in v0.9.3

type File uintptr

*

  • A particular source file that is part of a translation unit.

func (File) FileName added in v0.9.3

func (File) FileName() (ret String)

type InclusionVisitor added in v0.9.8

type InclusionVisitor func(included_file File, inclusion_stack *SourceLocation, include_len c.Uint, client_data ClientData)

*

  • Visitor invoked for each file in a translation unit
  • (used with clang_getInclusions()). *
  • This visitor function will be invoked by clang_getInclusions() for each
  • file included (either at the top-level or by \#include directives) within
  • a translation unit. The first argument is the file being included, and
  • the second and third arguments provide the inclusion stack. The
  • array is sorted in order of immediate inclusion. For example,
  • the first element refers to the location that included 'included_file'.

type Index

type Index struct {
	Unused [0]byte
}

*

  • An "index" that consists of a set of translation units that would
  • typically be linked together into an executable or library.

func CreateIndex

func CreateIndex(excludeDeclarationsFromPCH, displayDiagnostics c.Int) *Index

*

  • 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).

func (*Index) Dispose

func (*Index) Dispose()

*

  • Destroy the given index. *
  • The index must not be destroyed until all of the translation units created
  • within that index have been destroyed.

llgo:link (*Index).Dispose C.clang_disposeIndex

func (*Index) ParseTranslationUnit

func (*Index) ParseTranslationUnit(
	sourceFilename *c.Char, commandLineArgs **c.Char, numCommandLineArgs c.Int,
	unsavedFiles *UnsavedFile, numUnsavedFiles c.Uint, options c.Uint) *TranslationUnit

*

  • 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.

llgo:link (*Index).ParseTranslationUnit C.clang_parseTranslationUnit

type SourceLocation added in v0.9.3

type SourceLocation struct {
	// contains filtered or unexported fields
}

*

  • Identifies a specific source location within a translation
  • unit. *
  • Use clang_getExpansionLocation() or clang_getSpellingLocation()
  • to map a source location to a particular file, line, and column.

func (SourceLocation) IsInSystemHeader added in v0.9.8

func (l SourceLocation) IsInSystemHeader() (ret c.Uint)

func (SourceLocation) SpellingLocation added in v0.9.3

func (l SourceLocation) SpellingLocation(file *File, line, column, offset *c.Uint)

type SourceRange added in v0.9.5

type SourceRange struct {
	// contains filtered or unexported fields
}

*

  • Identifies a half-open character range in the source code. *
  • Use clang_getRangeStart() and clang_getRangeEnd() to retrieve the
  • starting and end locations from a source range, respectively.

func (SourceRange) RangeEnd added in v0.9.8

func (r SourceRange) RangeEnd() (loc SourceLocation)

func (SourceRange) RangeStart added in v0.9.8

func (r SourceRange) RangeStart() (loc SourceLocation)

type StorageClass added in v0.9.7

type StorageClass c.Int
const (
	SCInvalid StorageClass = iota
	SCNone
	SCExtern
	SCStatic
	SCPrivateExtern
	SCOpenCLWorkGroupLocal
	SCAuto
	SCRegister
)

*

  • Represents the storage classes as declared in the source. CX_SC_Invalid
  • was added for the case that the passed cursor in not a declaration.

type String

type String struct {
	Data         c.Pointer
	PrivateFlags c.Uint
}

*

  • A character string. *
  • The \c CXString type is used to return strings from the interface when
  • the ownership of that string might differ from one call to the next.
  • Use \c clang_getCString() to retrieve the string data and, once finished
  • with the string data, call \c clang_disposeString() to free the string.

func (String) CStr

func (String) CStr() *c.Char

*

  • Retrieve the character data associated with the given string.

llgo:link String.CStr C.clang_getCString

func (String) Dispose

func (String) Dispose()

*

  • Free the given string.

llgo:link String.Dispose C.clang_disposeString

type StringSet

type StringSet struct {
	Strings *String
	Count   c.Uint
}

func (*StringSet) Dispose

func (*StringSet) Dispose()

*

  • Free the given string set.

llgo:link (*StringSet).Dispose C.clang_disposeStringSet

type Token added in v0.9.5

type Token struct {
	// contains filtered or unexported fields
}

func (Token) Kind added in v0.9.7

func (c Token) Kind() (ret TokenKind)

type TokenKind added in v0.9.5

type TokenKind c.Int

*

  • Describes a kind of token.
const (
	/**
	 * A token that contains some kind of punctuation.
	 */
	Punctuation TokenKind = iota
	/**
	 * A language keyword.
	 */
	Keyword

	/**
	 * An identifier (that is not a keyword).
	 */
	Identifier
	/**
	 * A numeric, string, or character literal.
	 */
	Literal
	/**
	 * A comment.
	 */
	Comment
)

type TranslationUnit

type TranslationUnit struct {
	Unused [0]byte
}

*

  • A single translation unit, which resides in an index.

func (*TranslationUnit) Cursor

func (t *TranslationUnit) Cursor() (ret Cursor)

func (*TranslationUnit) Dispose

func (*TranslationUnit) Dispose()

*

  • Destroy the specified CXTranslationUnit object.

llgo:link (*TranslationUnit).Dispose C.clang_disposeTranslationUnit

func (*TranslationUnit) DisposeTokens added in v0.9.7

func (t *TranslationUnit) DisposeTokens(tokens *Token, numTokens c.Uint)

*

  • Free the given set of tokens.

llgo:link (*TranslationUnit).DisposeTokens C.clang_disposeTokens

func (*TranslationUnit) GetCursor added in v0.9.8

func (l *TranslationUnit) GetCursor(loc *SourceLocation) (cur Cursor)

func (*TranslationUnit) GetLocation added in v0.9.8

func (t *TranslationUnit) GetLocation(file File, line, column c.Uint) (ret SourceLocation)

func (*TranslationUnit) GetLocationForOffset added in v0.9.8

func (t *TranslationUnit) GetLocationForOffset(file File, offset c.Uint) (ret SourceLocation)

func (*TranslationUnit) Token added in v0.9.5

func (c *TranslationUnit) Token(token Token) (ret String)

func (*TranslationUnit) Tokenize added in v0.9.5

func (t *TranslationUnit) Tokenize(ran SourceRange, tokens **Token, numTokens *c.Uint)

type Type added in v0.9.3

type Type struct {
	Kind TypeKind
	// contains filtered or unexported fields
}

*

  • The type of an element in the abstract syntax tree. *

func (Type) ArgType added in v0.9.5

func (t Type) ArgType(index c.Uint) (ret Type)

func (Type) ArrayElementType added in v0.9.5

func (t Type) ArrayElementType() (ret Type)

func (Type) ArraySize added in v0.9.7

func (t Type) ArraySize() (ret c.LongLong)

func (Type) CanonicalType added in v0.9.5

func (t Type) CanonicalType() (ret Type)

func (Type) ElementType added in v0.9.7

func (t Type) ElementType() (ret Type)

func (Type) IsConstQualifiedType added in v0.9.7

func (t Type) IsConstQualifiedType() (ret c.Uint)

func (Type) IsFunctionTypeVariadic added in v0.9.7

func (t Type) IsFunctionTypeVariadic() (ret c.Uint)

func (Type) IsRestrictQualifiedType added in v0.9.7

func (t Type) IsRestrictQualifiedType() (ret c.Uint)

func (Type) IsVolatileQualifiedType added in v0.9.7

func (t Type) IsVolatileQualifiedType() (ret c.Uint)

func (Type) NamedType added in v0.9.7

func (t Type) NamedType() (ret Type)

func (Type) NonReferenceType added in v0.9.7

func (t Type) NonReferenceType() (ret Type)

func (Type) NumArgTypes added in v0.9.5

func (t Type) NumArgTypes() (num c.Int)

func (Type) PointeeType added in v0.9.5

func (t Type) PointeeType() (ret Type)

func (Type) ResultType added in v0.9.5

func (t Type) ResultType() (ret Type)

func (Type) String added in v0.9.3

func (t Type) String() (ret String)

func (Type) TypeDeclaration added in v0.9.7

func (t Type) TypeDeclaration() (ret Cursor)

type TypeKind added in v0.9.5

type TypeKind c.Int
const (
	/**
	 * Represents an invalid type (e.g., where no type is available).
	 */
	TypeInvalid TypeKind = iota

	/**
	 * A type whose specific kind is not exposed via this
	 * interface.
	 */
	TypeUnexposed

	/* Builtin types */
	TypeVoid
	TypeBool
	TypeCharU
	TypeUChar
	TypeChar16
	TypeChar32
	TypeUShort
	TypeUInt
	TypeULong
	TypeULongLong
	TypeUInt128
	TypeCharS
	TypeSChar
	TypeWChar
	TypeShort
	TypeInt
	TypeLong
	TypeLongLong
	TypeInt128
	TypeFloat
	TypeDouble
	TypeLongDouble
	TypeNullPtr
	TypeOverload
	TypeDependent
	TypeObjCId
	TypeObjCClass
	TypeObjCSel
	TypeFloat128
	TypeHalf
	TypeFloat16
	TypeShortAccum
	TypeAccum
	TypeLongAccum
	TypeUShortAccum
	TypeUAccum
	TypeULongAccum
	TypeBFloat16
	TypeIbm128

	TypeFirstBuiltin = TypeVoid
	TypeLastBuiltin  = TypeIbm128

	TypeComplex TypeKind = iota + 57 //  100
	TypePointer
	TypeBlockPointer
	TypeLValueReference
	TypeRValueReference
	TypeRecord
	TypeEnum
	TypeTypedef
	TypeObjCInterface
	TypeObjCObjectPointer
	TypeFunctionNoProto
	TypeFunctionProto
	TypeConstantArray
	TypeVector
	TypeIncompleteArray
	TypeVariableArray
	TypeDependentSizedArray
	TypeMemberPointer
	TypeAuto

	/**
	 * Represents a type that was referred to using an elaborated type keyword.
	 *
	 * E.g., struct S, or via a qualified name, e.g., N::M::type, or both.
	 */
	TypeElaborated

	/* OpenCL PipeType. */
	TypePipe

	/* OpenCL builtin types. */
	TypeOCLImage1dRO
	TypeOCLImage1dArrayRO
	TypeOCLImage1dBufferRO
	TypeOCLImage2dRO
	TypeOCLImage2dArrayRO
	TypeOCLImage2dDepthRO
	TypeOCLImage2dArrayDepthRO
	TypeOCLImage2dMSAARO
	TypeOCLImage2dArrayMSAARO
	TypeOCLImage2dMSAADepthRO
	TypeOCLImage2dArrayMSAADepthRO
	TypeOCLImage3dRO
	TypeOCLImage1dWO
	TypeOCLImage1dArrayWO
	TypeOCLImage1dBufferWO
	TypeOCLImage2dWO
	TypeOCLImage2dArrayWO
	TypeOCLImage2dDepthWO
	TypeOCLImage2dArrayDepthWO
	TypeOCLImage2dMSAAWO
	TypeOCLImage2dArrayMSAAWO
	TypeOCLImage2dMSAADepthWO
	TypeOCLImage2dArrayMSAADepthWO
	TypeOCLImage3dWO
	TypeOCLImage1dRW
	TypeOCLImage1dArrayRW
	TypeOCLImage1dBufferRW
	TypeOCLImage2dRW
	TypeOCLImage2dArrayRW
	TypeOCLImage2dDepthRW
	TypeOCLImage2dArrayDepthRW
	TypeOCLImage2dMSAARW
	TypeOCLImage2dArrayMSAARW
	TypeOCLImage2dMSAADepthRW
	TypeOCLImage2dArrayMSAADepthRW
	TypeOCLImage3dRW
	TypeOCLSampler
	TypeOCLEvent
	TypeOCLQueue
	TypeOCLReserveID

	TypeObjCObject
	TypeObjCTypeParam
	TypeAttributed

	TypeOCLIntelSubgroupAVCMcePayload
	TypeOCLIntelSubgroupAVCImePayload
	TypeOCLIntelSubgroupAVCRefPayload
	TypeOCLIntelSubgroupAVCSicPayload
	TypeOCLIntelSubgroupAVCMceResult
	TypeOCLIntelSubgroupAVCImeResult
	TypeOCLIntelSubgroupAVCRefResult
	TypeOCLIntelSubgroupAVCSicResult
	TypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout
	TypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout
	TypeOCLIntelSubgroupAVCImeSingleReferenceStreamin
	TypeOCLIntelSubgroupAVCImeDualReferenceStreamin

	/* Old aliases for AVC OpenCL extension types. */
	TypeOCLIntelSubgroupAVCImeResultSingleRefStreamout = TypeOCLIntelSubgroupAVCImeResultSingleReferenceStreamout
	TypeOCLIntelSubgroupAVCImeResultDualRefStreamout   = TypeOCLIntelSubgroupAVCImeResultDualReferenceStreamout
	TypeOCLIntelSubgroupAVCImeSingleRefStreamin        = TypeOCLIntelSubgroupAVCImeSingleReferenceStreamin
	TypeOCLIntelSubgroupAVCImeDualRefStreamin          = TypeOCLIntelSubgroupAVCImeDualReferenceStreamin

	TypeExtVector = iota + 53 // 176
	TypeAtomic
	TypeBTFTagAttributed
)

*

  • Describes the kind of type

func (TypeKind) String added in v0.9.5

func (TypeKind) String() (ret String)

*

  • Retrieve the spelling of a given CXTypeKind.

llgo:link TypeKind.String C.clang_getTypeKindSpelling

type UnsavedFile

type UnsavedFile struct {
	/**
	 * The file whose contents have not yet been saved.
	 *
	 * This file must already exist in the file system.
	 */
	Filename *c.Char

	/**
	 * A buffer containing the unsaved contents of this file.
	 */
	Contents *c.Char

	/**
	 * The length of the unsaved contents of this buffer.
	 */
	Length c.Ulong
}

*

  • Provides the contents of a file that has not yet been saved to disk. *
  • Each CXUnsavedFile instance provides the name of a file on the
  • system along with the current contents of that file that have not
  • yet been saved to disk.

type Visitor added in v0.9.2

type Visitor func(cursor, parent Cursor, clientData ClientData) ChildVisitResult

Directories

Path Synopsis
_demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL