clang 10.0.0git

Classes | Enumerations | Functions
Type information for CXCursors
libclang: C Interface to Clang
Collaboration diagram for Type information for CXCursors:

## Classes
struct | CXType
| The type of an element in the abstract syntax tree. More...

## Enumerations
enum | CXTypeKind { CXType_Invalid = 0, CXType_Unexposed = 1, CXType_Void = 2, CXType_Bool = 3, CXType_Char_U = 4, CXType_UChar = 5, CXType_Char16 = 6, CXType_Char32 = 7, CXType_UShort = 8, CXType_UInt = 9, CXType_ULong = 10, CXType_ULongLong = 11, CXType_UInt128 = 12, CXType_Char_S = 13, CXType_SChar = 14, CXType_WChar = 15, CXType_Short = 16, CXType_Int = 17, CXType_Long = 18, CXType_LongLong = 19, CXType_Int128 = 20, CXType_Float = 21, CXType_Double = 22, CXType_LongDouble = 23, CXType_NullPtr = 24, CXType_Overload = 25, CXType_Dependent = 26, CXType_ObjCId = 27, CXType_ObjCClass = 28, CXType_ObjCSel = 29, CXType_Float128 = 30, CXType_Half = 31, CXType_Float16 = 32, CXType_ShortAccum = 33, CXType_Accum = 34, CXType_LongAccum = 35, CXType_UShortAccum = 36, CXType_UAccum = 37, CXType_ULongAccum = 38, CXType_FirstBuiltin = CXType_Void, CXType_LastBuiltin = CXType_ULongAccum, CXType_Complex = 100, CXType_Pointer = 101, CXType_BlockPointer = 102, CXType_LValueReference = 103, CXType_RValueReference = 104, CXType_Record = 105, CXType_Enum = 106, CXType_Typedef = 107, CXType_ObjCInterface = 108, CXType_ObjCObjectPointer = 109, CXType_FunctionNoProto = 110, CXType_FunctionProto = 111, CXType_ConstantArray = 112, CXType_Vector = 113, CXType_IncompleteArray = 114, CXType_VariableArray = 115, CXType_DependentSizedArray = 116, CXType_MemberPointer = 117, CXType_Auto = 118, CXType_Elaborated = 119, CXType_Pipe = 120, CXType_OCLImage1dRO = 121, CXType_OCLImage1dArrayRO = 122, CXType_OCLImage1dBufferRO = 123, CXType_OCLImage2dRO = 124, CXType_OCLImage2dArrayRO = 125, CXType_OCLImage2dDepthRO = 126, CXType_OCLImage2dArrayDepthRO = 127, CXType_OCLImage2dMSAARO = 128, CXType_OCLImage2dArrayMSAARO = 129, CXType_OCLImage2dMSAADepthRO = 130, CXType_OCLImage2dArrayMSAADepthRO = 131, CXType_OCLImage3dRO = 132, CXType_OCLImage1dWO = 133, CXType_OCLImage1dArrayWO = 134, CXType_OCLImage1dBufferWO = 135, CXType_OCLImage2dWO = 136, CXType_OCLImage2dArrayWO = 137, CXType_OCLImage2dDepthWO = 138, CXType_OCLImage2dArrayDepthWO = 139, CXType_OCLImage2dMSAAWO = 140, CXType_OCLImage2dArrayMSAAWO = 141, CXType_OCLImage2dMSAADepthWO = 142, CXType_OCLImage2dArrayMSAADepthWO = 143, CXType_OCLImage3dWO = 144, CXType_OCLImage1dRW = 145, CXType_OCLImage1dArrayRW = 146, CXType_OCLImage1dBufferRW = 147, CXType_OCLImage2dRW = 148, CXType_OCLImage2dArrayRW = 149, CXType_OCLImage2dDepthRW = 150, CXType_OCLImage2dArrayDepthRW = 151, CXType_OCLImage2dMSAARW = 152, CXType_OCLImage2dArrayMSAARW = 153, CXType_OCLImage2dMSAADepthRW = 154, CXType_OCLImage2dArrayMSAADepthRW = 155, CXType_OCLImage3dRW = 156, CXType_OCLSampler = 157, CXType_OCLEvent = 158, CXType_OCLQueue = 159, CXType_OCLReserveID = 160, CXType_ObjCObject = 161, CXType_ObjCTypeParam = 162, CXType_Attributed = 163, CXType_OCLIntelSubgroupAVCMcePayload = 164, CXType_OCLIntelSubgroupAVCImePayload = 165, CXType_OCLIntelSubgroupAVCRefPayload = 166, CXType_OCLIntelSubgroupAVCSicPayload = 167, CXType_OCLIntelSubgroupAVCMceResult = 168, CXType_OCLIntelSubgroupAVCImeResult = 169, CXType_OCLIntelSubgroupAVCRefResult = 170, CXType_OCLIntelSubgroupAVCSicResult = 171, CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout = 172, CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout = 173, CXType_OCLIntelSubgroupAVCImeSingleRefStreamin = 174, CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175, CXType_ExtVector = 176 }
| Describes the kind of type. More...
enum | CXCallingConv { CXCallingConv_Default = 0, CXCallingConv_C = 1, CXCallingConv_X86StdCall = 2, CXCallingConv_X86FastCall = 3, CXCallingConv_X86ThisCall = 4, CXCallingConv_X86Pascal = 5, CXCallingConv_AAPCS = 6, CXCallingConv_AAPCS_VFP = 7, CXCallingConv_X86RegCall = 8, CXCallingConv_IntelOclBicc = 9, CXCallingConv_Win64 = 10, CXCallingConv_X86_64Win64 = CXCallingConv_Win64, CXCallingConv_X86_64SysV = 11, CXCallingConv_X86VectorCall = 12, CXCallingConv_Swift = 13, CXCallingConv_PreserveMost = 14, CXCallingConv_PreserveAll = 15, CXCallingConv_AArch64VectorCall = 16, CXCallingConv_Invalid = 100, CXCallingConv_Unexposed = 200 }
| Describes the calling convention of a function type. More...
enum | CXTemplateArgumentKind { CXTemplateArgumentKind_Null, CXTemplateArgumentKind_Type, CXTemplateArgumentKind_Declaration, CXTemplateArgumentKind_NullPtr, CXTemplateArgumentKind_Integral, CXTemplateArgumentKind_Template, CXTemplateArgumentKind_TemplateExpansion, CXTemplateArgumentKind_Expression, CXTemplateArgumentKind_Pack, CXTemplateArgumentKind_Invalid }
| Describes the kind of a template argument. More...
enum | CXTypeNullabilityKind { CXTypeNullability_NonNull = 0, CXTypeNullability_Nullable = 1, CXTypeNullability_Unspecified = 2, CXTypeNullability_Invalid = 3 }
enum | CXTypeLayoutError { CXTypeLayoutError_Invalid = -1, CXTypeLayoutError_Incomplete = -2, CXTypeLayoutError_Dependent = -3, CXTypeLayoutError_NotConstantSize = -4, CXTypeLayoutError_InvalidFieldName = -5, CXTypeLayoutError_Undeduced = -6 }
| List the possible error codes for `clang_Type_getSizeOf`, `clang_Type_getAlignOf`, `clang_Type_getOffsetOf` and `clang_Cursor_getOffsetOf`. More...
enum | CXRefQualifierKind { CXRefQualifier_None = 0, CXRefQualifier_LValue, CXRefQualifier_RValue }
enum | CX_CXXAccessSpecifier { CX_CXXInvalidAccessSpecifier, CX_CXXPublic, CX_CXXProtected, CX_CXXPrivate }
| Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier. More...
enum | CX_StorageClass { CX_SC_Invalid, CX_SC_None, CX_SC_Extern, CX_SC_Static, CX_SC_PrivateExtern, CX_SC_OpenCLWorkGroupLocal, CX_SC_Auto, CX_SC_Register }
| Represents the storage classes as declared in the source. More...

## Functions
CINDEX_LINKAGE CXType | clang_getCursorType (CXCursor C)
| Retrieve the type of a CXCursor (if any). More...
CINDEX_LINKAGE CXString | clang_getTypeSpelling (CXType CT)
| Pretty-print the underlying type using the rules of the language of the translation unit from which it came. More...
CINDEX_LINKAGE CXType | clang_getTypedefDeclUnderlyingType (CXCursor C)
| Retrieve the underlying type of a typedef declaration. More...
CINDEX_LINKAGE CXType | clang_getEnumDeclIntegerType (CXCursor C)
| Retrieve the integer type of an enum declaration. More...
CINDEX_LINKAGE long long | clang_getEnumConstantDeclValue (CXCursor C)
| Retrieve the integer value of an enum constant declaration as a signed long long. More...
CINDEX_LINKAGE unsigned long long | clang_getEnumConstantDeclUnsignedValue (CXCursor C)
| Retrieve the integer value of an enum constant declaration as an unsigned long long. More...
CINDEX_LINKAGE int | clang_getFieldDeclBitWidth (CXCursor C)
| Retrieve the bit width of a bit field declaration as an integer. More...
CINDEX_LINKAGE int | clang_Cursor_getNumArguments (CXCursor C)
| Retrieve the number of non-variadic arguments associated with a given cursor. More...
CINDEX_LINKAGE CXCursor | clang_Cursor_getArgument (CXCursor C, unsigned i)
| Retrieve the argument cursor of a function or method. More...
CINDEX_LINKAGE int | clang_Cursor_getNumTemplateArguments (CXCursor C)
| Returns the number of template args of a function decl representing a template specialization. More...
CINDEX_LINKAGE enum CXTemplateArgumentKind | clang_Cursor_getTemplateArgumentKind (CXCursor C, unsigned I)
| Retrieve the kind of the I'th template argument of the CXCursor C. More...
CINDEX_LINKAGE CXType | clang_Cursor_getTemplateArgumentType (CXCursor C, unsigned I)
| Retrieve a CXType representing the type of a TemplateArgument of a function decl representing a template specialization. More...
CINDEX_LINKAGE long long | clang_Cursor_getTemplateArgumentValue (CXCursor C, unsigned I)
| Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as a signed long long. More...
CINDEX_LINKAGE unsigned long long | clang_Cursor_getTemplateArgumentUnsignedValue (CXCursor C, unsigned I)
| Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as an unsigned long long. More...
CINDEX_LINKAGE unsigned | clang_equalTypes (CXType A, CXType B)
| Determine whether two CXTypes represent the same type. More...
CINDEX_LINKAGE CXType | clang_getCanonicalType (CXType T)
| Return the canonical type for a CXType. More...
CINDEX_LINKAGE unsigned | clang_isConstQualifiedType (CXType T)
| Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isMacroFunctionLike (CXCursor C)
| Determine whether a CXCursor that is a macro, is function like. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isMacroBuiltin (CXCursor C)
| Determine whether a CXCursor that is a macro, is a builtin one. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isFunctionInlined (CXCursor C)
| Determine whether a CXCursor that is a function declaration, is an inline declaration. More...
CINDEX_LINKAGE unsigned | clang_isVolatileQualifiedType (CXType T)
| Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level. More...
CINDEX_LINKAGE unsigned | clang_isRestrictQualifiedType (CXType T)
| Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level. More...
CINDEX_LINKAGE unsigned | clang_getAddressSpace (CXType T)
| Returns the address space of the given type. More...
CINDEX_LINKAGE CXString | clang_getTypedefName (CXType CT)
| Returns the typedef name of the given type. More...
CINDEX_LINKAGE CXType | clang_getPointeeType (CXType T)
| For pointer types, returns the type of the pointee. More...
CINDEX_LINKAGE CXCursor | clang_getTypeDeclaration (CXType T)
| Return the cursor for the declaration of the given type. More...
CINDEX_LINKAGE CXString | clang_getDeclObjCTypeEncoding (CXCursor C)
| Returns the Objective-C type encoding for the specified declaration. More...
CINDEX_LINKAGE CXString | clang_Type_getObjCEncoding (CXType type)
| Returns the Objective-C type encoding for the specified CXType. More...
CINDEX_LINKAGE CXString | clang_getTypeKindSpelling (enum CXTypeKind K)
| Retrieve the spelling of a given CXTypeKind. More...
CINDEX_LINKAGE enum CXCallingConv | clang_getFunctionTypeCallingConv (CXType T)
| Retrieve the calling convention associated with a function type. More...
CINDEX_LINKAGE CXType | clang_getResultType (CXType T)
| Retrieve the return type associated with a function type. More...
CINDEX_LINKAGE int | clang_getExceptionSpecificationType (CXType T)
| Retrieve the exception specification type associated with a function type. More...
CINDEX_LINKAGE int | clang_getNumArgTypes (CXType T)
| Retrieve the number of non-variadic parameters associated with a function type. More...
CINDEX_LINKAGE CXType | clang_getArgType (CXType T, unsigned i)
| Retrieve the type of a parameter of a function type. More...
CINDEX_LINKAGE CXType | clang_Type_getObjCObjectBaseType (CXType T)
| Retrieves the base type of the ObjCObjectType. More...
CINDEX_LINKAGE unsigned | clang_Type_getNumObjCProtocolRefs (CXType T)
| Retrieve the number of protocol references associated with an ObjC object/id. More...
CINDEX_LINKAGE CXCursor | clang_Type_getObjCProtocolDecl (CXType T, unsigned i)
| Retrieve the decl for a protocol reference for an ObjC object/id. More...
CINDEX_LINKAGE unsigned | clang_Type_getNumObjCTypeArgs (CXType T)
| Retreive the number of type arguments associated with an ObjC object. More...
CINDEX_LINKAGE CXType | clang_Type_getObjCTypeArg (CXType T, unsigned i)
| Retrieve a type argument associated with an ObjC object. More...
CINDEX_LINKAGE unsigned | clang_isFunctionTypeVariadic (CXType T)
| Return 1 if the CXType is a variadic function type, and 0 otherwise. More...
CINDEX_LINKAGE CXType | clang_getCursorResultType (CXCursor C)
| Retrieve the return type associated with a given cursor. More...
CINDEX_LINKAGE int | clang_getCursorExceptionSpecificationType (CXCursor C)
| Retrieve the exception specification type associated with a given cursor. More...
CINDEX_LINKAGE unsigned | clang_isPODType (CXType T)
| Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise. More...
CINDEX_LINKAGE CXType | clang_getElementType (CXType T)
| Return the element type of an array, complex, or vector type. More...
CINDEX_LINKAGE long long | clang_getNumElements (CXType T)
| Return the number of elements of an array or vector type. More...
CINDEX_LINKAGE CXType | clang_getArrayElementType (CXType T)
| Return the element type of an array type. More...
CINDEX_LINKAGE long long | clang_getArraySize (CXType T)
| Return the array size of a constant array. More...
CINDEX_LINKAGE CXType | clang_Type_getNamedType (CXType T)
| Retrieve the type named by the qualified-id. More...
CINDEX_LINKAGE unsigned | clang_Type_isTransparentTagTypedef (CXType T)
| Determine if a typedef is 'transparent' tag. More...
CINDEX_LINKAGE enum CXTypeNullabilityKind | clang_Type_getNullability (CXType T)
| Retrieve the nullability kind of a pointer type. More...
CINDEX_LINKAGE long long | clang_Type_getAlignOf (CXType T)
| Return the alignment of a type in bytes as per C++[expr.alignof] standard. More...
CINDEX_LINKAGE CXType | clang_Type_getClassType (CXType T)
| Return the class type of an member pointer type. More...
CINDEX_LINKAGE long long | clang_Type_getSizeOf (CXType T)
| Return the size of a type in bytes as per C++[expr.sizeof] standard. More...
CINDEX_LINKAGE long long | clang_Type_getOffsetOf (CXType T, const char *S)
| Return the offset of a field named S in a record of type T in bits as it would be returned by offsetof as per C++11[18.2p4]. More...
CINDEX_LINKAGE CXType | clang_Type_getModifiedType (CXType T)
| Return the type that was modified by this attributed type. More...
CINDEX_LINKAGE long long | clang_Cursor_getOffsetOfField (CXCursor C)
| Return the offset of the field represented by the Cursor. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isAnonymous (CXCursor C)
| Determine whether the given cursor represents an anonymous tag or namespace. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isAnonymousRecordDecl (CXCursor C)
| Determine whether the given cursor represents an anonymous record declaration. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isInlineNamespace (CXCursor C)
| Determine whether the given cursor represents an inline namespace declaration. More...
CINDEX_LINKAGE int | clang_Type_getNumTemplateArguments (CXType T)
| Returns the number of template arguments for given template specialization, or -1 if type `T` is not a template specialization. More...
CINDEX_LINKAGE CXType | clang_Type_getTemplateArgumentAsType (CXType T, unsigned i)
| Returns the type template argument of a template class specialization at given index. More...
CINDEX_LINKAGE enum CXRefQualifierKind | clang_Type_getCXXRefQualifier (CXType T)
| Retrieve the ref-qualifier kind of a function or method. More...
CINDEX_LINKAGE unsigned | clang_Cursor_isBitField (CXCursor C)
| Returns non-zero if the cursor specifies a Record member that is a bitfield. More...
CINDEX_LINKAGE unsigned | clang_isVirtualBase (CXCursor)
| Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual. More...
CINDEX_LINKAGE enum CX_CXXAccessSpecifier | clang_getCXXAccessSpecifier (CXCursor)
| Returns the access control level for the referenced object. More...
CINDEX_LINKAGE enum CX_StorageClass | clang_Cursor_getStorageClass (CXCursor)
| Returns the storage class for a function or variable declaration. More...
CINDEX_LINKAGE unsigned | clang_getNumOverloadedDecls (CXCursor cursor)
| Determine the number of overloaded declarations referenced by a `CXCursor_OverloadedDeclRef` cursor. More...
CINDEX_LINKAGE CXCursor | clang_getOverloadedDecl (CXCursor cursor, unsigned index)
| Retrieve a cursor for one of the overloaded declarations referenced by a `CXCursor_OverloadedDeclRef` cursor. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ CX_CXXAccessSpecifier

enum CX_CXXAccessSpecifier

Represents the C++ access control level to a base class for a cursor with kind CX_CXXBaseSpecifier.

Enumerator
CX_CXXInvalidAccessSpecifier |
CX_CXXPublic |
CX_CXXProtected |
CX_CXXPrivate |

Definition at line 4032 of file Index.h.

## ◆ CX_StorageClass

enum CX_StorageClass

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.

Enumerator
CX_SC_Invalid |
CX_SC_None |
CX_SC_Extern |
CX_SC_Static |
CX_SC_PrivateExtern |
CX_SC_OpenCLWorkGroupLocal |
CX_SC_Auto |
CX_SC_Register |

Definition at line 4052 of file Index.h.

## ◆ CXCallingConv

enum CXCallingConv

Describes the calling convention of a function type.

Enumerator
CXCallingConv_Default |
CXCallingConv_C |
CXCallingConv_X86StdCall |
CXCallingConv_X86FastCall |
CXCallingConv_X86ThisCall |
CXCallingConv_X86Pascal |
CXCallingConv_AAPCS |
CXCallingConv_AAPCS_VFP |
CXCallingConv_X86RegCall |
CXCallingConv_IntelOclBicc |
CXCallingConv_Win64 |
CXCallingConv_X86_64Win64 |
CXCallingConv_X86_64SysV |
CXCallingConv_X86VectorCall |
CXCallingConv_Swift |
CXCallingConv_PreserveMost |
CXCallingConv_PreserveAll |
CXCallingConv_AArch64VectorCall |
CXCallingConv_Invalid |
CXCallingConv_Unexposed |

Definition at line 3369 of file Index.h.

## ◆ CXRefQualifierKind

enum CXRefQualifierKind

Enumerator
CXRefQualifier_None | No ref-qualifier was provided.
CXRefQualifier_LValue | An lvalue ref-qualifier was provided (`&`).
CXRefQualifier_RValue | An rvalue ref-qualifier was provided (`&&`).

Definition at line 3984 of file Index.h.

## ◆ CXTemplateArgumentKind

enum CXTemplateArgumentKind

Describes the kind of a template argument.

See the definition of llvm::clang::TemplateArgument::ArgKind for full element descriptions.

Enumerator
CXTemplateArgumentKind_Null |
CXTemplateArgumentKind_Type |
CXTemplateArgumentKind_Declaration |
CXTemplateArgumentKind_NullPtr |
CXTemplateArgumentKind_Integral |
CXTemplateArgumentKind_Template |
CXTemplateArgumentKind_TemplateExpansion |
CXTemplateArgumentKind_Expression |
CXTemplateArgumentKind_Pack |
CXTemplateArgumentKind_Invalid |

Definition at line 3483 of file Index.h.

## ◆ CXTypeKind

enum CXTypeKind

Describes the kind of type.

Enumerator
CXType_Invalid | Represents an invalid type (e.g., where no type is available).
CXType_Unexposed | A type whose specific kind is not exposed via this interface.
CXType_Void |
CXType_Bool |
CXType_Char_U |
CXType_UChar |
CXType_Char16 |
CXType_Char32 |
CXType_UShort |
CXType_UInt |
CXType_ULong |
CXType_ULongLong |
CXType_UInt128 |
CXType_Char_S |
CXType_SChar |
CXType_WChar |
CXType_Short |
CXType_Int |
CXType_Long |
CXType_LongLong |
CXType_Int128 |
CXType_Float |
CXType_Double |
CXType_LongDouble |
CXType_NullPtr |
CXType_Overload |
CXType_Dependent |
CXType_ObjCId |
CXType_ObjCClass |
CXType_ObjCSel |
CXType_Float128 |
CXType_Half |
CXType_Float16 |
CXType_ShortAccum |
CXType_Accum |
CXType_LongAccum |
CXType_UShortAccum |
CXType_UAccum |
CXType_ULongAccum |
CXType_FirstBuiltin |
CXType_LastBuiltin |
CXType_Complex |
CXType_Pointer |
CXType_BlockPointer |
CXType_LValueReference |
CXType_RValueReference |
CXType_Record |
CXType_Enum |
CXType_Typedef |
CXType_ObjCInterface |
CXType_ObjCObjectPointer |
CXType_FunctionNoProto |
CXType_FunctionProto |
CXType_ConstantArray |
CXType_Vector |
CXType_IncompleteArray |
CXType_VariableArray |
CXType_DependentSizedArray |
CXType_MemberPointer |
CXType_Auto |
CXType_Elaborated | 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.
CXType_Pipe |
CXType_OCLImage1dRO |
CXType_OCLImage1dArrayRO |
CXType_OCLImage1dBufferRO |
CXType_OCLImage2dRO |
CXType_OCLImage2dArrayRO |
CXType_OCLImage2dDepthRO |
CXType_OCLImage2dArrayDepthRO |
CXType_OCLImage2dMSAARO |
CXType_OCLImage2dArrayMSAARO |
CXType_OCLImage2dMSAADepthRO |
CXType_OCLImage2dArrayMSAADepthRO |
CXType_OCLImage3dRO |
CXType_OCLImage1dWO |
CXType_OCLImage1dArrayWO |
CXType_OCLImage1dBufferWO |
CXType_OCLImage2dWO |
CXType_OCLImage2dArrayWO |
CXType_OCLImage2dDepthWO |
CXType_OCLImage2dArrayDepthWO |
CXType_OCLImage2dMSAAWO |
CXType_OCLImage2dArrayMSAAWO |
CXType_OCLImage2dMSAADepthWO |
CXType_OCLImage2dArrayMSAADepthWO |
CXType_OCLImage3dWO |
CXType_OCLImage1dRW |
CXType_OCLImage1dArrayRW |
CXType_OCLImage1dBufferRW |
CXType_OCLImage2dRW |
CXType_OCLImage2dArrayRW |
CXType_OCLImage2dDepthRW |
CXType_OCLImage2dArrayDepthRW |
CXType_OCLImage2dMSAARW |
CXType_OCLImage2dArrayMSAARW |
CXType_OCLImage2dMSAADepthRW |
CXType_OCLImage2dArrayMSAADepthRW |
CXType_OCLImage3dRW |
CXType_OCLSampler |
CXType_OCLEvent |
CXType_OCLQueue |
CXType_OCLReserveID |
CXType_ObjCObject |
CXType_ObjCTypeParam |
CXType_Attributed |
CXType_OCLIntelSubgroupAVCMcePayload |
CXType_OCLIntelSubgroupAVCImePayload |
CXType_OCLIntelSubgroupAVCRefPayload |
CXType_OCLIntelSubgroupAVCSicPayload |
CXType_OCLIntelSubgroupAVCMceResult |
CXType_OCLIntelSubgroupAVCImeResult |
CXType_OCLIntelSubgroupAVCRefResult |
CXType_OCLIntelSubgroupAVCSicResult |
CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout |
CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout |
CXType_OCLIntelSubgroupAVCImeSingleRefStreamin |
CXType_OCLIntelSubgroupAVCImeDualRefStreamin |
CXType_ExtVector |

Definition at line 3220 of file Index.h.

## ◆ CXTypeLayoutError

enum CXTypeLayoutError

List the possible error codes for `clang_Type_getSizeOf`, `clang_Type_getAlignOf`, `clang_Type_getOffsetOf` and `clang_Cursor_getOffsetOf`.

A value of this enumeration type can be returned if the target type is not a valid argument to sizeof, alignof or offsetof.

Enumerator
CXTypeLayoutError_Invalid | Type is of kind CXType_Invalid.
CXTypeLayoutError_Incomplete | The type is an incomplete Type.
CXTypeLayoutError_Dependent | The type is a dependent Type.
CXTypeLayoutError_NotConstantSize | The type is not a constant size type.
CXTypeLayoutError_InvalidFieldName | The Field name is not valid for this record.
CXTypeLayoutError_Undeduced | The type is undeduced.

Definition at line 3870 of file Index.h.

## ◆ CXTypeNullabilityKind

enum CXTypeNullabilityKind

Enumerator
CXTypeNullability_NonNull | Values of this type can never be null.
CXTypeNullability_Nullable | Values of this type can be null.
CXTypeNullability_Unspecified | Whether values of this type can be null is (explicitly) unspecified. This captures a (fairly rare) case where we can't conclude anything about the nullability of the type even though it has been considered.
CXTypeNullability_Invalid | Nullability is not applicable to this type.

Definition at line 3835 of file Index.h.

## Function Documentation

## ◆ clang_Cursor_getArgument()

CINDEX_LINKAGE CXCursor clang_Cursor_getArgument | ( | CXCursor | C,
|  | unsigned | i
| ) |  |

Retrieve the argument cursor of a function or method.

The argument cursor can be determined for calls as well as for declarations of functions or methods. For other cursors and for invalid indices, an invalid cursor is returned.

## ◆ clang_Cursor_getNumArguments()

CINDEX_LINKAGE int clang_Cursor_getNumArguments | ( | CXCursor | C | ) |

Retrieve the number of non-variadic arguments associated with a given cursor.

The number of arguments can be determined for calls as well as for declarations of functions or methods. For other cursors -1 is returned.

## ◆ clang_Cursor_getNumTemplateArguments()

CINDEX_LINKAGE int clang_Cursor_getNumTemplateArguments | ( | CXCursor | C | ) |

Returns the number of template args of a function decl representing a template specialization.

If the argument cursor cannot be converted into a template function declaration, -1 is returned.

For example, for the following declaration and specialization: template <typename T, int kInt, bool kBool> void foo() { ... }

template <> void foo<float, -7, true>();

The value 3 would be returned from this call.

## ◆ clang_Cursor_getOffsetOfField()

CINDEX_LINKAGE long long clang_Cursor_getOffsetOfField | ( | CXCursor | C | ) |

Return the offset of the field represented by the Cursor.

If the cursor is not a field declaration, -1 is returned. If the cursor semantic parent is not a record field declaration, CXTypeLayoutError_Invalid is returned. If the field's type declaration is an incomplete type, CXTypeLayoutError_Incomplete is returned. If the field's type declaration is a dependent type, CXTypeLayoutError_Dependent is returned. If the field's name S is not found, CXTypeLayoutError_InvalidFieldName is returned.

## ◆ clang_Cursor_getStorageClass()

CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass | ( | CXCursor |  | ) |

Returns the storage class for a function or variable declaration.

If the passed in Cursor is not a function or variable declaration, CX_SC_Invalid is returned else the storage class.

## ◆ clang_Cursor_getTemplateArgumentKind()

CINDEX_LINKAGE enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind | ( | CXCursor | C,
|  | unsigned | I
| ) |  |

Retrieve the kind of the I'th template argument of the CXCursor C.

If the argument CXCursor does not represent a FunctionDecl, an invalid template argument kind is returned.

For example, for the following declaration and specialization: template <typename T, int kInt, bool kBool> void foo() { ... }

template <> void foo<float, -7, true>();

For I = 0, 1, and 2, Type, Integral, and Integral will be returned, respectively.

## ◆ clang_Cursor_getTemplateArgumentType()

CINDEX_LINKAGE CXType clang_Cursor_getTemplateArgumentType | ( | CXCursor | C,
|  | unsigned | I
| ) |  |

Retrieve a CXType representing the type of a TemplateArgument of a function decl representing a template specialization.

If the argument CXCursor does not represent a FunctionDecl whose I'th template argument has a kind of CXTemplateArgKind_Integral, an invalid type is returned.

For example, for the following declaration and specialization: template <typename T, int kInt, bool kBool> void foo() { ... }

template <> void foo<float, -7, true>();

If called with I = 0, "float", will be returned. Invalid types will be returned for I == 1 or 2.

## ◆ clang_Cursor_getTemplateArgumentUnsignedValue()

CINDEX_LINKAGE unsigned long long clang_Cursor_getTemplateArgumentUnsignedValue | ( | CXCursor | C,
|  | unsigned | I
| ) |  |

Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as an unsigned long long.

It is undefined to call this function on a CXCursor that does not represent a FunctionDecl or whose I'th template argument is not an integral value.

For example, for the following declaration and specialization: template <typename T, int kInt, bool kBool> void foo() { ... }

template <> void foo<float, 2147483649, true>();

If called with I = 1 or 2, 2147483649 or true will be returned, respectively. For I == 0, this function's behavior is undefined.

## ◆ clang_Cursor_getTemplateArgumentValue()

CINDEX_LINKAGE long long clang_Cursor_getTemplateArgumentValue | ( | CXCursor | C,
|  | unsigned | I
| ) |  |

Retrieve the value of an Integral TemplateArgument (of a function decl representing a template specialization) as a signed long long.

It is undefined to call this function on a CXCursor that does not represent a FunctionDecl or whose I'th template argument is not an integral value.

For example, for the following declaration and specialization: template <typename T, int kInt, bool kBool> void foo() { ... }

template <> void foo<float, -7, true>();

If called with I = 1 or 2, -7 or true will be returned, respectively. For I == 0, this function's behavior is undefined.

## ◆ clang_Cursor_isAnonymous()

CINDEX_LINKAGE unsigned clang_Cursor_isAnonymous | ( | CXCursor | C | ) |

Determine whether the given cursor represents an anonymous tag or namespace.

## ◆ clang_Cursor_isAnonymousRecordDecl()

CINDEX_LINKAGE unsigned clang_Cursor_isAnonymousRecordDecl | ( | CXCursor | C | ) |

Determine whether the given cursor represents an anonymous record declaration.

## ◆ clang_Cursor_isBitField()

CINDEX_LINKAGE unsigned clang_Cursor_isBitField | ( | CXCursor | C | ) |

Returns non-zero if the cursor specifies a Record member that is a bitfield.

## ◆ clang_Cursor_isFunctionInlined()

CINDEX_LINKAGE unsigned clang_Cursor_isFunctionInlined | ( | CXCursor | C | ) |

Determine whether a CXCursor that is a function declaration, is an inline declaration.

## ◆ clang_Cursor_isInlineNamespace()

CINDEX_LINKAGE unsigned clang_Cursor_isInlineNamespace | ( | CXCursor | C | ) |

Determine whether the given cursor represents an inline namespace declaration.

## ◆ clang_Cursor_isMacroBuiltin()

CINDEX_LINKAGE unsigned clang_Cursor_isMacroBuiltin | ( | CXCursor | C | ) |

Determine whether a CXCursor that is a macro, is a builtin one.

## ◆ clang_Cursor_isMacroFunctionLike()

CINDEX_LINKAGE unsigned clang_Cursor_isMacroFunctionLike | ( | CXCursor | C | ) |

Determine whether a CXCursor that is a macro, is function like.

## ◆ clang_equalTypes()

CINDEX_LINKAGE unsigned clang_equalTypes | ( | CXType | A,
|  | CXType | B
| ) |  |

Determine whether two CXTypes represent the same type.

Returns
  non-zero if the CXTypes represent the same type and zero otherwise.

## ◆ clang_getAddressSpace()

CINDEX_LINKAGE unsigned clang_getAddressSpace | ( | CXType | T | ) |

Returns the address space of the given type.

## ◆ clang_getArgType()

CINDEX_LINKAGE CXType clang_getArgType | ( | CXType | T,
|  | unsigned | i
| ) |  |

Retrieve the type of a parameter of a function type.

If a non-function type is passed in or the function does not have enough parameters, an invalid type is returned.

## ◆ clang_getArrayElementType()

CINDEX_LINKAGE CXType clang_getArrayElementType | ( | CXType | T | ) |

Return the element type of an array type.

If a non-array type is passed in, an invalid type is returned.

## ◆ clang_getArraySize()

CINDEX_LINKAGE long long clang_getArraySize | ( | CXType | T | ) |

Return the array size of a constant array.

If a non-array type is passed in, -1 is returned.

## ◆ clang_getCanonicalType()

CINDEX_LINKAGE CXType clang_getCanonicalType | ( | CXType | T | ) |

Return the canonical type for a CXType.

Clang's type system explicitly models typedefs and all the ways a specific type can be represented. The canonical type is the underlying type with all the "sugar" removed. For example, if 'T' is a typedef for 'int', the canonical type for 'T' would be 'int'.

## ◆ clang_getCursorExceptionSpecificationType()

CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType | ( | CXCursor | C | ) |

Retrieve the exception specification type associated with a given cursor.

This is a value of type CXCursor_ExceptionSpecificationKind.

This only returns a valid result if the cursor refers to a function or method.

## ◆ clang_getCursorResultType()

CINDEX_LINKAGE CXType clang_getCursorResultType | ( | CXCursor | C | ) |

Retrieve the return type associated with a given cursor.

This only returns a valid type if the cursor refers to a function or method.

## ◆ clang_getCursorType()

CINDEX_LINKAGE CXType clang_getCursorType | ( | CXCursor | C | ) |

Retrieve the type of a CXCursor (if any).

## ◆ clang_getCXXAccessSpecifier()

CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier | ( | CXCursor |  | ) |

Returns the access control level for the referenced object.

If the cursor refers to a C++ declaration, its access control level within its parent scope is returned. Otherwise, if the cursor refers to a base specifier or access specifier, the specifier itself is returned.

## ◆ clang_getDeclObjCTypeEncoding()

CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding | ( | CXCursor | C | ) |

Returns the Objective-C type encoding for the specified declaration.

## ◆ clang_getElementType()

CINDEX_LINKAGE CXType clang_getElementType | ( | CXType | T | ) |

Return the element type of an array, complex, or vector type.

If a type is passed in that is not an array, complex, or vector type, an invalid type is returned.

## ◆ clang_getEnumConstantDeclUnsignedValue()

CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue | ( | CXCursor | C | ) |

Retrieve the integer value of an enum constant declaration as an unsigned long long.

If the cursor does not reference an enum constant declaration, ULLONG_MAX is returned. Since this is also potentially a valid constant value, the kind of the cursor must be verified before calling this function.

## ◆ clang_getEnumConstantDeclValue()

CINDEX_LINKAGE long long clang_getEnumConstantDeclValue | ( | CXCursor | C | ) |

Retrieve the integer value of an enum constant declaration as a signed long long.

If the cursor does not reference an enum constant declaration, LLONG_MIN is returned. Since this is also potentially a valid constant value, the kind of the cursor must be verified before calling this function.

## ◆ clang_getEnumDeclIntegerType()

CINDEX_LINKAGE CXType clang_getEnumDeclIntegerType | ( | CXCursor | C | ) |

Retrieve the integer type of an enum declaration.

If the cursor does not reference an enum declaration, an invalid type is returned.

## ◆ clang_getExceptionSpecificationType()

CINDEX_LINKAGE int clang_getExceptionSpecificationType | ( | CXType | T | ) |

Retrieve the exception specification type associated with a function type.

This is a value of type CXCursor_ExceptionSpecificationKind.

If a non-function type is passed in, an error code of -1 is returned.

## ◆ clang_getFieldDeclBitWidth()

CINDEX_LINKAGE int clang_getFieldDeclBitWidth | ( | CXCursor | C | ) |

Retrieve the bit width of a bit field declaration as an integer.

If a cursor that is not a bit field declaration is passed in, -1 is returned.

## ◆ clang_getFunctionTypeCallingConv()

CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTypeCallingConv | ( | CXType | T | ) |

Retrieve the calling convention associated with a function type.

If a non-function type is passed in, CXCallingConv_Invalid is returned.

## ◆ clang_getNumArgTypes()

CINDEX_LINKAGE int clang_getNumArgTypes | ( | CXType | T | ) |

Retrieve the number of non-variadic parameters associated with a function type.

If a non-function type is passed in, -1 is returned.

## ◆ clang_getNumElements()

CINDEX_LINKAGE long long clang_getNumElements | ( | CXType | T | ) |

Return the number of elements of an array or vector type.

If a type is passed in that is not an array or vector type, -1 is returned.

## ◆ clang_getNumOverloadedDecls()

CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls | ( | CXCursor | cursor | ) |

Determine the number of overloaded declarations referenced by a `CXCursor_OverloadedDeclRef` cursor.

Parameters

  cursor | The cursor whose overloaded declarations are being queried.

Returns
  The number of overloaded declarations referenced by `cursor`. If it is not a `CXCursor_OverloadedDeclRef` cursor, returns 0.

## ◆ clang_getOverloadedDecl()

CINDEX_LINKAGE CXCursor clang_getOverloadedDecl | ( | CXCursor | cursor,
|  | unsigned | index
| ) |  |

Retrieve a cursor for one of the overloaded declarations referenced by a `CXCursor_OverloadedDeclRef` cursor.

Parameters

  cursor | The cursor whose overloaded declarations are being queried.
  index | The zero-based index into the set of overloaded declarations in the cursor.

Returns
  A cursor representing the declaration referenced by the given `cursor` at the specified `index`. If the cursor does not have an associated set of overloaded declarations, or if the index is out of bounds, returns `clang_getNullCursor()`;

## ◆ clang_getPointeeType()

CINDEX_LINKAGE CXType clang_getPointeeType | ( | CXType | T | ) |

For pointer types, returns the type of the pointee.

## ◆ clang_getResultType()

CINDEX_LINKAGE CXType clang_getResultType | ( | CXType | T | ) |

Retrieve the return type associated with a function type.

If a non-function type is passed in, an invalid type is returned.

## ◆ clang_getTypeDeclaration()

CINDEX_LINKAGE CXCursor clang_getTypeDeclaration | ( | CXType | T | ) |

Return the cursor for the declaration of the given type.

## ◆ clang_getTypedefDeclUnderlyingType()

CINDEX_LINKAGE CXType clang_getTypedefDeclUnderlyingType | ( | CXCursor | C | ) |

Retrieve the underlying type of a typedef declaration.

If the cursor does not reference a typedef declaration, an invalid type is returned.

## ◆ clang_getTypedefName()

CINDEX_LINKAGE CXString clang_getTypedefName | ( | CXType | CT | ) |

Returns the typedef name of the given type.

## ◆ clang_getTypeKindSpelling()

CINDEX_LINKAGE CXString clang_getTypeKindSpelling | ( | enum CXTypeKind | K | ) |

Retrieve the spelling of a given CXTypeKind.

## ◆ clang_getTypeSpelling()

CINDEX_LINKAGE CXString clang_getTypeSpelling | ( | CXType | CT | ) |

Pretty-print the underlying type using the rules of the language of the translation unit from which it came.

If the type is invalid, an empty string is returned.

## ◆ clang_isConstQualifiedType()

CINDEX_LINKAGE unsigned clang_isConstQualifiedType | ( | CXType | T | ) |

Determine whether a CXType has the "const" qualifier set, without looking through typedefs that may have added "const" at a different level.

## ◆ clang_isFunctionTypeVariadic()

CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic | ( | CXType | T | ) |

Return 1 if the CXType is a variadic function type, and 0 otherwise.

## ◆ clang_isPODType()

CINDEX_LINKAGE unsigned clang_isPODType | ( | CXType | T | ) |

Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.

## ◆ clang_isRestrictQualifiedType()

CINDEX_LINKAGE unsigned clang_isRestrictQualifiedType | ( | CXType | T | ) |

Determine whether a CXType has the "restrict" qualifier set, without looking through typedefs that may have added "restrict" at a different level.

## ◆ clang_isVirtualBase()

CINDEX_LINKAGE unsigned clang_isVirtualBase | ( | CXCursor |  | ) |

Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.

## ◆ clang_isVolatileQualifiedType()

CINDEX_LINKAGE unsigned clang_isVolatileQualifiedType | ( | CXType | T | ) |

Determine whether a CXType has the "volatile" qualifier set, without looking through typedefs that may have added "volatile" at a different level.

## ◆ clang_Type_getAlignOf()

CINDEX_LINKAGE long long clang_Type_getAlignOf | ( | CXType | T | ) |

Return the alignment of a type in bytes as per C++[expr.alignof] standard.

If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete is returned. If the type declaration is a dependent type, CXTypeLayoutError_Dependent is returned. If the type declaration is not a constant size type, CXTypeLayoutError_NotConstantSize is returned.

## ◆ clang_Type_getClassType()

CINDEX_LINKAGE CXType clang_Type_getClassType | ( | CXType | T | ) |

Return the class type of an member pointer type.

If a non-member-pointer type is passed in, an invalid type is returned.

## ◆ clang_Type_getCXXRefQualifier()

CINDEX_LINKAGE enum CXRefQualifierKind clang_Type_getCXXRefQualifier | ( | CXType | T | ) |

Retrieve the ref-qualifier kind of a function or method.

The ref-qualifier is returned for C++ functions or methods. For other types or non-C++ declarations, CXRefQualifier_None is returned.

## ◆ clang_Type_getModifiedType()

CINDEX_LINKAGE CXType clang_Type_getModifiedType | ( | CXType | T | ) |

Return the type that was modified by this attributed type.

If the type is not an attributed type, an invalid type is returned.

## ◆ clang_Type_getNamedType()

CINDEX_LINKAGE CXType clang_Type_getNamedType | ( | CXType | T | ) |

Retrieve the type named by the qualified-id.

If a non-elaborated type is passed in, an invalid type is returned.

## ◆ clang_Type_getNullability()

CINDEX_LINKAGE enum CXTypeNullabilityKind clang_Type_getNullability | ( | CXType | T | ) |

Retrieve the nullability kind of a pointer type.

## ◆ clang_Type_getNumObjCProtocolRefs()

CINDEX_LINKAGE unsigned clang_Type_getNumObjCProtocolRefs | ( | CXType | T | ) |

Retrieve the number of protocol references associated with an ObjC object/id.

If the type is not an ObjC object, 0 is returned.

## ◆ clang_Type_getNumObjCTypeArgs()

CINDEX_LINKAGE unsigned clang_Type_getNumObjCTypeArgs | ( | CXType | T | ) |

Retreive the number of type arguments associated with an ObjC object.

If the type is not an ObjC object, 0 is returned.

## ◆ clang_Type_getNumTemplateArguments()

CINDEX_LINKAGE int clang_Type_getNumTemplateArguments | ( | CXType | T | ) |

Returns the number of template arguments for given template specialization, or -1 if type `T` is not a template specialization.

## ◆ clang_Type_getObjCEncoding()

CINDEX_LINKAGE CXString clang_Type_getObjCEncoding | ( | CXType | type | ) |

Returns the Objective-C type encoding for the specified CXType.

## ◆ clang_Type_getObjCObjectBaseType()

CINDEX_LINKAGE CXType clang_Type_getObjCObjectBaseType | ( | CXType | T | ) |

Retrieves the base type of the ObjCObjectType.

If the type is not an ObjC object, an invalid type is returned.

## ◆ clang_Type_getObjCProtocolDecl()

CINDEX_LINKAGE CXCursor clang_Type_getObjCProtocolDecl | ( | CXType | T,
|  | unsigned | i
| ) |  |

Retrieve the decl for a protocol reference for an ObjC object/id.

If the type is not an ObjC object or there are not enough protocol references, an invalid cursor is returned.

## ◆ clang_Type_getObjCTypeArg()

CINDEX_LINKAGE CXType clang_Type_getObjCTypeArg | ( | CXType | T,
|  | unsigned | i
| ) |  |

Retrieve a type argument associated with an ObjC object.

If the type is not an ObjC or the index is not valid, an invalid type is returned.

## ◆ clang_Type_getOffsetOf()

CINDEX_LINKAGE long long clang_Type_getOffsetOf | ( | CXType | T,
|  | const char * | S
| ) |  |

Return the offset of a field named S in a record of type T in bits as it would be returned by offsetof as per C++11[18.2p4].

If the cursor is not a record field declaration, CXTypeLayoutError_Invalid is returned. If the field's type declaration is an incomplete type, CXTypeLayoutError_Incomplete is returned. If the field's type declaration is a dependent type, CXTypeLayoutError_Dependent is returned. If the field's name S is not found, CXTypeLayoutError_InvalidFieldName is returned.

## ◆ clang_Type_getSizeOf()

CINDEX_LINKAGE long long clang_Type_getSizeOf | ( | CXType | T | ) |

Return the size of a type in bytes as per C++[expr.sizeof] standard.

If the type declaration is invalid, CXTypeLayoutError_Invalid is returned. If the type declaration is an incomplete type, CXTypeLayoutError_Incomplete is returned. If the type declaration is a dependent type, CXTypeLayoutError_Dependent is returned.

## ◆ clang_Type_getTemplateArgumentAsType()

CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType | ( | CXType | T,
|  | unsigned | i
| ) |  |

Returns the type template argument of a template class specialization at given index.

This function only returns template type arguments and does not handle template template arguments or variadic packs.

## ◆ clang_Type_isTransparentTagTypedef()

CINDEX_LINKAGE unsigned clang_Type_isTransparentTagTypedef | ( | CXType | T | ) |

Determine if a typedef is 'transparent' tag.

A typedef is considered 'transparent' if it shares a name and spelling location with its underlying tag type, as is the case with the NS_ENUM macro.

Returns
  non-zero if transparent and zero otherwise.