Skip to main content
Module

x/libclang/mod.ts>CXCursorKind

Deno FFI bindings for libclang
Go to Latest
enum CXCursorKind
Re-export
import { CXCursorKind } from "https://deno.land/x/libclang@1.0.0-beta.8/mod.ts";

Describes the kind of entity that a cursor refers to.

Members

CXCursor_AddrLabelExpr = 120

The GNU address of label extension, representing &&label.

CXCursor_AlignedAttr = 441
CXCursor_AnnotateAttr = 406
CXCursor_ArraySubscriptExpr = 113

[C99 6.5.2.1] Array Subscripting.

CXCursor_AsmLabelAttr = 407
CXCursor_AsmStmt
CXCursor_BinaryOperator = 114

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

CXCursor_BlockExpr = 105

An expression that represents a block literal.

CXCursor_BreakStmt = 213

A break statement.

CXCursor_BuiltinBitCastExpr = 280

C++2a std::bit_cast expression.

CXCursor_CallExpr = 103

An expression that calls a function.

CXCursor_CaseStmt = 203

A case statement.

CXCursor_CharacterLiteral = 110

A character literal.

CXCursor_ClassDecl = 4

A C++ class.

CXCursor_ClassTemplate = 31

A C++ class template.

CXCursor_ClassTemplatePartialSpecialization = 32

A C++ class template partial specialization.

CXCursor_CompoundAssignOperator = 115

Compound assignment such as "+=".

CXCursor_CompoundLiteralExpr = 118

[C99 6.5.2.5]

CXCursor_CompoundStmt = 202

A group of statements like { stmt stmt }.

This cursor kind is used to describe compound statements, e.g. function bodies.

CXCursor_ConceptDecl = 604

a concept declaration.

CXCursor_ConceptSpecializationExpr = 153

Expression that references a C++20 concept.

CXCursor_ConditionalOperator = 116

The ?: ternary operator.

CXCursor_ConstAttr = 410
CXCursor_Constructor = 24

A C++ constructor.

CXCursor_ContinueStmt = 212

A continue statement.

CXCursor_ConvergentAttr = 438
CXCursor_ConversionFunction = 26

A C++ conversion function.

CXCursor_CStyleCastExpr = 117

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.

CXCursor_CUDAConstantAttr = 412
CXCursor_CUDADeviceAttr = 413
CXCursor_CUDAGlobalAttr = 414
CXCursor_CUDAHostAttr = 415
CXCursor_CUDASharedAttr = 416
CXCursor_CXXAccessSpecifier = 39

An access specifier.

CXCursor_CXXAddrspaceCastExpr = 152

OpenCL's addrspace_cast<> expression.

CXCursor_CXXBaseSpecifier = 44
CXCursor_CXXBoolLiteralExpr = 130

[C++ 2.13.5] C++ Boolean Literal.

CXCursor_CXXCatchStmt = 223

C++'s catch statement.

CXCursor_CXXConstCastExpr = 127

C++'s const_cast<> expression.

CXCursor_CXXDeleteExpr = 135

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

CXCursor_CXXDynamicCastExpr = 125

C++'s dynamic_cast<> expression.

CXCursor_CXXFinalAttr = 404
CXCursor_CXXForRangeStmt = 225

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

CXCursor_CXXFunctionalCastExpr = 128

Represents an explicit C++ type conversion that uses "functional" notion (C++ [expr.type.conv]).

Example:

  x = int(0.5);
CXCursor_CXXMethod = 21

A C++ class method.

CXCursor_CXXNewExpr = 134

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

CXCursor_CXXNullPtrLiteralExpr = 131

[C++0x 2.14.7] C++ Pointer Literal.

CXCursor_CXXOverrideAttr = 405
CXCursor_CXXParenListInitExpr = 155

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

CXCursor_CXXReinterpretCastExpr = 126

C++'s reinterpret_cast<> expression.

CXCursor_CXXStaticCastExpr = 124

C++'s static_cast<> expression.

CXCursor_CXXThisExpr = 132

Represents the "this" expression in C++

CXCursor_CXXThrowExpr = 133

[C++ 15] C++ Throw Expression.

This handles 'throw' and 'throw' assignment-expression. When assignment-expression isn't present, Op will be null.

CXCursor_CXXTryStmt = 224

C++'s try statement.

CXCursor_CXXTypeidExpr = 129

A C++ typeid expression (C++ [expr.typeid]).

CXCursor_DeclRefExpr = 101

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

CXCursor_DeclStmt = 231

Adaptor class for mixing declarations with statements and expressions.

CXCursor_DefaultStmt = 204

A default statement.

CXCursor_Destructor = 25

A C++ destructor.

CXCursor_DLLExport = 418
CXCursor_DLLImport = 419
CXCursor_DoStmt = 208

A do statement.

CXCursor_EnumConstantDecl = 7

An enumerator constant.

CXCursor_EnumDecl = 5

An enumeration.

CXCursor_FieldDecl = 6

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

CXCursor_FirstAttr = 400
CXCursor_FirstDecl
CXCursor_FirstExpr = 100
CXCursor_FirstExtraDecl
CXCursor_FirstInvalid = 70
CXCursor_FirstPreprocessing
CXCursor_FirstRef = 40
CXCursor_FirstStmt = 200
CXCursor_FixedPointLiteral = 149

Fixed point literal

CXCursor_FlagEnum = 437
CXCursor_FloatingLiteral = 107

A floating point number literal.

CXCursor_ForStmt = 209

A for statement.

CXCursor_FriendDecl = 603

a friend declaration.

CXCursor_FunctionDecl = 8

A function.

CXCursor_FunctionTemplate = 30

A C++ function template.

CXCursor_GCCAsmStmt = 215

A GCC inline assembly statement extension.

CXCursor_GenericSelectionExpr = 122

Represents a C11 generic selection.

CXCursor_GNUNullExpr = 123

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

CXCursor_GotoStmt = 210

A goto statement.

CXCursor_IBActionAttr = 401
CXCursor_IBOutletAttr = 402
CXCursor_IBOutletCollectionAttr = 403
CXCursor_IfStmt = 205

An if statement

CXCursor_ImaginaryLiteral = 108

An imaginary number literal.

CXCursor_InclusionDirective = 503
CXCursor_IndirectGotoStmt = 211

An indirect goto statement.

CXCursor_InitListExpr = 119

Describes an C or C++ initializer list.

CXCursor_IntegerLiteral = 106

An integer literal.

CXCursor_InvalidCode = 73
CXCursor_InvalidFile = 70
CXCursor_LabelRef = 48

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:

  start_over:
    ++counter;
    goto start_over;

A label reference cursor refers to a label statement.

CXCursor_LabelStmt = 201

A labelled statement in a function.

This cursor kind is used to describe the "start_over:" label statement in the following example:

  start_over:
    ++counter;
CXCursor_LambdaExpr = 144

Represents a C++ lambda expression that produces a local function object.

void abssort(float *x, unsigned N) {
  std::sort(x, x + N,
            [](float a, float b) {
              return std::abs(a) < std::abs(b);
            });
}
CXCursor_LastAttr
CXCursor_LastDecl
CXCursor_LastExpr
CXCursor_LastExtraDecl
CXCursor_LastInvalid
CXCursor_LastPreprocessing
CXCursor_LastRef
CXCursor_LastStmt
CXCursor_LinkageSpec = 23

A linkage specification, e.g. 'extern "C"'.

CXCursor_MacroDefinition = 501
CXCursor_MacroExpansion = 502
CXCursor_MacroInstantiation
CXCursor_MemberRef = 47

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

CXCursor_MemberRefExpr = 102

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

CXCursor_ModuleImportDecl = 600

A module import declaration.

CXCursor_MSAsmStmt = 229

A MS inline assembly statement extension.

CXCursor_Namespace = 22

A C++ namespace.

CXCursor_NamespaceAlias = 33

A C++ namespace alias declaration.

CXCursor_NamespaceRef = 46

A reference to a namespace or namespace alias.

CXCursor_NoDeclFound = 71
CXCursor_NoDuplicateAttr = 411
CXCursor_NonTypeTemplateParameter = 28

A C++ non-type template parameter.

CXCursor_NotImplemented = 72
CXCursor_NSConsumed = 424
CXCursor_NSConsumesSelf = 423
CXCursor_NSReturnsAutoreleased = 422
CXCursor_NSReturnsNotRetained = 421
CXCursor_NSReturnsRetained = 420
CXCursor_NullStmt = 230

The null statement ";": C99 6.8.3p3.

This cursor kind is used to describe the null statement.

CXCursor_ObjCAtCatchStmt = 217

Objective-C's @catch statement.

CXCursor_ObjCAtFinallyStmt = 218

Objective-C's @finally statement.

CXCursor_ObjCAtSynchronizedStmt = 220

Objective-C's @synchronized statement.

CXCursor_ObjCAtThrowStmt = 219

Objective-C's @throw statement.

CXCursor_ObjCAtTryStmt = 216

Objective-C's overall @try-@catch-@finally statement.

CXCursor_ObjCAutoreleasePoolStmt = 221

Objective-C's autorelease pool statement.

CXCursor_ObjCAvailabilityCheckExpr = 148

Represents an @available(...) check.

CXCursor_ObjCBoolLiteralExpr = 145

Objective-c Boolean Literal.

CXCursor_ObjCBoxable = 436
CXCursor_ObjCBridgedCastExpr = 141

An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers, transferring ownership in the process.

  NSString *str = (__bridge_transfer NSString *)CFCreateString();
CXCursor_ObjCCategoryDecl = 12

An Objective-C @interface for a category.

CXCursor_ObjCCategoryImplDecl = 19

An Objective-C @implementation for a category.

CXCursor_ObjCClassMethodDecl = 17

An Objective-C class method.

CXCursor_ObjCClassRef = 42
CXCursor_ObjCDesignatedInitializer = 434
CXCursor_ObjCDynamicDecl = 38

An Objective-C @dynamic definition.

CXCursor_ObjCEncodeExpr = 138

An Objective-C @encode expression.

CXCursor_ObjCException = 425
CXCursor_ObjCExplicitProtocolImpl = 433
CXCursor_ObjCForCollectionStmt = 222

Objective-C's collection statement.

CXCursor_ObjCImplementationDecl = 18

An Objective-C @implementation.

CXCursor_ObjCIndependentClass = 427
CXCursor_ObjCInstanceMethodDecl = 16

An Objective-C instance method.

CXCursor_ObjCInterfaceDecl = 11

An Objective-C @interface.

CXCursor_ObjCIvarDecl = 15

An Objective-C instance variable.

CXCursor_ObjCMessageExpr = 104

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

CXCursor_ObjCNSObject = 426
CXCursor_ObjCPreciseLifetime = 428
CXCursor_ObjCPropertyDecl = 14

An Objective-C @property declaration.

CXCursor_ObjCProtocolDecl = 13

An Objective-C @protocol declaration.

CXCursor_ObjCProtocolExpr = 140

An Objective-C @protocol expression.

CXCursor_ObjCProtocolRef = 41
CXCursor_ObjCRequiresSuper = 430
CXCursor_ObjCReturnsInnerPointer = 429
CXCursor_ObjCRootClass = 431
CXCursor_ObjCRuntimeVisible = 435
CXCursor_ObjCSelectorExpr = 139

An Objective-C @selector expression.

CXCursor_ObjCSelfExpr = 146

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

CXCursor_ObjCStringLiteral = 137

An Objective-C string literal i.e. "foo".

CXCursor_ObjCSubclassingRestricted = 432
CXCursor_ObjCSuperClassRef = 40
CXCursor_ObjCSynthesizeDecl = 37

An Objective-C @synthesize definition.

CXCursor_OMPArraySectionExpr = 147

OpenMP 5.0 [2.1.5, Array Section].

CXCursor_OMPArrayShapingExpr = 150

OpenMP 5.0 [2.1.4, Array Shaping].

CXCursor_OMPAtomicDirective = 249

OpenMP atomic directive.

CXCursor_OMPBarrierDirective = 244

OpenMP barrier directive.

CXCursor_OMPCancelDirective = 256

OpenMP cancel directive.

CXCursor_OMPCancellationPointDirective = 255

OpenMP cancellation point directive.

CXCursor_OMPCanonicalLoop = 289

OpenMP canonical loop.

CXCursor_OMPCriticalDirective = 242

OpenMP critical directive.

CXCursor_OMPDepobjDirective = 286

OpenMP depobj directive.

CXCursor_OMPDispatchDirective = 291

OpenMP dispatch directive.

CXCursor_OMPDistributeDirective = 260

OpenMP distribute directive.

CXCursor_OMPDistributeParallelForDirective = 266

OpenMP distribute parallel for directive.

CXCursor_OMPDistributeParallelForSimdDirective = 267

OpenMP distribute parallel for simd directive.

CXCursor_OMPDistributeSimdDirective = 268

OpenMP distribute simd directive.

CXCursor_OMPErrorDirective = 305

OpenMP error directive.

CXCursor_OMPFlushDirective = 246

OpenMP flush directive.

CXCursor_OMPForDirective = 234

OpenMP for directive.

CXCursor_OMPForSimdDirective = 250

OpenMP for SIMD directive.

CXCursor_OMPGenericLoopDirective = 295

OpenMP loop directive.

CXCursor_OMPInteropDirective = 290

OpenMP interop directive.

CXCursor_OMPIteratorExpr = 151

OpenMP 5.0 [2.1.6 Iterators]

CXCursor_OMPMaskedDirective = 292

OpenMP masked directive.

CXCursor_OMPMaskedTaskLoopDirective = 301

OpenMP masked taskloop directive.

CXCursor_OMPMaskedTaskLoopSimdDirective = 302

OpenMP masked taskloop simd directive.

CXCursor_OMPMasterDirective = 241

OpenMP master directive.

CXCursor_OMPMasterTaskLoopDirective = 281

OpenMP master taskloop directive.

CXCursor_OMPMasterTaskLoopSimdDirective = 283

OpenMP master taskloop simd directive.

CXCursor_OMPMetaDirective = 294

OpenMP metadirective directive.

CXCursor_OMPOrderedDirective = 248

OpenMP ordered directive.

CXCursor_OMPParallelDirective = 232

OpenMP parallel directive.

CXCursor_OMPParallelForDirective = 238

OpenMP parallel for directive.

CXCursor_OMPParallelForSimdDirective = 251

OpenMP parallel for SIMD directive.

CXCursor_OMPParallelGenericLoopDirective = 298

OpenMP parallel loop directive.

CXCursor_OMPParallelMaskedDirective = 300

OpenMP parallel masked directive.

CXCursor_OMPParallelMaskedTaskLoopDirective = 303

OpenMP parallel masked taskloop directive.

CXCursor_OMPParallelMaskedTaskLoopSimdDirective = 304

OpenMP parallel masked taskloop simd directive.

CXCursor_OMPParallelMasterDirective = 285

OpenMP parallel master directive.

CXCursor_OMPParallelMasterTaskLoopDirective = 282

OpenMP parallel master taskloop directive.

CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284

OpenMP parallel master taskloop simd directive.

CXCursor_OMPParallelSectionsDirective = 239

OpenMP parallel sections directive.

CXCursor_OMPScanDirective = 287

OpenMP scan directive.

CXCursor_OMPSectionDirective = 236

OpenMP section directive.

CXCursor_OMPSectionsDirective = 235

OpenMP sections directive.

CXCursor_OMPSimdDirective = 233

OpenMP SIMD directive.

CXCursor_OMPSingleDirective = 237

OpenMP single directive.

CXCursor_OMPTargetDataDirective = 257

OpenMP target data directive.

CXCursor_OMPTargetDirective = 252

OpenMP target directive.

CXCursor_OMPTargetEnterDataDirective = 261

OpenMP target enter data directive.

CXCursor_OMPTargetExitDataDirective = 262

OpenMP target exit data directive.

CXCursor_OMPTargetParallelDirective = 263

OpenMP target parallel directive.

CXCursor_OMPTargetParallelForDirective = 264

OpenMP target parallel for directive.

CXCursor_OMPTargetParallelForSimdDirective = 269

OpenMP target parallel for simd directive.

CXCursor_OMPTargetParallelGenericLoopDirective = 299

OpenMP target parallel loop directive.

CXCursor_OMPTargetSimdDirective = 270

OpenMP target simd directive.

CXCursor_OMPTargetTeamsDirective = 275

OpenMP target teams directive.

CXCursor_OMPTargetTeamsDistributeDirective = 276

OpenMP target teams distribute directive.

CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277

OpenMP target teams distribute parallel for directive.

CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective = 278

OpenMP target teams distribute parallel for simd directive.

CXCursor_OMPTargetTeamsDistributeSimdDirective = 279

OpenMP target teams distribute simd directive.

CXCursor_OMPTargetTeamsGenericLoopDirective = 297

OpenMP target teams loop directive.

CXCursor_OMPTargetUpdateDirective = 265

OpenMP target update directive.

CXCursor_OMPTaskDirective = 240

OpenMP task directive.

CXCursor_OMPTaskgroupDirective = 254

OpenMP taskgroup directive.

CXCursor_OMPTaskLoopDirective = 258

OpenMP taskloop directive.

CXCursor_OMPTaskLoopSimdDirective = 259

OpenMP taskloop simd directive.

CXCursor_OMPTaskwaitDirective = 245

OpenMP taskwait directive.

CXCursor_OMPTaskyieldDirective = 243

OpenMP taskyield directive.

CXCursor_OMPTeamsDirective = 253

OpenMP teams directive.

CXCursor_OMPTeamsDistributeDirective = 271

OpenMP teams distribute directive.

CXCursor_OMPTeamsDistributeParallelForDirective = 274

OpenMP teams distribute parallel for directive.

CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273

OpenMP teams distribute parallel for simd directive.

CXCursor_OMPTeamsDistributeSimdDirective = 272

OpenMP teams distribute simd directive.

CXCursor_OMPTeamsGenericLoopDirective = 296

OpenMP teams loop directive.

CXCursor_OMPTileDirective = 288

OpenMP tile directive.

CXCursor_OMPUnrollDirective = 293

OpenMP unroll directive.

CXCursor_OverloadCandidate = 700

A code completion overload candidate.

CXCursor_OverloadedDeclRef = 49

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:

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&);

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 clang_getNumOverloadedDecls() and clang_getOverloadedDecl() can be used to retrieve the definitions referenced by this cursor.

CXCursor_PackedAttr = 408
CXCursor_PackExpansionExpr = 142

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:

template<typename F, typename ...Types>
void forward(F f, Types &&...args) {
 f(static_cast<Types&&>(args)...);
}
CXCursor_ParenExpr = 111

A parenthesized expression, e.g. "(1)".

This AST node is only formed if full location information is requested.

CXCursor_ParmDecl = 10

A function or method parameter.

CXCursor_PreprocessingDirective = 500
CXCursor_PureAttr = 409
CXCursor_RequiresExpr = 154
CXCursor_ReturnStmt = 214

A return statement.

CXCursor_SEHExceptStmt = 227

Windows Structured Exception Handling's except statement.

CXCursor_SEHFinallyStmt = 228

Windows Structured Exception Handling's finally statement.

CXCursor_SEHLeaveStmt = 247

Windows Structured Exception Handling's leave statement.

CXCursor_SEHTryStmt = 226

Windows Structured Exception Handling's try statement.

CXCursor_SizeOfPackExpr = 143

Represents an expression that computes the length of a parameter pack.

template<typename ...Types>
struct count {
  static const unsigned value = sizeof...(Types);
};
CXCursor_StaticAssert = 602

A static_assert or _Static_assert node

CXCursor_StmtExpr = 121

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

CXCursor_StringLiteral = 109

A string literal.

CXCursor_StructDecl = 2

A C or C++ struct.

CXCursor_SwitchStmt = 206

A switch statement.

CXCursor_TemplateRef = 45

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

CXCursor_TemplateTemplateParameter = 29

A C++ template template parameter.

CXCursor_TemplateTypeParameter = 27

A C++ template type parameter.

CXCursor_TranslationUnit = 350

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.

CXCursor_TypeAliasDecl = 36

A C++ alias declaration

CXCursor_TypeAliasTemplateDecl = 601
CXCursor_TypedefDecl = 20

A typedef.

CXCursor_TypeRef = 43

A reference to a type declaration.

A type reference occurs anywhere where a type is named but not declared. For example, given:

typedef unsigned size_type;
size_type size;

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.

CXCursor_UnaryExpr = 136

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

CXCursor_UnaryOperator = 112

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

CXCursor_UnexposedAttr = 400

An attribute whose specific kind is not exposed via this interface.

CXCursor_UnexposedDecl = 1

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.

CXCursor_UnexposedExpr = 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.

CXCursor_UnexposedStmt = 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.

CXCursor_UnionDecl = 3

A C or C++ union.

CXCursor_UsingDeclaration = 35

A C++ using declaration.

CXCursor_UsingDirective = 34

A C++ using directive.

CXCursor_VarDecl = 9

A variable.

CXCursor_VariableRef = 50

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

CXCursor_VisibilityAttr = 417
CXCursor_WarnUnusedAttr = 439
CXCursor_WarnUnusedResultAttr = 440
CXCursor_WhileStmt = 207

A while statement.