clang 20.0.0git
Classes | Enumerations | Functions
Type information for CXCursors
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_BFloat16 = 39 ,
  CXType_Ibm128 = 40 , CXType_FirstBuiltin = CXType_Void , CXType_LastBuiltin = CXType_Ibm128 , 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_OCLIntelSubgroupAVCImeResultSingleReferenceStreamout = 172 ,
  CXType_OCLIntelSubgroupAVCImeResultDualReferenceStreamout = 173 , CXType_OCLIntelSubgroupAVCImeSingleReferenceStreamin = 174 , CXType_OCLIntelSubgroupAVCImeDualReferenceStreamin = 175 , CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout = 172 ,
  CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout = 173 , CXType_OCLIntelSubgroupAVCImeSingleRefStreamin = 174 , CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175 , CXType_ExtVector = 176 ,
  CXType_Atomic = 177 , CXType_BTFTagAttributed = 178 , CXType_HLSLResource = 179
}
 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_SwiftAsync = 17 , CXCallingConv_AArch64SVEPCS = 18 ,
  CXCallingConv_M68kRTD = 19 , CXCallingConv_PreserveNone = 20 , CXCallingConv_RISCVVectorCall = 21 , 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 ,
  CXTypeNullability_NullableResult = 4
}
 
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...
 
enum  CX_BinaryOperatorKind {
  CX_BO_Invalid = 0 , CX_BO_PtrMemD = 1 , CX_BO_PtrMemI = 2 , CX_BO_Mul = 3 ,
  CX_BO_Div = 4 , CX_BO_Rem = 5 , CX_BO_Add = 6 , CX_BO_Sub = 7 ,
  CX_BO_Shl = 8 , CX_BO_Shr = 9 , CX_BO_Cmp = 10 , CX_BO_LT = 11 ,
  CX_BO_GT = 12 , CX_BO_LE = 13 , CX_BO_GE = 14 , CX_BO_EQ = 15 ,
  CX_BO_NE = 16 , CX_BO_And = 17 , CX_BO_Xor = 18 , CX_BO_Or = 19 ,
  CX_BO_LAnd = 20 , CX_BO_LOr = 21 , CX_BO_Assign = 22 , CX_BO_MulAssign = 23 ,
  CX_BO_DivAssign = 24 , CX_BO_RemAssign = 25 , CX_BO_AddAssign = 26 , CX_BO_SubAssign = 27 ,
  CX_BO_ShlAssign = 28 , CX_BO_ShrAssign = 29 , CX_BO_AndAssign = 30 , CX_BO_XorAssign = 31 ,
  CX_BO_OrAssign = 32 , CX_BO_Comma = 33 , CX_BO_LAST = CX_BO_Comma
}
 Represents a specific kind of binary operator which can appear at a cursor. More...
 

Functions

CINDEX_LINKAGE CXType clang_getCursorType (CXCursor C)
 Retrieve the type of a CXCursor (if any).
 
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.
 
CINDEX_LINKAGE CXType clang_getTypedefDeclUnderlyingType (CXCursor C)
 Retrieve the underlying type of a typedef declaration.
 
CINDEX_LINKAGE CXType clang_getEnumDeclIntegerType (CXCursor C)
 Retrieve the integer type of an enum declaration.
 
CINDEX_LINKAGE long long clang_getEnumConstantDeclValue (CXCursor C)
 Retrieve the integer value of an enum constant declaration as a signed long long.
 
CINDEX_LINKAGE unsigned long long clang_getEnumConstantDeclUnsignedValue (CXCursor C)
 Retrieve the integer value of an enum constant declaration as an unsigned long long.
 
CINDEX_LINKAGE unsigned clang_Cursor_isBitField (CXCursor C)
 Returns non-zero if the cursor specifies a Record member that is a bit-field.
 
CINDEX_LINKAGE int clang_getFieldDeclBitWidth (CXCursor C)
 Retrieve the bit width of a bit-field declaration as an integer.
 
CINDEX_LINKAGE int clang_Cursor_getNumArguments (CXCursor C)
 Retrieve the number of non-variadic arguments associated with a given cursor.
 
CINDEX_LINKAGE CXCursor clang_Cursor_getArgument (CXCursor C, unsigned i)
 Retrieve the argument cursor of a function or method.
 
CINDEX_LINKAGE int clang_Cursor_getNumTemplateArguments (CXCursor C)
 Returns the number of template args of a function, struct, or class decl representing a template specialization.
 
CINDEX_LINKAGE enum CXTemplateArgumentKind clang_Cursor_getTemplateArgumentKind (CXCursor C, unsigned I)
 Retrieve the kind of the I'th template argument of the CXCursor C.
 
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.
 
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.
 
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.
 
CINDEX_LINKAGE unsigned clang_equalTypes (CXType A, CXType B)
 Determine whether two CXTypes represent the same type.
 
CINDEX_LINKAGE CXType clang_getCanonicalType (CXType T)
 Return the canonical type for a CXType.
 
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.
 
CINDEX_LINKAGE unsigned clang_Cursor_isMacroFunctionLike (CXCursor C)
 Determine whether a CXCursor that is a macro, is function like.
 
CINDEX_LINKAGE unsigned clang_Cursor_isMacroBuiltin (CXCursor C)
 Determine whether a CXCursor that is a macro, is a builtin one.
 
CINDEX_LINKAGE unsigned clang_Cursor_isFunctionInlined (CXCursor C)
 Determine whether a CXCursor that is a function declaration, is an inline declaration.
 
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.
 
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.
 
CINDEX_LINKAGE unsigned clang_getAddressSpace (CXType T)
 Returns the address space of the given type.
 
CINDEX_LINKAGE CXString clang_getTypedefName (CXType CT)
 Returns the typedef name of the given type.
 
CINDEX_LINKAGE CXType clang_getPointeeType (CXType T)
 For pointer types, returns the type of the pointee.
 
CINDEX_LINKAGE CXType clang_getUnqualifiedType (CXType CT)
 Retrieve the unqualified variant of the given type, removing as little sugar as possible.
 
CINDEX_LINKAGE CXType clang_getNonReferenceType (CXType CT)
 For reference types (e.g., "const int&"), returns the type that the reference refers to (e.g "const int").
 
CINDEX_LINKAGE CXCursor clang_getTypeDeclaration (CXType T)
 Return the cursor for the declaration of the given type.
 
CINDEX_LINKAGE CXString clang_getDeclObjCTypeEncoding (CXCursor C)
 Returns the Objective-C type encoding for the specified declaration.
 
CINDEX_LINKAGE CXString clang_Type_getObjCEncoding (CXType type)
 Returns the Objective-C type encoding for the specified CXType.
 
CINDEX_LINKAGE CXString clang_getTypeKindSpelling (enum CXTypeKind K)
 Retrieve the spelling of a given CXTypeKind.
 
CINDEX_LINKAGE enum CXCallingConv clang_getFunctionTypeCallingConv (CXType T)
 Retrieve the calling convention associated with a function type.
 
CINDEX_LINKAGE CXType clang_getResultType (CXType T)
 Retrieve the return type associated with a function type.
 
CINDEX_LINKAGE int clang_getExceptionSpecificationType (CXType T)
 Retrieve the exception specification type associated with a function type.
 
CINDEX_LINKAGE int clang_getNumArgTypes (CXType T)
 Retrieve the number of non-variadic parameters associated with a function type.
 
CINDEX_LINKAGE CXType clang_getArgType (CXType T, unsigned i)
 Retrieve the type of a parameter of a function type.
 
CINDEX_LINKAGE CXType clang_Type_getObjCObjectBaseType (CXType T)
 Retrieves the base type of the ObjCObjectType.
 
CINDEX_LINKAGE unsigned clang_Type_getNumObjCProtocolRefs (CXType T)
 Retrieve the number of protocol references associated with an ObjC object/id.
 
CINDEX_LINKAGE CXCursor clang_Type_getObjCProtocolDecl (CXType T, unsigned i)
 Retrieve the decl for a protocol reference for an ObjC object/id.
 
CINDEX_LINKAGE unsigned clang_Type_getNumObjCTypeArgs (CXType T)
 Retrieve the number of type arguments associated with an ObjC object.
 
CINDEX_LINKAGE CXType clang_Type_getObjCTypeArg (CXType T, unsigned i)
 Retrieve a type argument associated with an ObjC object.
 
CINDEX_LINKAGE unsigned clang_isFunctionTypeVariadic (CXType T)
 Return 1 if the CXType is a variadic function type, and 0 otherwise.
 
CINDEX_LINKAGE CXType clang_getCursorResultType (CXCursor C)
 Retrieve the return type associated with a given cursor.
 
CINDEX_LINKAGE int clang_getCursorExceptionSpecificationType (CXCursor C)
 Retrieve the exception specification type associated with a given cursor.
 
CINDEX_LINKAGE unsigned clang_isPODType (CXType T)
 Return 1 if the CXType is a POD (plain old data) type, and 0 otherwise.
 
CINDEX_LINKAGE CXType clang_getElementType (CXType T)
 Return the element type of an array, complex, or vector type.
 
CINDEX_LINKAGE long long clang_getNumElements (CXType T)
 Return the number of elements of an array or vector type.
 
CINDEX_LINKAGE CXType clang_getArrayElementType (CXType T)
 Return the element type of an array type.
 
CINDEX_LINKAGE long long clang_getArraySize (CXType T)
 Return the array size of a constant array.
 
CINDEX_LINKAGE CXType clang_Type_getNamedType (CXType T)
 Retrieve the type named by the qualified-id.
 
CINDEX_LINKAGE unsigned clang_Type_isTransparentTagTypedef (CXType T)
 Determine if a typedef is 'transparent' tag.
 
CINDEX_LINKAGE enum CXTypeNullabilityKind clang_Type_getNullability (CXType T)
 Retrieve the nullability kind of a pointer type.
 
CINDEX_LINKAGE long long clang_Type_getAlignOf (CXType T)
 Return the alignment of a type in bytes as per C++[expr.alignof] standard.
 
CINDEX_LINKAGE CXType clang_Type_getClassType (CXType T)
 Return the class type of an member pointer type.
 
CINDEX_LINKAGE long long clang_Type_getSizeOf (CXType T)
 Return the size of a type in bytes as per C++[expr.sizeof] standard.
 
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].
 
CINDEX_LINKAGE CXType clang_Type_getModifiedType (CXType T)
 Return the type that was modified by this attributed type.
 
CINDEX_LINKAGE CXType clang_Type_getValueType (CXType CT)
 Gets the type contained by this atomic type.
 
CINDEX_LINKAGE long long clang_Cursor_getOffsetOfField (CXCursor C)
 Return the offset of the field represented by the Cursor.
 
CINDEX_LINKAGE unsigned clang_Cursor_isAnonymous (CXCursor C)
 Determine whether the given cursor represents an anonymous tag or namespace.
 
CINDEX_LINKAGE unsigned clang_Cursor_isAnonymousRecordDecl (CXCursor C)
 Determine whether the given cursor represents an anonymous record declaration.
 
CINDEX_LINKAGE unsigned clang_Cursor_isInlineNamespace (CXCursor C)
 Determine whether the given cursor represents an inline namespace declaration.
 
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.
 
CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType (CXType T, unsigned i)
 Returns the type template argument of a template class specialization at given index.
 
CINDEX_LINKAGE enum CXRefQualifierKind clang_Type_getCXXRefQualifier (CXType T)
 Retrieve the ref-qualifier kind of a function or method.
 
CINDEX_LINKAGE unsigned clang_isVirtualBase (CXCursor)
 Returns 1 if the base class specified by the cursor with kind CX_CXXBaseSpecifier is virtual.
 
CINDEX_LINKAGE enum CX_CXXAccessSpecifier clang_getCXXAccessSpecifier (CXCursor)
 Returns the access control level for the referenced object.
 
CINDEX_LINKAGE enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode (CXCursor C)
 Returns the operator code for the binary operator.
 
CINDEX_LINKAGE CXString clang_Cursor_getBinaryOpcodeStr (enum CX_BinaryOperatorKind Op)
 Returns a string containing the spelling of the binary operator.
 
CINDEX_LINKAGE enum CX_StorageClass clang_Cursor_getStorageClass (CXCursor)
 Returns the storage class for a function or variable declaration.
 
CINDEX_LINKAGE unsigned clang_getNumOverloadedDecls (CXCursor cursor)
 Determine the number of overloaded declarations referenced by a CXCursor_OverloadedDeclRef cursor.
 
CINDEX_LINKAGE CXCursor clang_getOverloadedDecl (CXCursor cursor, unsigned index)
 Retrieve a cursor for one of the overloaded declarations referenced by a CXCursor_OverloadedDeclRef cursor.
 

Detailed Description

Enumeration Type Documentation

◆ CX_BinaryOperatorKind

Represents a specific kind of binary operator which can appear at a cursor.

Enumerator
CX_BO_Invalid 
CX_BO_PtrMemD 
CX_BO_PtrMemI 
CX_BO_Mul 
CX_BO_Div 
CX_BO_Rem 
CX_BO_Add 
CX_BO_Sub 
CX_BO_Shl 
CX_BO_Shr 
CX_BO_Cmp 
CX_BO_LT 
CX_BO_GT 
CX_BO_LE 
CX_BO_GE 
CX_BO_EQ 
CX_BO_NE 
CX_BO_And 
CX_BO_Xor 
CX_BO_Or 
CX_BO_LAnd 
CX_BO_LOr 
CX_BO_Assign 
CX_BO_MulAssign 
CX_BO_DivAssign 
CX_BO_RemAssign 
CX_BO_AddAssign 
CX_BO_SubAssign 
CX_BO_ShlAssign 
CX_BO_ShrAssign 
CX_BO_AndAssign 
CX_BO_XorAssign 
CX_BO_OrAssign 
CX_BO_Comma 
CX_BO_LAST 

Definition at line 3771 of file Index.h.

◆ 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 3737 of file Index.h.

◆ 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 3757 of file Index.h.

◆ 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_SwiftAsync 
CXCallingConv_AArch64SVEPCS 
CXCallingConv_M68kRTD 
CXCallingConv_PreserveNone 
CXCallingConv_RISCVVectorCall 
CXCallingConv_Invalid 
CXCallingConv_Unexposed 

Definition at line 2990 of file Index.h.

◆ 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 3694 of file Index.h.

◆ 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 3126 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_BFloat16 
CXType_Ibm128 
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_OCLIntelSubgroupAVCImeResultSingleReferenceStreamout 
CXType_OCLIntelSubgroupAVCImeResultDualReferenceStreamout 
CXType_OCLIntelSubgroupAVCImeSingleReferenceStreamin 
CXType_OCLIntelSubgroupAVCImeDualReferenceStreamin 
CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout 
CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout 
CXType_OCLIntelSubgroupAVCImeSingleRefStreamin 
CXType_OCLIntelSubgroupAVCImeDualRefStreamin 
CXType_ExtVector 
CXType_Atomic 
CXType_BTFTagAttributed 
CXType_HLSLResource 

Definition at line 2829 of file Index.h.

◆ 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 3573 of file Index.h.

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

CXTypeNullability_NullableResult 

Generally behaves like Nullable, except when used in a block parameter that was imported into a swift async method.

There, swift will assume that the parameter can get null even if no error occurred. _Nullable parameters are assumed to only get null on error.

Definition at line 3530 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_getBinaryOpcode()

CINDEX_LINKAGE enum CX_BinaryOperatorKind clang_Cursor_getBinaryOpcode ( CXCursor  C)

Returns the operator code for the binary operator.

◆ clang_Cursor_getBinaryOpcodeStr()

CINDEX_LINKAGE CXString clang_Cursor_getBinaryOpcodeStr ( enum CX_BinaryOperatorKind  Op)

Returns a string containing the spelling of the binary operator.

◆ 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, struct, or class 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, StructDecl, or ClassTemplatePartialSpecialization, 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, StructDecl, ClassDecl or ClassTemplatePartialSpecialization 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, StructDecl, ClassDecl or ClassTemplatePartialSpecialization 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, StructDecl, ClassDecl or ClassTemplatePartialSpecialization 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 bit-field.

◆ 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 the cursor does not reference a bit-field, or if the bit-field's width expression cannot be evaluated, -1 is returned.

For example:

int Width = clang_getFieldDeclBitWidth(Cursor);
if (Width != -1) {
// The bit-field width is not value-dependent.
}
}
CINDEX_LINKAGE unsigned clang_Cursor_isBitField(CXCursor C)
Returns non-zero if the cursor specifies a Record member that is a bit-field.
CINDEX_LINKAGE int clang_getFieldDeclBitWidth(CXCursor C)
Retrieve the bit width of a bit-field declaration as an integer.

◆ 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_getNonReferenceType()

CINDEX_LINKAGE CXType clang_getNonReferenceType ( CXType  CT)

For reference types (e.g., "const int&"), returns the type that the reference refers to (e.g "const int").

Otherwise, returns the type itself.

A type that has kind CXType_LValueReference or CXType_RValueReference is a reference type.

◆ 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
cursorThe 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
cursorThe cursor whose overloaded declarations are being queried.
indexThe 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_getUnqualifiedType()

CINDEX_LINKAGE CXType clang_getUnqualifiedType ( CXType  CT)

Retrieve the unqualified variant of the given type, removing as little sugar as possible.

For example, given the following series of typedefs:

typedef int Integer;
typedef const Integer CInteger;
typedef CInteger DifferenceType;

Executing clang_getUnqualifiedType() on a CXType that represents DifferenceType, will desugar to a type representing Integer, that has no qualifiers.

And, executing clang_getUnqualifiedType() on the type of the first argument of the following function declaration:

void foo(const int);

Will return a type representing int, removing the const qualifier.

Sugar over array types is not desugared.

A type can be checked for qualifiers with clang_isConstQualifiedType(), clang_isVolatileQualifiedType() and clang_isRestrictQualifiedType().

A type that resulted from a call to clang_getUnqualifiedType will return false for all of the above calls.

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

Retrieve 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_getValueType()

CINDEX_LINKAGE CXType clang_Type_getValueType ( CXType  CT)

Gets the type contained by this atomic type.

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

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