1 // SPDX-License-Identifier: Apache-2.0 2 3 //! Rust bindings for `libclang`. 4 //! 5 //! ## [Documentation](https://docs.rs/clang-sys) 6 //! 7 //! Note that the documentation on https://docs.rs for this crate assumes usage 8 //! of the `runtime` Cargo feature as well as the Cargo feature for the latest 9 //! supported version of `libclang` (e.g., `clang_11_0`), neither of which are 10 //! enabled by default. 11 //! 12 //! Due to the usage of the `runtime` Cargo feature, this documentation will 13 //! contain some additional types and functions to manage a dynamically loaded 14 //! `libclang` instance at runtime. 15 //! 16 //! Due to the usage of the Cargo feature for the latest supported version of 17 //! `libclang`, this documentation will contain constants and functions that are 18 //! not available in the oldest supported version of `libclang` (3.5). All of 19 //! these types and functions have a documentation comment which specifies the 20 //! minimum `libclang` version required to use the item. 21 22 #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] 23 #![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))] 24 25 pub mod support; 26 27 #[macro_use] 28 mod link; 29 30 use std::mem; 31 32 use libc::*; 33 34 pub type CXClientData = *mut c_void; 35 pub type CXCursorVisitor = extern "C" fn(CXCursor, CXCursor, CXClientData) -> CXChildVisitResult; 36 #[cfg(feature = "clang_3_7")] 37 pub type CXFieldVisitor = extern "C" fn(CXCursor, CXClientData) -> CXVisitorResult; 38 pub type CXInclusionVisitor = extern "C" fn(CXFile, *mut CXSourceLocation, c_uint, CXClientData); 39 40 //================================================ 41 // Macros 42 //================================================ 43 44 /// Defines a C enum as a series of constants. 45 macro_rules! cenum { 46 (#[repr($ty:ty)] $(#[$meta:meta])* enum $name:ident { 47 $($(#[$vmeta:meta])* const $variant:ident = $value:expr), +, 48 }) => ( 49 pub type $name = $ty; 50 51 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 52 ); 53 (#[repr($ty:ty)] $(#[$meta:meta])* enum $name:ident { 54 $($(#[$vmeta:meta])* const $variant:ident = $value:expr); +; 55 }) => ( 56 pub type $name = $ty; 57 58 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 59 ); 60 ($(#[$meta:meta])* enum $name:ident { 61 $($(#[$vmeta:meta])* const $variant:ident = $value:expr), +, 62 }) => ( 63 pub type $name = c_int; 64 65 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 66 ); 67 ($(#[$meta:meta])* enum $name:ident { 68 $($(#[$vmeta:meta])* const $variant:ident = $value:expr); +; 69 }) => ( 70 pub type $name = c_int; 71 72 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 73 ); 74 } 75 76 /// Implements a zeroing implementation of `Default` for the supplied type. 77 macro_rules! default { 78 (#[$meta:meta] $ty:ty) => { 79 #[$meta] 80 impl Default for $ty { 81 fn default() -> $ty { 82 unsafe { mem::zeroed() } 83 } 84 } 85 }; 86 87 ($ty:ty) => { 88 impl Default for $ty { 89 fn default() -> $ty { 90 unsafe { mem::zeroed() } 91 } 92 } 93 }; 94 } 95 96 //================================================ 97 // Enums 98 //================================================ 99 100 cenum! { 101 enum CXAvailabilityKind { 102 const CXAvailability_Available = 0, 103 const CXAvailability_Deprecated = 1, 104 const CXAvailability_NotAvailable = 2, 105 const CXAvailability_NotAccessible = 3, 106 } 107 } 108 109 cenum! { 110 /// Only available on `libclang` 17.0 and later. 111 #[cfg(feature = "clang_17_0")] 112 enum CXBinaryOperatorKind { 113 const CXBinaryOperator_Invalid = 0, 114 const CXBinaryOperator_PtrMemD = 1, 115 const CXBinaryOperator_PtrMemI = 2, 116 const CXBinaryOperator_Mul = 3, 117 const CXBinaryOperator_Div = 4, 118 const CXBinaryOperator_Rem = 5, 119 const CXBinaryOperator_Add = 6, 120 const CXBinaryOperator_Sub = 7, 121 const CXBinaryOperator_Shl = 8, 122 const CXBinaryOperator_Shr = 9, 123 const CXBinaryOperator_Cmp = 10, 124 const CXBinaryOperator_LT = 11, 125 const CXBinaryOperator_GT = 12, 126 const CXBinaryOperator_LE = 13, 127 const CXBinaryOperator_GE = 14, 128 const CXBinaryOperator_EQ = 15, 129 const CXBinaryOperator_NE = 16, 130 const CXBinaryOperator_And = 17, 131 const CXBinaryOperator_Xor = 18, 132 const CXBinaryOperator_Or = 19, 133 const CXBinaryOperator_LAnd = 20, 134 const CXBinaryOperator_LOr = 21, 135 const CXBinaryOperator_Assign = 22, 136 const CXBinaryOperator_MulAssign = 23, 137 const CXBinaryOperator_DivAssign = 24, 138 const CXBinaryOperator_RemAssign = 25, 139 const CXBinaryOperator_AddAssign = 26, 140 const CXBinaryOperator_SubAssign = 27, 141 const CXBinaryOperator_ShlAssign = 28, 142 const CXBinaryOperator_ShrAssign = 29, 143 const CXBinaryOperator_AndAssign = 30, 144 const CXBinaryOperator_XorAssign = 31, 145 const CXBinaryOperator_OrAssign = 32, 146 const CXBinaryOperator_Comma = 33, 147 } 148 } 149 150 cenum! { 151 enum CXCallingConv { 152 const CXCallingConv_Default = 0, 153 const CXCallingConv_C = 1, 154 const CXCallingConv_X86StdCall = 2, 155 const CXCallingConv_X86FastCall = 3, 156 const CXCallingConv_X86ThisCall = 4, 157 const CXCallingConv_X86Pascal = 5, 158 const CXCallingConv_AAPCS = 6, 159 const CXCallingConv_AAPCS_VFP = 7, 160 /// Only produced by `libclang` 4.0 and later. 161 const CXCallingConv_X86RegCall = 8, 162 const CXCallingConv_IntelOclBicc = 9, 163 const CXCallingConv_Win64 = 10, 164 const CXCallingConv_X86_64Win64 = 10, 165 const CXCallingConv_X86_64SysV = 11, 166 /// Only produced by `libclang` 3.6 and later. 167 const CXCallingConv_X86VectorCall = 12, 168 /// Only produced by `libclang` 3.9 and later. 169 const CXCallingConv_Swift = 13, 170 /// Only produced by `libclang` 3.9 and later. 171 const CXCallingConv_PreserveMost = 14, 172 /// Only produced by `libclang` 3.9 and later. 173 const CXCallingConv_PreserveAll = 15, 174 /// Only produced by `libclang` 8.0 and later. 175 const CXCallingConv_AArch64VectorCall = 16, 176 const CXCallingConv_Invalid = 100, 177 const CXCallingConv_Unexposed = 200, 178 /// Only produced by `libclang` 13.0 and later. 179 const CXCallingConv_SwiftAsync = 17, 180 /// Only produced by `libclang` 15.0 and later. 181 const CXCallingConv_AArch64SVEPCS = 18, 182 /// Only produced by `libclang` 18.0 and later. 183 const CXCallingConv_M68kRTD = 19, 184 } 185 } 186 187 cenum! { 188 enum CXChildVisitResult { 189 const CXChildVisit_Break = 0, 190 const CXChildVisit_Continue = 1, 191 const CXChildVisit_Recurse = 2, 192 } 193 } 194 195 cenum! { 196 #[repr(c_uchar)] 197 /// Only available on `libclang` 17.0 and later. 198 #[cfg(feature = "clang_17_0")] 199 enum CXChoice { 200 const CXChoice_Default = 0, 201 const CXChoice_Enabled = 1, 202 const CXChoice_Disabled = 2, 203 } 204 } 205 206 cenum! { 207 enum CXCommentInlineCommandRenderKind { 208 const CXCommentInlineCommandRenderKind_Normal = 0, 209 const CXCommentInlineCommandRenderKind_Bold = 1, 210 const CXCommentInlineCommandRenderKind_Monospaced = 2, 211 const CXCommentInlineCommandRenderKind_Emphasized = 3, 212 } 213 } 214 215 cenum! { 216 enum CXCommentKind { 217 const CXComment_Null = 0, 218 const CXComment_Text = 1, 219 const CXComment_InlineCommand = 2, 220 const CXComment_HTMLStartTag = 3, 221 const CXComment_HTMLEndTag = 4, 222 const CXComment_Paragraph = 5, 223 const CXComment_BlockCommand = 6, 224 const CXComment_ParamCommand = 7, 225 const CXComment_TParamCommand = 8, 226 const CXComment_VerbatimBlockCommand = 9, 227 const CXComment_VerbatimBlockLine = 10, 228 const CXComment_VerbatimLine = 11, 229 const CXComment_FullComment = 12, 230 } 231 } 232 233 cenum! { 234 enum CXCommentParamPassDirection { 235 const CXCommentParamPassDirection_In = 0, 236 const CXCommentParamPassDirection_Out = 1, 237 const CXCommentParamPassDirection_InOut = 2, 238 } 239 } 240 241 cenum! { 242 enum CXCompilationDatabase_Error { 243 const CXCompilationDatabase_NoError = 0, 244 const CXCompilationDatabase_CanNotLoadDatabase = 1, 245 } 246 } 247 248 cenum! { 249 enum CXCompletionChunkKind { 250 const CXCompletionChunk_Optional = 0, 251 const CXCompletionChunk_TypedText = 1, 252 const CXCompletionChunk_Text = 2, 253 const CXCompletionChunk_Placeholder = 3, 254 const CXCompletionChunk_Informative = 4, 255 const CXCompletionChunk_CurrentParameter = 5, 256 const CXCompletionChunk_LeftParen = 6, 257 const CXCompletionChunk_RightParen = 7, 258 const CXCompletionChunk_LeftBracket = 8, 259 const CXCompletionChunk_RightBracket = 9, 260 const CXCompletionChunk_LeftBrace = 10, 261 const CXCompletionChunk_RightBrace = 11, 262 const CXCompletionChunk_LeftAngle = 12, 263 const CXCompletionChunk_RightAngle = 13, 264 const CXCompletionChunk_Comma = 14, 265 const CXCompletionChunk_ResultType = 15, 266 const CXCompletionChunk_Colon = 16, 267 const CXCompletionChunk_SemiColon = 17, 268 const CXCompletionChunk_Equal = 18, 269 const CXCompletionChunk_HorizontalSpace = 19, 270 const CXCompletionChunk_VerticalSpace = 20, 271 } 272 } 273 274 cenum! { 275 enum CXCursorKind { 276 const CXCursor_UnexposedDecl = 1, 277 const CXCursor_StructDecl = 2, 278 const CXCursor_UnionDecl = 3, 279 const CXCursor_ClassDecl = 4, 280 const CXCursor_EnumDecl = 5, 281 const CXCursor_FieldDecl = 6, 282 const CXCursor_EnumConstantDecl = 7, 283 const CXCursor_FunctionDecl = 8, 284 const CXCursor_VarDecl = 9, 285 const CXCursor_ParmDecl = 10, 286 const CXCursor_ObjCInterfaceDecl = 11, 287 const CXCursor_ObjCCategoryDecl = 12, 288 const CXCursor_ObjCProtocolDecl = 13, 289 const CXCursor_ObjCPropertyDecl = 14, 290 const CXCursor_ObjCIvarDecl = 15, 291 const CXCursor_ObjCInstanceMethodDecl = 16, 292 const CXCursor_ObjCClassMethodDecl = 17, 293 const CXCursor_ObjCImplementationDecl = 18, 294 const CXCursor_ObjCCategoryImplDecl = 19, 295 const CXCursor_TypedefDecl = 20, 296 const CXCursor_CXXMethod = 21, 297 const CXCursor_Namespace = 22, 298 const CXCursor_LinkageSpec = 23, 299 const CXCursor_Constructor = 24, 300 const CXCursor_Destructor = 25, 301 const CXCursor_ConversionFunction = 26, 302 const CXCursor_TemplateTypeParameter = 27, 303 const CXCursor_NonTypeTemplateParameter = 28, 304 const CXCursor_TemplateTemplateParameter = 29, 305 const CXCursor_FunctionTemplate = 30, 306 const CXCursor_ClassTemplate = 31, 307 const CXCursor_ClassTemplatePartialSpecialization = 32, 308 const CXCursor_NamespaceAlias = 33, 309 const CXCursor_UsingDirective = 34, 310 const CXCursor_UsingDeclaration = 35, 311 const CXCursor_TypeAliasDecl = 36, 312 const CXCursor_ObjCSynthesizeDecl = 37, 313 const CXCursor_ObjCDynamicDecl = 38, 314 const CXCursor_CXXAccessSpecifier = 39, 315 const CXCursor_ObjCSuperClassRef = 40, 316 const CXCursor_ObjCProtocolRef = 41, 317 const CXCursor_ObjCClassRef = 42, 318 const CXCursor_TypeRef = 43, 319 const CXCursor_CXXBaseSpecifier = 44, 320 const CXCursor_TemplateRef = 45, 321 const CXCursor_NamespaceRef = 46, 322 const CXCursor_MemberRef = 47, 323 const CXCursor_LabelRef = 48, 324 const CXCursor_OverloadedDeclRef = 49, 325 const CXCursor_VariableRef = 50, 326 const CXCursor_InvalidFile = 70, 327 const CXCursor_NoDeclFound = 71, 328 const CXCursor_NotImplemented = 72, 329 const CXCursor_InvalidCode = 73, 330 const CXCursor_UnexposedExpr = 100, 331 const CXCursor_DeclRefExpr = 101, 332 const CXCursor_MemberRefExpr = 102, 333 const CXCursor_CallExpr = 103, 334 const CXCursor_ObjCMessageExpr = 104, 335 const CXCursor_BlockExpr = 105, 336 const CXCursor_IntegerLiteral = 106, 337 const CXCursor_FloatingLiteral = 107, 338 const CXCursor_ImaginaryLiteral = 108, 339 const CXCursor_StringLiteral = 109, 340 const CXCursor_CharacterLiteral = 110, 341 const CXCursor_ParenExpr = 111, 342 const CXCursor_UnaryOperator = 112, 343 const CXCursor_ArraySubscriptExpr = 113, 344 const CXCursor_BinaryOperator = 114, 345 const CXCursor_CompoundAssignOperator = 115, 346 const CXCursor_ConditionalOperator = 116, 347 const CXCursor_CStyleCastExpr = 117, 348 const CXCursor_CompoundLiteralExpr = 118, 349 const CXCursor_InitListExpr = 119, 350 const CXCursor_AddrLabelExpr = 120, 351 const CXCursor_StmtExpr = 121, 352 const CXCursor_GenericSelectionExpr = 122, 353 const CXCursor_GNUNullExpr = 123, 354 const CXCursor_CXXStaticCastExpr = 124, 355 const CXCursor_CXXDynamicCastExpr = 125, 356 const CXCursor_CXXReinterpretCastExpr = 126, 357 const CXCursor_CXXConstCastExpr = 127, 358 const CXCursor_CXXFunctionalCastExpr = 128, 359 const CXCursor_CXXTypeidExpr = 129, 360 const CXCursor_CXXBoolLiteralExpr = 130, 361 const CXCursor_CXXNullPtrLiteralExpr = 131, 362 const CXCursor_CXXThisExpr = 132, 363 const CXCursor_CXXThrowExpr = 133, 364 const CXCursor_CXXNewExpr = 134, 365 const CXCursor_CXXDeleteExpr = 135, 366 const CXCursor_UnaryExpr = 136, 367 const CXCursor_ObjCStringLiteral = 137, 368 const CXCursor_ObjCEncodeExpr = 138, 369 const CXCursor_ObjCSelectorExpr = 139, 370 const CXCursor_ObjCProtocolExpr = 140, 371 const CXCursor_ObjCBridgedCastExpr = 141, 372 const CXCursor_PackExpansionExpr = 142, 373 const CXCursor_SizeOfPackExpr = 143, 374 const CXCursor_LambdaExpr = 144, 375 const CXCursor_ObjCBoolLiteralExpr = 145, 376 const CXCursor_ObjCSelfExpr = 146, 377 /// Only produced by `libclang` 3.8 and later. 378 const CXCursor_OMPArraySectionExpr = 147, 379 /// Only produced by `libclang` 3.9 and later. 380 const CXCursor_ObjCAvailabilityCheckExpr = 148, 381 /// Only produced by `libclang` 7.0 and later. 382 const CXCursor_FixedPointLiteral = 149, 383 /// Only produced by `libclang` 12.0 and later. 384 const CXCursor_OMPArrayShapingExpr = 150, 385 /// Only produced by `libclang` 12.0 and later. 386 const CXCursor_OMPIteratorExpr = 151, 387 /// Only produced by `libclang` 12.0 and later. 388 const CXCursor_CXXAddrspaceCastExpr = 152, 389 /// Only produced by `libclang` 15.0 and later. 390 const CXCursor_ConceptSpecializationExpr = 153, 391 /// Only produced by `libclang` 15.0 and later. 392 const CXCursor_RequiresExpr = 154, 393 /// Only produced by `libclang` 16.0 and later. 394 const CXCursor_CXXParenListInitExpr = 155, 395 const CXCursor_UnexposedStmt = 200, 396 const CXCursor_LabelStmt = 201, 397 const CXCursor_CompoundStmt = 202, 398 const CXCursor_CaseStmt = 203, 399 const CXCursor_DefaultStmt = 204, 400 const CXCursor_IfStmt = 205, 401 const CXCursor_SwitchStmt = 206, 402 const CXCursor_WhileStmt = 207, 403 const CXCursor_DoStmt = 208, 404 const CXCursor_ForStmt = 209, 405 const CXCursor_GotoStmt = 210, 406 const CXCursor_IndirectGotoStmt = 211, 407 const CXCursor_ContinueStmt = 212, 408 const CXCursor_BreakStmt = 213, 409 const CXCursor_ReturnStmt = 214, 410 /// Duplicate of `CXCursor_GccAsmStmt`. 411 const CXCursor_AsmStmt = 215, 412 const CXCursor_ObjCAtTryStmt = 216, 413 const CXCursor_ObjCAtCatchStmt = 217, 414 const CXCursor_ObjCAtFinallyStmt = 218, 415 const CXCursor_ObjCAtThrowStmt = 219, 416 const CXCursor_ObjCAtSynchronizedStmt = 220, 417 const CXCursor_ObjCAutoreleasePoolStmt = 221, 418 const CXCursor_ObjCForCollectionStmt = 222, 419 const CXCursor_CXXCatchStmt = 223, 420 const CXCursor_CXXTryStmt = 224, 421 const CXCursor_CXXForRangeStmt = 225, 422 const CXCursor_SEHTryStmt = 226, 423 const CXCursor_SEHExceptStmt = 227, 424 const CXCursor_SEHFinallyStmt = 228, 425 const CXCursor_MSAsmStmt = 229, 426 const CXCursor_NullStmt = 230, 427 const CXCursor_DeclStmt = 231, 428 const CXCursor_OMPParallelDirective = 232, 429 const CXCursor_OMPSimdDirective = 233, 430 const CXCursor_OMPForDirective = 234, 431 const CXCursor_OMPSectionsDirective = 235, 432 const CXCursor_OMPSectionDirective = 236, 433 const CXCursor_OMPSingleDirective = 237, 434 const CXCursor_OMPParallelForDirective = 238, 435 const CXCursor_OMPParallelSectionsDirective = 239, 436 const CXCursor_OMPTaskDirective = 240, 437 const CXCursor_OMPMasterDirective = 241, 438 const CXCursor_OMPCriticalDirective = 242, 439 const CXCursor_OMPTaskyieldDirective = 243, 440 const CXCursor_OMPBarrierDirective = 244, 441 const CXCursor_OMPTaskwaitDirective = 245, 442 const CXCursor_OMPFlushDirective = 246, 443 const CXCursor_SEHLeaveStmt = 247, 444 /// Only produced by `libclang` 3.6 and later. 445 const CXCursor_OMPOrderedDirective = 248, 446 /// Only produced by `libclang` 3.6 and later. 447 const CXCursor_OMPAtomicDirective = 249, 448 /// Only produced by `libclang` 3.6 and later. 449 const CXCursor_OMPForSimdDirective = 250, 450 /// Only produced by `libclang` 3.6 and later. 451 const CXCursor_OMPParallelForSimdDirective = 251, 452 /// Only produced by `libclang` 3.6 and later. 453 const CXCursor_OMPTargetDirective = 252, 454 /// Only produced by `libclang` 3.6 and later. 455 const CXCursor_OMPTeamsDirective = 253, 456 /// Only produced by `libclang` 3.7 and later. 457 const CXCursor_OMPTaskgroupDirective = 254, 458 /// Only produced by `libclang` 3.7 and later. 459 const CXCursor_OMPCancellationPointDirective = 255, 460 /// Only produced by `libclang` 3.7 and later. 461 const CXCursor_OMPCancelDirective = 256, 462 /// Only produced by `libclang` 3.8 and later. 463 const CXCursor_OMPTargetDataDirective = 257, 464 /// Only produced by `libclang` 3.8 and later. 465 const CXCursor_OMPTaskLoopDirective = 258, 466 /// Only produced by `libclang` 3.8 and later. 467 const CXCursor_OMPTaskLoopSimdDirective = 259, 468 /// Only produced by `libclang` 3.8 and later. 469 const CXCursor_OMPDistributeDirective = 260, 470 /// Only produced by `libclang` 3.9 and later. 471 const CXCursor_OMPTargetEnterDataDirective = 261, 472 /// Only produced by `libclang` 3.9 and later. 473 const CXCursor_OMPTargetExitDataDirective = 262, 474 /// Only produced by `libclang` 3.9 and later. 475 const CXCursor_OMPTargetParallelDirective = 263, 476 /// Only produced by `libclang` 3.9 and later. 477 const CXCursor_OMPTargetParallelForDirective = 264, 478 /// Only produced by `libclang` 3.9 and later. 479 const CXCursor_OMPTargetUpdateDirective = 265, 480 /// Only produced by `libclang` 3.9 and later. 481 const CXCursor_OMPDistributeParallelForDirective = 266, 482 /// Only produced by `libclang` 3.9 and later. 483 const CXCursor_OMPDistributeParallelForSimdDirective = 267, 484 /// Only produced by `libclang` 3.9 and later. 485 const CXCursor_OMPDistributeSimdDirective = 268, 486 /// Only produced by `libclang` 3.9 and later. 487 const CXCursor_OMPTargetParallelForSimdDirective = 269, 488 /// Only produced by `libclang` 4.0 and later. 489 const CXCursor_OMPTargetSimdDirective = 270, 490 /// Only produced by `libclang` 4.0 and later. 491 const CXCursor_OMPTeamsDistributeDirective = 271, 492 /// Only produced by `libclang` 4.0 and later. 493 const CXCursor_OMPTeamsDistributeSimdDirective = 272, 494 /// Only produced by `libclang` 4.0 and later. 495 const CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273, 496 /// Only produced by `libclang` 4.0 and later. 497 const CXCursor_OMPTeamsDistributeParallelForDirective = 274, 498 /// Only produced by `libclang` 4.0 and later. 499 const CXCursor_OMPTargetTeamsDirective = 275, 500 /// Only produced by `libclang` 4.0 and later. 501 const CXCursor_OMPTargetTeamsDistributeDirective = 276, 502 /// Only produced by `libclang` 4.0 and later. 503 const CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277, 504 /// Only produced by `libclang` 4.0 and later. 505 const CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective = 278, 506 /// Only producer by `libclang` 4.0 and later. 507 const CXCursor_OMPTargetTeamsDistributeSimdDirective = 279, 508 /// Only produced by 'libclang' 9.0 and later. 509 const CXCursor_BuiltinBitCastExpr = 280, 510 /// Only produced by `libclang` 10.0 and later. 511 const CXCursor_OMPMasterTaskLoopDirective = 281, 512 /// Only produced by `libclang` 10.0 and later. 513 const CXCursor_OMPParallelMasterTaskLoopDirective = 282, 514 /// Only produced by `libclang` 10.0 and later. 515 const CXCursor_OMPMasterTaskLoopSimdDirective = 283, 516 /// Only produced by `libclang` 10.0 and later. 517 const CXCursor_OMPParallelMasterTaskLoopSimdDirective = 284, 518 /// Only produced by `libclang` 10.0 and later. 519 const CXCursor_OMPParallelMasterDirective = 285, 520 /// Only produced by `libclang` 11.0 and later. 521 const CXCursor_OMPDepobjDirective = 286, 522 /// Only produced by `libclang` 11.0 and later. 523 const CXCursor_OMPScanDirective = 287, 524 /// Only produced by `libclang` 13.0 and later. 525 const CXCursor_OMPTileDirective = 288, 526 /// Only produced by `libclang` 13.0 and later. 527 const CXCursor_OMPCanonicalLoop = 289, 528 /// Only produced by `libclang` 13.0 and later. 529 const CXCursor_OMPInteropDirective = 290, 530 /// Only produced by `libclang` 13.0 and later. 531 const CXCursor_OMPDispatchDirective = 291, 532 /// Only produced by `libclang` 13.0 and later. 533 const CXCursor_OMPMaskedDirective = 292, 534 /// Only produced by `libclang` 13.0 and later. 535 const CXCursor_OMPUnrollDirective = 293, 536 /// Only produced by `libclang` 14.0 and later. 537 const CXCursor_OMPMetaDirective = 294, 538 /// Only produced by `libclang` 14.0 and later. 539 const CXCursor_OMPGenericLoopDirective = 295, 540 /// Only produced by `libclang` 15.0 and later. 541 const CXCursor_OMPTeamsGenericLoopDirective = 296, 542 /// Only produced by `libclang` 15.0 and later. 543 const CXCursor_OMPTargetTeamsGenericLoopDirective = 297, 544 /// Only produced by `libclang` 15.0 and later. 545 const CXCursor_OMPParallelGenericLoopDirective = 298, 546 /// Only produced by `libclang` 15.0 and later. 547 const CXCursor_OMPTargetParallelGenericLoopDirective = 299, 548 /// Only produced by `libclang` 15.0 and later. 549 const CXCursor_OMPParallelMaskedDirective = 300, 550 /// Only produced by `libclang` 15.0 and later. 551 const CXCursor_OMPMaskedTaskLoopDirective = 301, 552 /// Only produced by `libclang` 15.0 and later. 553 const CXCursor_OMPMaskedTaskLoopSimdDirective = 302, 554 /// Only produced by `libclang` 15.0 and later. 555 const CXCursor_OMPParallelMaskedTaskLoopDirective = 303, 556 /// Only produced by `libclang` 15.0 and later. 557 const CXCursor_OMPParallelMaskedTaskLoopSimdDirective = 304, 558 /// Only produced by `libclang` 16.0 and later. 559 const CXCursor_OMPErrorDirective = 305, 560 /// Only produced by `libclang` 18.0 and later. 561 const CXCursor_OMPScopeDirective = 306, 562 #[cfg(not(feature="clang_15_0"))] 563 const CXCursor_TranslationUnit = 300, 564 #[cfg(feature="clang_15_0")] 565 const CXCursor_TranslationUnit = 350, 566 const CXCursor_UnexposedAttr = 400, 567 const CXCursor_IBActionAttr = 401, 568 const CXCursor_IBOutletAttr = 402, 569 const CXCursor_IBOutletCollectionAttr = 403, 570 const CXCursor_CXXFinalAttr = 404, 571 const CXCursor_CXXOverrideAttr = 405, 572 const CXCursor_AnnotateAttr = 406, 573 const CXCursor_AsmLabelAttr = 407, 574 const CXCursor_PackedAttr = 408, 575 const CXCursor_PureAttr = 409, 576 const CXCursor_ConstAttr = 410, 577 const CXCursor_NoDuplicateAttr = 411, 578 const CXCursor_CUDAConstantAttr = 412, 579 const CXCursor_CUDADeviceAttr = 413, 580 const CXCursor_CUDAGlobalAttr = 414, 581 const CXCursor_CUDAHostAttr = 415, 582 /// Only produced by `libclang` 3.6 and later. 583 const CXCursor_CUDASharedAttr = 416, 584 /// Only produced by `libclang` 3.8 and later. 585 const CXCursor_VisibilityAttr = 417, 586 /// Only produced by `libclang` 3.8 and later. 587 const CXCursor_DLLExport = 418, 588 /// Only produced by `libclang` 3.8 and later. 589 const CXCursor_DLLImport = 419, 590 /// Only produced by `libclang` 8.0 and later. 591 const CXCursor_NSReturnsRetained = 420, 592 /// Only produced by `libclang` 8.0 and later. 593 const CXCursor_NSReturnsNotRetained = 421, 594 /// Only produced by `libclang` 8.0 and later. 595 const CXCursor_NSReturnsAutoreleased = 422, 596 /// Only produced by `libclang` 8.0 and later. 597 const CXCursor_NSConsumesSelf = 423, 598 /// Only produced by `libclang` 8.0 and later. 599 const CXCursor_NSConsumed = 424, 600 /// Only produced by `libclang` 8.0 and later. 601 const CXCursor_ObjCException = 425, 602 /// Only produced by `libclang` 8.0 and later. 603 const CXCursor_ObjCNSObject = 426, 604 /// Only produced by `libclang` 8.0 and later. 605 const CXCursor_ObjCIndependentClass = 427, 606 /// Only produced by `libclang` 8.0 and later. 607 const CXCursor_ObjCPreciseLifetime = 428, 608 /// Only produced by `libclang` 8.0 and later. 609 const CXCursor_ObjCReturnsInnerPointer = 429, 610 /// Only produced by `libclang` 8.0 and later. 611 const CXCursor_ObjCRequiresSuper = 430, 612 /// Only produced by `libclang` 8.0 and later. 613 const CXCursor_ObjCRootClass = 431, 614 /// Only produced by `libclang` 8.0 and later. 615 const CXCursor_ObjCSubclassingRestricted = 432, 616 /// Only produced by `libclang` 8.0 and later. 617 const CXCursor_ObjCExplicitProtocolImpl = 433, 618 /// Only produced by `libclang` 8.0 and later. 619 const CXCursor_ObjCDesignatedInitializer = 434, 620 /// Only produced by `libclang` 8.0 and later. 621 const CXCursor_ObjCRuntimeVisible = 435, 622 /// Only produced by `libclang` 8.0 and later. 623 const CXCursor_ObjCBoxable = 436, 624 /// Only produced by `libclang` 8.0 and later. 625 const CXCursor_FlagEnum = 437, 626 /// Only produced by `libclang` 9.0 and later. 627 const CXCursor_ConvergentAttr = 438, 628 /// Only produced by `libclang` 9.0 and later. 629 const CXCursor_WarnUnusedAttr = 439, 630 /// Only produced by `libclang` 9.0 and later. 631 const CXCursor_WarnUnusedResultAttr = 440, 632 /// Only produced by `libclang` 9.0 and later. 633 const CXCursor_AlignedAttr = 441, 634 const CXCursor_PreprocessingDirective = 500, 635 const CXCursor_MacroDefinition = 501, 636 /// Duplicate of `CXCursor_MacroInstantiation`. 637 const CXCursor_MacroExpansion = 502, 638 const CXCursor_InclusionDirective = 503, 639 const CXCursor_ModuleImportDecl = 600, 640 /// Only produced by `libclang` 3.8 and later. 641 const CXCursor_TypeAliasTemplateDecl = 601, 642 /// Only produced by `libclang` 3.9 and later. 643 const CXCursor_StaticAssert = 602, 644 /// Only produced by `libclang` 4.0 and later. 645 const CXCursor_FriendDecl = 603, 646 /// Only produced by `libclang` 15.0 and later. 647 const CXCursor_ConceptDecl = 604, 648 /// Only produced by `libclang` 3.7 and later. 649 const CXCursor_OverloadCandidate = 700, 650 } 651 } 652 653 cenum! { 654 /// Only available on `libclang` 5.0 and later. 655 #[cfg(feature = "clang_5_0")] 656 enum CXCursor_ExceptionSpecificationKind { 657 const CXCursor_ExceptionSpecificationKind_None = 0, 658 const CXCursor_ExceptionSpecificationKind_DynamicNone = 1, 659 const CXCursor_ExceptionSpecificationKind_Dynamic = 2, 660 const CXCursor_ExceptionSpecificationKind_MSAny = 3, 661 const CXCursor_ExceptionSpecificationKind_BasicNoexcept = 4, 662 const CXCursor_ExceptionSpecificationKind_ComputedNoexcept = 5, 663 const CXCursor_ExceptionSpecificationKind_Unevaluated = 6, 664 const CXCursor_ExceptionSpecificationKind_Uninstantiated = 7, 665 const CXCursor_ExceptionSpecificationKind_Unparsed = 8, 666 /// Only available on `libclang` 9.0 and later. 667 #[cfg(feature = "clang_9_0")] 668 const CXCursor_ExceptionSpecificationKind_NoThrow = 9, 669 } 670 } 671 672 cenum! { 673 enum CXDiagnosticSeverity { 674 const CXDiagnostic_Ignored = 0, 675 const CXDiagnostic_Note = 1, 676 const CXDiagnostic_Warning = 2, 677 const CXDiagnostic_Error = 3, 678 const CXDiagnostic_Fatal = 4, 679 } 680 } 681 682 cenum! { 683 enum CXErrorCode { 684 const CXError_Success = 0, 685 const CXError_Failure = 1, 686 const CXError_Crashed = 2, 687 const CXError_InvalidArguments = 3, 688 const CXError_ASTReadError = 4, 689 } 690 } 691 692 cenum! { 693 enum CXEvalResultKind { 694 const CXEval_UnExposed = 0, 695 const CXEval_Int = 1 , 696 const CXEval_Float = 2, 697 const CXEval_ObjCStrLiteral = 3, 698 const CXEval_StrLiteral = 4, 699 const CXEval_CFStr = 5, 700 const CXEval_Other = 6, 701 } 702 } 703 704 cenum! { 705 enum CXIdxAttrKind { 706 const CXIdxAttr_Unexposed = 0, 707 const CXIdxAttr_IBAction = 1, 708 const CXIdxAttr_IBOutlet = 2, 709 const CXIdxAttr_IBOutletCollection = 3, 710 } 711 } 712 713 cenum! { 714 enum CXIdxEntityCXXTemplateKind { 715 const CXIdxEntity_NonTemplate = 0, 716 const CXIdxEntity_Template = 1, 717 const CXIdxEntity_TemplatePartialSpecialization = 2, 718 const CXIdxEntity_TemplateSpecialization = 3, 719 } 720 } 721 722 cenum! { 723 enum CXIdxEntityKind { 724 const CXIdxEntity_Unexposed = 0, 725 const CXIdxEntity_Typedef = 1, 726 const CXIdxEntity_Function = 2, 727 const CXIdxEntity_Variable = 3, 728 const CXIdxEntity_Field = 4, 729 const CXIdxEntity_EnumConstant = 5, 730 const CXIdxEntity_ObjCClass = 6, 731 const CXIdxEntity_ObjCProtocol = 7, 732 const CXIdxEntity_ObjCCategory = 8, 733 const CXIdxEntity_ObjCInstanceMethod = 9, 734 const CXIdxEntity_ObjCClassMethod = 10, 735 const CXIdxEntity_ObjCProperty = 11, 736 const CXIdxEntity_ObjCIvar = 12, 737 const CXIdxEntity_Enum = 13, 738 const CXIdxEntity_Struct = 14, 739 const CXIdxEntity_Union = 15, 740 const CXIdxEntity_CXXClass = 16, 741 const CXIdxEntity_CXXNamespace = 17, 742 const CXIdxEntity_CXXNamespaceAlias = 18, 743 const CXIdxEntity_CXXStaticVariable = 19, 744 const CXIdxEntity_CXXStaticMethod = 20, 745 const CXIdxEntity_CXXInstanceMethod = 21, 746 const CXIdxEntity_CXXConstructor = 22, 747 const CXIdxEntity_CXXDestructor = 23, 748 const CXIdxEntity_CXXConversionFunction = 24, 749 const CXIdxEntity_CXXTypeAlias = 25, 750 const CXIdxEntity_CXXInterface = 26, 751 /// Only produced by `libclang` 15.0 and later. 752 const CXIdxEntity_CXXConcept = 27, 753 } 754 } 755 756 cenum! { 757 enum CXIdxEntityLanguage { 758 const CXIdxEntityLang_None = 0, 759 const CXIdxEntityLang_C = 1, 760 const CXIdxEntityLang_ObjC = 2, 761 const CXIdxEntityLang_CXX = 3, 762 /// Only produced by `libclang` 5.0 and later. 763 const CXIdxEntityLang_Swift = 4, 764 } 765 } 766 767 cenum! { 768 enum CXIdxEntityRefKind { 769 const CXIdxEntityRef_Direct = 1, 770 const CXIdxEntityRef_Implicit = 2, 771 } 772 } 773 774 cenum! { 775 enum CXIdxObjCContainerKind { 776 const CXIdxObjCContainer_ForwardRef = 0, 777 const CXIdxObjCContainer_Interface = 1, 778 const CXIdxObjCContainer_Implementation = 2, 779 } 780 } 781 782 cenum! { 783 enum CXLanguageKind { 784 const CXLanguage_Invalid = 0, 785 const CXLanguage_C = 1, 786 const CXLanguage_ObjC = 2, 787 const CXLanguage_CPlusPlus = 3, 788 } 789 } 790 791 cenum! { 792 enum CXLinkageKind { 793 const CXLinkage_Invalid = 0, 794 const CXLinkage_NoLinkage = 1, 795 const CXLinkage_Internal = 2, 796 const CXLinkage_UniqueExternal = 3, 797 const CXLinkage_External = 4, 798 } 799 } 800 801 cenum! { 802 enum CXLoadDiag_Error { 803 const CXLoadDiag_None = 0, 804 const CXLoadDiag_Unknown = 1, 805 const CXLoadDiag_CannotLoad = 2, 806 const CXLoadDiag_InvalidFile = 3, 807 } 808 } 809 810 cenum! { 811 /// Only available on `libclang` 7.0 and later. 812 #[cfg(feature = "clang_7_0")] 813 enum CXPrintingPolicyProperty { 814 const CXPrintingPolicy_Indentation = 0, 815 const CXPrintingPolicy_SuppressSpecifiers = 1, 816 const CXPrintingPolicy_SuppressTagKeyword = 2, 817 const CXPrintingPolicy_IncludeTagDefinition = 3, 818 const CXPrintingPolicy_SuppressScope = 4, 819 const CXPrintingPolicy_SuppressUnwrittenScope = 5, 820 const CXPrintingPolicy_SuppressInitializers = 6, 821 const CXPrintingPolicy_ConstantArraySizeAsWritten = 7, 822 const CXPrintingPolicy_AnonymousTagLocations = 8, 823 const CXPrintingPolicy_SuppressStrongLifetime = 9, 824 const CXPrintingPolicy_SuppressLifetimeQualifiers = 10, 825 const CXPrintingPolicy_SuppressTemplateArgsInCXXConstructors = 11, 826 const CXPrintingPolicy_Bool = 12, 827 const CXPrintingPolicy_Restrict = 13, 828 const CXPrintingPolicy_Alignof = 14, 829 const CXPrintingPolicy_UnderscoreAlignof = 15, 830 const CXPrintingPolicy_UseVoidForZeroParams = 16, 831 const CXPrintingPolicy_TerseOutput = 17, 832 const CXPrintingPolicy_PolishForDeclaration = 18, 833 const CXPrintingPolicy_Half = 19, 834 const CXPrintingPolicy_MSWChar = 20, 835 const CXPrintingPolicy_IncludeNewlines = 21, 836 const CXPrintingPolicy_MSVCFormatting = 22, 837 const CXPrintingPolicy_ConstantsAsWritten = 23, 838 const CXPrintingPolicy_SuppressImplicitBase = 24, 839 const CXPrintingPolicy_FullyQualifiedName = 25, 840 } 841 } 842 843 cenum! { 844 enum CXRefQualifierKind { 845 const CXRefQualifier_None = 0, 846 const CXRefQualifier_LValue = 1, 847 const CXRefQualifier_RValue = 2, 848 } 849 } 850 851 cenum! { 852 enum CXResult { 853 const CXResult_Success = 0, 854 const CXResult_Invalid = 1, 855 const CXResult_VisitBreak = 2, 856 } 857 } 858 859 cenum! { 860 enum CXSaveError { 861 const CXSaveError_None = 0, 862 const CXSaveError_Unknown = 1, 863 const CXSaveError_TranslationErrors = 2, 864 const CXSaveError_InvalidTU = 3, 865 } 866 } 867 868 cenum! { 869 /// Only available on `libclang` 6.0 and later. 870 #[cfg(feature = "clang_6_0")] 871 enum CXTLSKind { 872 const CXTLS_None = 0, 873 const CXTLS_Dynamic = 1, 874 const CXTLS_Static = 2, 875 } 876 } 877 878 cenum! { 879 enum CXTUResourceUsageKind { 880 const CXTUResourceUsage_AST = 1, 881 const CXTUResourceUsage_Identifiers = 2, 882 const CXTUResourceUsage_Selectors = 3, 883 const CXTUResourceUsage_GlobalCompletionResults = 4, 884 const CXTUResourceUsage_SourceManagerContentCache = 5, 885 const CXTUResourceUsage_AST_SideTables = 6, 886 const CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7, 887 const CXTUResourceUsage_SourceManager_Membuffer_MMap = 8, 888 const CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, 889 const CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, 890 const CXTUResourceUsage_Preprocessor = 11, 891 const CXTUResourceUsage_PreprocessingRecord = 12, 892 const CXTUResourceUsage_SourceManager_DataStructures = 13, 893 const CXTUResourceUsage_Preprocessor_HeaderSearch = 14, 894 } 895 } 896 897 cenum! { 898 /// Only available on `libclang` 3.6 and later. 899 #[cfg(feature = "clang_3_6")] 900 enum CXTemplateArgumentKind { 901 const CXTemplateArgumentKind_Null = 0, 902 const CXTemplateArgumentKind_Type = 1, 903 const CXTemplateArgumentKind_Declaration = 2, 904 const CXTemplateArgumentKind_NullPtr = 3, 905 const CXTemplateArgumentKind_Integral = 4, 906 const CXTemplateArgumentKind_Template = 5, 907 const CXTemplateArgumentKind_TemplateExpansion = 6, 908 const CXTemplateArgumentKind_Expression = 7, 909 const CXTemplateArgumentKind_Pack = 8, 910 const CXTemplateArgumentKind_Invalid = 9, 911 } 912 } 913 914 cenum! { 915 enum CXTokenKind { 916 const CXToken_Punctuation = 0, 917 const CXToken_Keyword = 1, 918 const CXToken_Identifier = 2, 919 const CXToken_Literal = 3, 920 const CXToken_Comment = 4, 921 } 922 } 923 924 cenum! { 925 enum CXTypeKind { 926 const CXType_Invalid = 0, 927 const CXType_Unexposed = 1, 928 const CXType_Void = 2, 929 const CXType_Bool = 3, 930 const CXType_Char_U = 4, 931 const CXType_UChar = 5, 932 const CXType_Char16 = 6, 933 const CXType_Char32 = 7, 934 const CXType_UShort = 8, 935 const CXType_UInt = 9, 936 const CXType_ULong = 10, 937 const CXType_ULongLong = 11, 938 const CXType_UInt128 = 12, 939 const CXType_Char_S = 13, 940 const CXType_SChar = 14, 941 const CXType_WChar = 15, 942 const CXType_Short = 16, 943 const CXType_Int = 17, 944 const CXType_Long = 18, 945 const CXType_LongLong = 19, 946 const CXType_Int128 = 20, 947 const CXType_Float = 21, 948 const CXType_Double = 22, 949 const CXType_LongDouble = 23, 950 const CXType_NullPtr = 24, 951 const CXType_Overload = 25, 952 const CXType_Dependent = 26, 953 const CXType_ObjCId = 27, 954 const CXType_ObjCClass = 28, 955 const CXType_ObjCSel = 29, 956 /// Only produced by `libclang` 3.9 and later. 957 const CXType_Float128 = 30, 958 /// Only produced by `libclang` 5.0 and later. 959 const CXType_Half = 31, 960 /// Only produced by `libclang` 6.0 and later. 961 const CXType_Float16 = 32, 962 /// Only produced by `libclang` 7.0 and later. 963 const CXType_ShortAccum = 33, 964 /// Only produced by `libclang` 7.0 and later. 965 const CXType_Accum = 34, 966 /// Only produced by `libclang` 7.0 and later. 967 const CXType_LongAccum = 35, 968 /// Only produced by `libclang` 7.0 and later. 969 const CXType_UShortAccum = 36, 970 /// Only produced by `libclang` 7.0 and later. 971 const CXType_UAccum = 37, 972 /// Only produced by `libclang` 7.0 and later. 973 const CXType_ULongAccum = 38, 974 /// Only produced by `libclang` 11.0 and later. 975 const CXType_BFloat16 = 39, 976 /// Only produced by `libclang` 14.0 and later. 977 const CXType_Ibm128 = 40, 978 const CXType_Complex = 100, 979 const CXType_Pointer = 101, 980 const CXType_BlockPointer = 102, 981 const CXType_LValueReference = 103, 982 const CXType_RValueReference = 104, 983 const CXType_Record = 105, 984 const CXType_Enum = 106, 985 const CXType_Typedef = 107, 986 const CXType_ObjCInterface = 108, 987 const CXType_ObjCObjectPointer = 109, 988 const CXType_FunctionNoProto = 110, 989 const CXType_FunctionProto = 111, 990 const CXType_ConstantArray = 112, 991 const CXType_Vector = 113, 992 const CXType_IncompleteArray = 114, 993 const CXType_VariableArray = 115, 994 const CXType_DependentSizedArray = 116, 995 const CXType_MemberPointer = 117, 996 /// Only produced by `libclang` 3.8 and later. 997 const CXType_Auto = 118, 998 /// Only produced by `libclang` 3.9 and later. 999 const CXType_Elaborated = 119, 1000 /// Only produced by `libclang` 5.0 and later. 1001 const CXType_Pipe = 120, 1002 /// Only produced by `libclang` 5.0 and later. 1003 const CXType_OCLImage1dRO = 121, 1004 /// Only produced by `libclang` 5.0 and later. 1005 const CXType_OCLImage1dArrayRO = 122, 1006 /// Only produced by `libclang` 5.0 and later. 1007 const CXType_OCLImage1dBufferRO = 123, 1008 /// Only produced by `libclang` 5.0 and later. 1009 const CXType_OCLImage2dRO = 124, 1010 /// Only produced by `libclang` 5.0 and later. 1011 const CXType_OCLImage2dArrayRO = 125, 1012 /// Only produced by `libclang` 5.0 and later. 1013 const CXType_OCLImage2dDepthRO = 126, 1014 /// Only produced by `libclang` 5.0 and later. 1015 const CXType_OCLImage2dArrayDepthRO = 127, 1016 /// Only produced by `libclang` 5.0 and later. 1017 const CXType_OCLImage2dMSAARO = 128, 1018 /// Only produced by `libclang` 5.0 and later. 1019 const CXType_OCLImage2dArrayMSAARO = 129, 1020 /// Only produced by `libclang` 5.0 and later. 1021 const CXType_OCLImage2dMSAADepthRO = 130, 1022 /// Only produced by `libclang` 5.0 and later. 1023 const CXType_OCLImage2dArrayMSAADepthRO = 131, 1024 /// Only produced by `libclang` 5.0 and later. 1025 const CXType_OCLImage3dRO = 132, 1026 /// Only produced by `libclang` 5.0 and later. 1027 const CXType_OCLImage1dWO = 133, 1028 /// Only produced by `libclang` 5.0 and later. 1029 const CXType_OCLImage1dArrayWO = 134, 1030 /// Only produced by `libclang` 5.0 and later. 1031 const CXType_OCLImage1dBufferWO = 135, 1032 /// Only produced by `libclang` 5.0 and later. 1033 const CXType_OCLImage2dWO = 136, 1034 /// Only produced by `libclang` 5.0 and later. 1035 const CXType_OCLImage2dArrayWO = 137, 1036 /// Only produced by `libclang` 5.0 and later. 1037 const CXType_OCLImage2dDepthWO = 138, 1038 /// Only produced by `libclang` 5.0 and later. 1039 const CXType_OCLImage2dArrayDepthWO = 139, 1040 /// Only produced by `libclang` 5.0 and later. 1041 const CXType_OCLImage2dMSAAWO = 140, 1042 /// Only produced by `libclang` 5.0 and later. 1043 const CXType_OCLImage2dArrayMSAAWO = 141, 1044 /// Only produced by `libclang` 5.0 and later. 1045 const CXType_OCLImage2dMSAADepthWO = 142, 1046 /// Only produced by `libclang` 5.0 and later. 1047 const CXType_OCLImage2dArrayMSAADepthWO = 143, 1048 /// Only produced by `libclang` 5.0 and later. 1049 const CXType_OCLImage3dWO = 144, 1050 /// Only produced by `libclang` 5.0 and later. 1051 const CXType_OCLImage1dRW = 145, 1052 /// Only produced by `libclang` 5.0 and later. 1053 const CXType_OCLImage1dArrayRW = 146, 1054 /// Only produced by `libclang` 5.0 and later. 1055 const CXType_OCLImage1dBufferRW = 147, 1056 /// Only produced by `libclang` 5.0 and later. 1057 const CXType_OCLImage2dRW = 148, 1058 /// Only produced by `libclang` 5.0 and later. 1059 const CXType_OCLImage2dArrayRW = 149, 1060 /// Only produced by `libclang` 5.0 and later. 1061 const CXType_OCLImage2dDepthRW = 150, 1062 /// Only produced by `libclang` 5.0 and later. 1063 const CXType_OCLImage2dArrayDepthRW = 151, 1064 /// Only produced by `libclang` 5.0 and later. 1065 const CXType_OCLImage2dMSAARW = 152, 1066 /// Only produced by `libclang` 5.0 and later. 1067 const CXType_OCLImage2dArrayMSAARW = 153, 1068 /// Only produced by `libclang` 5.0 and later. 1069 const CXType_OCLImage2dMSAADepthRW = 154, 1070 /// Only produced by `libclang` 5.0 and later. 1071 const CXType_OCLImage2dArrayMSAADepthRW = 155, 1072 /// Only produced by `libclang` 5.0 and later. 1073 const CXType_OCLImage3dRW = 156, 1074 /// Only produced by `libclang` 5.0 and later. 1075 const CXType_OCLSampler = 157, 1076 /// Only produced by `libclang` 5.0 and later. 1077 const CXType_OCLEvent = 158, 1078 /// Only produced by `libclang` 5.0 and later. 1079 const CXType_OCLQueue = 159, 1080 /// Only produced by `libclang` 5.0 and later. 1081 const CXType_OCLReserveID = 160, 1082 /// Only produced by `libclang` 8.0 and later. 1083 const CXType_ObjCObject = 161, 1084 /// Only produced by `libclang` 8.0 and later. 1085 const CXType_ObjCTypeParam = 162, 1086 /// Only produced by `libclang` 8.0 and later. 1087 const CXType_Attributed = 163, 1088 /// Only produced by `libclang` 8.0 and later. 1089 const CXType_OCLIntelSubgroupAVCMcePayload = 164, 1090 /// Only produced by `libclang` 8.0 and later. 1091 const CXType_OCLIntelSubgroupAVCImePayload = 165, 1092 /// Only produced by `libclang` 8.0 and later. 1093 const CXType_OCLIntelSubgroupAVCRefPayload = 166, 1094 /// Only produced by `libclang` 8.0 and later. 1095 const CXType_OCLIntelSubgroupAVCSicPayload = 167, 1096 /// Only produced by `libclang` 8.0 and later. 1097 const CXType_OCLIntelSubgroupAVCMceResult = 168, 1098 /// Only produced by `libclang` 8.0 and later. 1099 const CXType_OCLIntelSubgroupAVCImeResult = 169, 1100 /// Only produced by `libclang` 8.0 and later. 1101 const CXType_OCLIntelSubgroupAVCRefResult = 170, 1102 /// Only produced by `libclang` 8.0 and later. 1103 const CXType_OCLIntelSubgroupAVCSicResult = 171, 1104 /// Only produced by `libclang` 8.0 and later. 1105 const CXType_OCLIntelSubgroupAVCImeResultSingleRefStreamout = 172, 1106 /// Only produced by `libclang` 8.0 and later. 1107 const CXType_OCLIntelSubgroupAVCImeResultDualRefStreamout = 173, 1108 /// Only produced by `libclang` 8.0 and later. 1109 const CXType_OCLIntelSubgroupAVCImeSingleRefStreamin = 174, 1110 /// Only produced by `libclang` 8.0 and later. 1111 const CXType_OCLIntelSubgroupAVCImeDualRefStreamin = 175, 1112 /// Only produced by `libclang` 9.0 and later. 1113 const CXType_ExtVector = 176, 1114 /// Only produced by `libclang` 11.0 and later. 1115 const CXType_Atomic = 177, 1116 /// Only produced by `libclang` 15.0 and later. 1117 const CXType_BTFTagAttributed = 178, 1118 } 1119 } 1120 1121 cenum! { 1122 enum CXTypeLayoutError { 1123 const CXTypeLayoutError_Invalid = -1, 1124 const CXTypeLayoutError_Incomplete = -2, 1125 const CXTypeLayoutError_Dependent = -3, 1126 const CXTypeLayoutError_NotConstantSize = -4, 1127 const CXTypeLayoutError_InvalidFieldName = -5, 1128 /// Only produced by `libclang` 9.0 and later. 1129 const CXTypeLayoutError_Undeduced = -6, 1130 } 1131 } 1132 1133 cenum! { 1134 /// Only available on `libclang` 3.8 and later. 1135 #[cfg(feature = "clang_3_8")] 1136 enum CXVisibilityKind { 1137 const CXVisibility_Invalid = 0, 1138 const CXVisibility_Hidden = 1, 1139 const CXVisibility_Protected = 2, 1140 const CXVisibility_Default = 3, 1141 } 1142 } 1143 1144 cenum! { 1145 /// Only available on `libclang` 8.0 and later. 1146 #[cfg(feature = "clang_8_0")] 1147 enum CXTypeNullabilityKind { 1148 const CXTypeNullability_NonNull = 0, 1149 const CXTypeNullability_Nullable = 1, 1150 const CXTypeNullability_Unspecified = 2, 1151 const CXTypeNullability_Invalid = 3, 1152 /// Only produced by `libclang` 12.0 and later. 1153 const CXTypeNullability_NullableResult = 4, 1154 } 1155 } 1156 1157 cenum! { 1158 /// Only available on `libclang` 17.0 and later. 1159 #[cfg(feature = "clang_17_0")] 1160 enum CXUnaryOperatorKind { 1161 const CXUnaryOperator_Invalid = 0, 1162 const CXUnaryOperator_PostInc = 1, 1163 const CXUnaryOperator_PostDec = 2, 1164 const CXUnaryOperator_PreInc = 3, 1165 const CXUnaryOperator_PreDec = 4, 1166 const CXUnaryOperator_AddrOf = 5, 1167 const CXUnaryOperator_Deref = 6, 1168 const CXUnaryOperator_Plus = 7, 1169 const CXUnaryOperator_Minus = 8, 1170 const CXUnaryOperator_Not = 9, 1171 const CXUnaryOperator_LNot = 10, 1172 const CXUnaryOperator_Real = 11, 1173 const CXUnaryOperator_Imag = 12, 1174 const CXUnaryOperator_Extension = 13, 1175 const CXUnaryOperator_Coawait = 14, 1176 } 1177 } 1178 1179 cenum! { 1180 enum CXVisitorResult { 1181 const CXVisit_Break = 0, 1182 const CXVisit_Continue = 1, 1183 } 1184 } 1185 1186 cenum! { 1187 enum CX_CXXAccessSpecifier { 1188 const CX_CXXInvalidAccessSpecifier = 0, 1189 const CX_CXXPublic = 1, 1190 const CX_CXXProtected = 2, 1191 const CX_CXXPrivate = 3, 1192 } 1193 } 1194 1195 cenum! { 1196 /// Only available on `libclang` 3.6 and later. 1197 #[cfg(feature = "clang_3_6")] 1198 enum CX_StorageClass { 1199 const CX_SC_Invalid = 0, 1200 const CX_SC_None = 1, 1201 const CX_SC_Extern = 2, 1202 const CX_SC_Static = 3, 1203 const CX_SC_PrivateExtern = 4, 1204 const CX_SC_OpenCLWorkGroupLocal = 5, 1205 const CX_SC_Auto = 6, 1206 const CX_SC_Register = 7, 1207 } 1208 } 1209 1210 //================================================ 1211 // Flags 1212 //================================================ 1213 1214 cenum! { 1215 enum CXCodeComplete_Flags { 1216 const CXCodeComplete_IncludeMacros = 1; 1217 const CXCodeComplete_IncludeCodePatterns = 2; 1218 const CXCodeComplete_IncludeBriefComments = 4; 1219 const CXCodeComplete_SkipPreamble = 8; 1220 const CXCodeComplete_IncludeCompletionsWithFixIts = 16; 1221 } 1222 } 1223 1224 cenum! { 1225 enum CXCompletionContext { 1226 const CXCompletionContext_Unexposed = 0; 1227 const CXCompletionContext_AnyType = 1; 1228 const CXCompletionContext_AnyValue = 2; 1229 const CXCompletionContext_ObjCObjectValue = 4; 1230 const CXCompletionContext_ObjCSelectorValue = 8; 1231 const CXCompletionContext_CXXClassTypeValue = 16; 1232 const CXCompletionContext_DotMemberAccess = 32; 1233 const CXCompletionContext_ArrowMemberAccess = 64; 1234 const CXCompletionContext_ObjCPropertyAccess = 128; 1235 const CXCompletionContext_EnumTag = 256; 1236 const CXCompletionContext_UnionTag = 512; 1237 const CXCompletionContext_StructTag = 1024; 1238 const CXCompletionContext_ClassTag = 2048; 1239 const CXCompletionContext_Namespace = 4096; 1240 const CXCompletionContext_NestedNameSpecifier = 8192; 1241 const CXCompletionContext_ObjCInterface = 16384; 1242 const CXCompletionContext_ObjCProtocol = 32768; 1243 const CXCompletionContext_ObjCCategory = 65536; 1244 const CXCompletionContext_ObjCInstanceMessage = 131072; 1245 const CXCompletionContext_ObjCClassMessage = 262144; 1246 const CXCompletionContext_ObjCSelectorName = 524288; 1247 const CXCompletionContext_MacroName = 1048576; 1248 const CXCompletionContext_NaturalLanguage = 2097152; 1249 const CXCompletionContext_IncludedFile = 4194304; 1250 const CXCompletionContext_Unknown = 8388607; 1251 } 1252 } 1253 1254 cenum! { 1255 enum CXDiagnosticDisplayOptions { 1256 const CXDiagnostic_DisplaySourceLocation = 1; 1257 const CXDiagnostic_DisplayColumn = 2; 1258 const CXDiagnostic_DisplaySourceRanges = 4; 1259 const CXDiagnostic_DisplayOption = 8; 1260 const CXDiagnostic_DisplayCategoryId = 16; 1261 const CXDiagnostic_DisplayCategoryName = 32; 1262 } 1263 } 1264 1265 cenum! { 1266 enum CXGlobalOptFlags { 1267 const CXGlobalOpt_None = 0; 1268 const CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 1; 1269 const CXGlobalOpt_ThreadBackgroundPriorityForEditing = 2; 1270 const CXGlobalOpt_ThreadBackgroundPriorityForAll = 3; 1271 } 1272 } 1273 1274 cenum! { 1275 enum CXIdxDeclInfoFlags { 1276 const CXIdxDeclFlag_Skipped = 1; 1277 } 1278 } 1279 1280 cenum! { 1281 enum CXIndexOptFlags { 1282 const CXIndexOptNone = 0; 1283 const CXIndexOptSuppressRedundantRefs = 1; 1284 const CXIndexOptIndexFunctionLocalSymbols = 2; 1285 const CXIndexOptIndexImplicitTemplateInstantiations = 4; 1286 const CXIndexOptSuppressWarnings = 8; 1287 const CXIndexOptSkipParsedBodiesInSession = 16; 1288 } 1289 } 1290 1291 /// Only available on `libclang` 17.0 and later. 1292 #[cfg(feature = "clang_17_0")] 1293 #[cfg(not(target_os = "windows"))] 1294 pub type CXIndexOptions_Flags = c_ushort; 1295 1296 /// Only available on `libclang` 17.0 and later. 1297 #[cfg(feature = "clang_17_0")] 1298 #[cfg(target_os = "windows")] 1299 pub type CXIndexOptions_Flags = c_uint; 1300 1301 /// Only available on `libclang` 17.0 and later. 1302 #[cfg(feature = "clang_17_0")] 1303 pub const CXIndexOptions_ExcludeDeclarationsFromPCH: CXIndexOptions_Flags = 1; 1304 1305 /// Only available on `libclang` 17.0 and later. 1306 #[cfg(feature = "clang_17_0")] 1307 pub const CXIndexOptions_DisplayDiagnostics: CXIndexOptions_Flags = 2; 1308 1309 /// Only available on `libclang` 17.0 and later. 1310 #[cfg(feature = "clang_17_0")] 1311 pub const CXIndexOptions_StorePreamblesInMemory: CXIndexOptions_Flags = 4; 1312 1313 cenum! { 1314 enum CXNameRefFlags { 1315 const CXNameRange_WantQualifier = 1; 1316 const CXNameRange_WantTemplateArgs = 2; 1317 const CXNameRange_WantSinglePiece = 4; 1318 } 1319 } 1320 1321 cenum! { 1322 enum CXObjCDeclQualifierKind { 1323 const CXObjCDeclQualifier_None = 0; 1324 const CXObjCDeclQualifier_In = 1; 1325 const CXObjCDeclQualifier_Inout = 2; 1326 const CXObjCDeclQualifier_Out = 4; 1327 const CXObjCDeclQualifier_Bycopy = 8; 1328 const CXObjCDeclQualifier_Byref = 16; 1329 const CXObjCDeclQualifier_Oneway = 32; 1330 } 1331 } 1332 1333 cenum! { 1334 enum CXObjCPropertyAttrKind { 1335 const CXObjCPropertyAttr_noattr = 0; 1336 const CXObjCPropertyAttr_readonly = 1; 1337 const CXObjCPropertyAttr_getter = 2; 1338 const CXObjCPropertyAttr_assign = 4; 1339 const CXObjCPropertyAttr_readwrite = 8; 1340 const CXObjCPropertyAttr_retain = 16; 1341 const CXObjCPropertyAttr_copy = 32; 1342 const CXObjCPropertyAttr_nonatomic = 64; 1343 const CXObjCPropertyAttr_setter = 128; 1344 const CXObjCPropertyAttr_atomic = 256; 1345 const CXObjCPropertyAttr_weak = 512; 1346 const CXObjCPropertyAttr_strong = 1024; 1347 const CXObjCPropertyAttr_unsafe_unretained = 2048; 1348 /// Only available on `libclang` 3.9 and later. 1349 #[cfg(feature = "clang_3_9")] 1350 const CXObjCPropertyAttr_class = 4096; 1351 } 1352 } 1353 1354 cenum! { 1355 enum CXReparse_Flags { 1356 const CXReparse_None = 0; 1357 } 1358 } 1359 1360 cenum! { 1361 enum CXSaveTranslationUnit_Flags { 1362 const CXSaveTranslationUnit_None = 0; 1363 } 1364 } 1365 1366 cenum! { 1367 /// Only available on `libclang` 7.0 and later. 1368 #[cfg(feature = "clang_7_0")] 1369 enum CXSymbolRole { 1370 const CXSymbolRole_None = 0; 1371 const CXSymbolRole_Declaration = 1; 1372 const CXSymbolRole_Definition = 2; 1373 const CXSymbolRole_Reference = 4; 1374 const CXSymbolRole_Read = 8; 1375 const CXSymbolRole_Write = 16; 1376 const CXSymbolRole_Call = 32; 1377 const CXSymbolRole_Dynamic = 64; 1378 const CXSymbolRole_AddressOf = 128; 1379 const CXSymbolRole_Implicit = 256; 1380 } 1381 } 1382 1383 cenum! { 1384 enum CXTranslationUnit_Flags { 1385 const CXTranslationUnit_None = 0; 1386 const CXTranslationUnit_DetailedPreprocessingRecord = 1; 1387 const CXTranslationUnit_Incomplete = 2; 1388 const CXTranslationUnit_PrecompiledPreamble = 4; 1389 const CXTranslationUnit_CacheCompletionResults = 8; 1390 const CXTranslationUnit_ForSerialization = 16; 1391 const CXTranslationUnit_CXXChainedPCH = 32; 1392 const CXTranslationUnit_SkipFunctionBodies = 64; 1393 const CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 128; 1394 /// Only available on `libclang` 3.8 and later. 1395 #[cfg(feature = "clang_3_8")] 1396 const CXTranslationUnit_CreatePreambleOnFirstParse = 256; 1397 /// Only available on `libclang` 3.9 and later. 1398 #[cfg(feature = "clang_3_9")] 1399 const CXTranslationUnit_KeepGoing = 512; 1400 /// Only available on `libclang` 5.0 and later. 1401 #[cfg(feature = "clang_5_0")] 1402 const CXTranslationUnit_SingleFileParse = 1024; 1403 /// Only available on `libclang` 7.0 and later. 1404 #[cfg(feature = "clang_7_0")] 1405 const CXTranslationUnit_LimitSkipFunctionBodiesToPreamble = 2048; 1406 /// Only available on `libclang` 8.0 and later. 1407 #[cfg(feature = "clang_8_0")] 1408 const CXTranslationUnit_IncludeAttributedTypes = 4096; 1409 /// Only available on `libclang` 8.0 and later. 1410 #[cfg(feature = "clang_8_0")] 1411 const CXTranslationUnit_VisitImplicitAttributes = 8192; 1412 /// Only available on `libclang` 9.0 and later. 1413 #[cfg(feature = "clang_9_0")] 1414 const CXTranslationUnit_IgnoreNonErrorsFromIncludedFiles = 16384; 1415 /// Only available on `libclang` 10.0 and later. 1416 #[cfg(feature = "clang_10_0")] 1417 const CXTranslationUnit_RetainExcludedConditionalBlocks = 32768; 1418 } 1419 } 1420 1421 //================================================ 1422 // Structs 1423 //================================================ 1424 1425 // Opaque ________________________________________ 1426 1427 macro_rules! opaque { 1428 ($name:ident) => { 1429 pub type $name = *mut c_void; 1430 }; 1431 } 1432 1433 opaque!(CXCompilationDatabase); 1434 opaque!(CXCompileCommand); 1435 opaque!(CXCompileCommands); 1436 opaque!(CXCompletionString); 1437 opaque!(CXCursorSet); 1438 opaque!(CXDiagnostic); 1439 opaque!(CXDiagnosticSet); 1440 #[cfg(feature = "clang_3_9")] 1441 opaque!(CXEvalResult); 1442 opaque!(CXFile); 1443 opaque!(CXIdxClientASTFile); 1444 opaque!(CXIdxClientContainer); 1445 opaque!(CXIdxClientEntity); 1446 opaque!(CXIdxClientFile); 1447 opaque!(CXIndex); 1448 opaque!(CXIndexAction); 1449 opaque!(CXModule); 1450 #[cfg(feature = "clang_7_0")] 1451 opaque!(CXPrintingPolicy); 1452 opaque!(CXRemapping); 1453 #[cfg(feature = "clang_5_0")] 1454 opaque!(CXTargetInfo); 1455 opaque!(CXTranslationUnit); 1456 1457 // Transparent ___________________________________ 1458 1459 #[derive(Copy, Clone, Debug)] 1460 #[repr(C)] 1461 pub struct CXCodeCompleteResults { 1462 pub Results: *mut CXCompletionResult, 1463 pub NumResults: c_uint, 1464 } 1465 1466 default!(CXCodeCompleteResults); 1467 1468 #[derive(Copy, Clone, Debug)] 1469 #[repr(C)] 1470 pub struct CXComment { 1471 pub ASTNode: *const c_void, 1472 pub TranslationUnit: CXTranslationUnit, 1473 } 1474 1475 default!(CXComment); 1476 1477 #[derive(Copy, Clone, Debug)] 1478 #[repr(C)] 1479 pub struct CXCompletionResult { 1480 pub CursorKind: CXCursorKind, 1481 pub CompletionString: CXCompletionString, 1482 } 1483 1484 default!(CXCompletionResult); 1485 1486 #[derive(Copy, Clone, Debug)] 1487 #[repr(C)] 1488 pub struct CXCursor { 1489 pub kind: CXCursorKind, 1490 pub xdata: c_int, 1491 pub data: [*const c_void; 3], 1492 } 1493 1494 default!(CXCursor); 1495 1496 #[derive(Copy, Clone, Debug)] 1497 #[repr(C)] 1498 pub struct CXCursorAndRangeVisitor { 1499 pub context: *mut c_void, 1500 pub visit: Option<extern "C" fn(*mut c_void, CXCursor, CXSourceRange) -> CXVisitorResult>, 1501 } 1502 1503 default!(CXCursorAndRangeVisitor); 1504 1505 #[derive(Copy, Clone, Debug)] 1506 #[repr(C)] 1507 pub struct CXFileUniqueID { 1508 pub data: [c_ulonglong; 3], 1509 } 1510 1511 default!(CXFileUniqueID); 1512 1513 #[derive(Copy, Clone, Debug)] 1514 #[repr(C)] 1515 pub struct CXIdxAttrInfo { 1516 pub kind: CXIdxAttrKind, 1517 pub cursor: CXCursor, 1518 pub loc: CXIdxLoc, 1519 } 1520 1521 default!(CXIdxAttrInfo); 1522 1523 #[derive(Copy, Clone, Debug)] 1524 #[repr(C)] 1525 pub struct CXIdxBaseClassInfo { 1526 pub base: *const CXIdxEntityInfo, 1527 pub cursor: CXCursor, 1528 pub loc: CXIdxLoc, 1529 } 1530 1531 default!(CXIdxBaseClassInfo); 1532 1533 #[derive(Copy, Clone, Debug)] 1534 #[repr(C)] 1535 pub struct CXIdxCXXClassDeclInfo { 1536 pub declInfo: *const CXIdxDeclInfo, 1537 pub bases: *const *const CXIdxBaseClassInfo, 1538 pub numBases: c_uint, 1539 } 1540 1541 default!(CXIdxCXXClassDeclInfo); 1542 1543 #[derive(Copy, Clone, Debug)] 1544 #[repr(C)] 1545 pub struct CXIdxContainerInfo { 1546 pub cursor: CXCursor, 1547 } 1548 1549 default!(CXIdxContainerInfo); 1550 1551 #[derive(Copy, Clone, Debug)] 1552 #[repr(C)] 1553 pub struct CXIdxDeclInfo { 1554 pub entityInfo: *const CXIdxEntityInfo, 1555 pub cursor: CXCursor, 1556 pub loc: CXIdxLoc, 1557 pub semanticContainer: *const CXIdxContainerInfo, 1558 pub lexicalContainer: *const CXIdxContainerInfo, 1559 pub isRedeclaration: c_int, 1560 pub isDefinition: c_int, 1561 pub isContainer: c_int, 1562 pub declAsContainer: *const CXIdxContainerInfo, 1563 pub isImplicit: c_int, 1564 pub attributes: *const *const CXIdxAttrInfo, 1565 pub numAttributes: c_uint, 1566 pub flags: c_uint, 1567 } 1568 1569 default!(CXIdxDeclInfo); 1570 1571 #[derive(Copy, Clone, Debug)] 1572 #[repr(C)] 1573 pub struct CXIdxEntityInfo { 1574 pub kind: CXIdxEntityKind, 1575 pub templateKind: CXIdxEntityCXXTemplateKind, 1576 pub lang: CXIdxEntityLanguage, 1577 pub name: *const c_char, 1578 pub USR: *const c_char, 1579 pub cursor: CXCursor, 1580 pub attributes: *const *const CXIdxAttrInfo, 1581 pub numAttributes: c_uint, 1582 } 1583 1584 default!(CXIdxEntityInfo); 1585 1586 #[derive(Copy, Clone, Debug)] 1587 #[repr(C)] 1588 pub struct CXIdxEntityRefInfo { 1589 pub kind: CXIdxEntityRefKind, 1590 pub cursor: CXCursor, 1591 pub loc: CXIdxLoc, 1592 pub referencedEntity: *const CXIdxEntityInfo, 1593 pub parentEntity: *const CXIdxEntityInfo, 1594 pub container: *const CXIdxContainerInfo, 1595 /// Only available on `libclang` 7.0 and later. 1596 #[cfg(feature = "clang_7_0")] 1597 pub role: CXSymbolRole, 1598 } 1599 1600 default!(CXIdxEntityRefInfo); 1601 1602 #[derive(Copy, Clone, Debug)] 1603 #[repr(C)] 1604 pub struct CXIdxIBOutletCollectionAttrInfo { 1605 pub attrInfo: *const CXIdxAttrInfo, 1606 pub objcClass: *const CXIdxEntityInfo, 1607 pub classCursor: CXCursor, 1608 pub classLoc: CXIdxLoc, 1609 } 1610 1611 default!(CXIdxIBOutletCollectionAttrInfo); 1612 1613 #[derive(Copy, Clone, Debug)] 1614 #[repr(C)] 1615 pub struct CXIdxImportedASTFileInfo { 1616 pub file: CXFile, 1617 pub module: CXModule, 1618 pub loc: CXIdxLoc, 1619 pub isImplicit: c_int, 1620 } 1621 1622 default!(CXIdxImportedASTFileInfo); 1623 1624 #[derive(Copy, Clone, Debug)] 1625 #[repr(C)] 1626 pub struct CXIdxIncludedFileInfo { 1627 pub hashLoc: CXIdxLoc, 1628 pub filename: *const c_char, 1629 pub file: CXFile, 1630 pub isImport: c_int, 1631 pub isAngled: c_int, 1632 pub isModuleImport: c_int, 1633 } 1634 1635 default!(CXIdxIncludedFileInfo); 1636 1637 #[derive(Copy, Clone, Debug)] 1638 #[repr(C)] 1639 pub struct CXIdxLoc { 1640 pub ptr_data: [*mut c_void; 2], 1641 pub int_data: c_uint, 1642 } 1643 1644 default!(CXIdxLoc); 1645 1646 #[derive(Copy, Clone, Debug)] 1647 #[repr(C)] 1648 pub struct CXIdxObjCCategoryDeclInfo { 1649 pub containerInfo: *const CXIdxObjCContainerDeclInfo, 1650 pub objcClass: *const CXIdxEntityInfo, 1651 pub classCursor: CXCursor, 1652 pub classLoc: CXIdxLoc, 1653 pub protocols: *const CXIdxObjCProtocolRefListInfo, 1654 } 1655 1656 default!(CXIdxObjCCategoryDeclInfo); 1657 1658 #[derive(Copy, Clone, Debug)] 1659 #[repr(C)] 1660 pub struct CXIdxObjCContainerDeclInfo { 1661 pub declInfo: *const CXIdxDeclInfo, 1662 pub kind: CXIdxObjCContainerKind, 1663 } 1664 1665 default!(CXIdxObjCContainerDeclInfo); 1666 1667 #[derive(Copy, Clone, Debug)] 1668 #[repr(C)] 1669 pub struct CXIdxObjCInterfaceDeclInfo { 1670 pub containerInfo: *const CXIdxObjCContainerDeclInfo, 1671 pub superInfo: *const CXIdxBaseClassInfo, 1672 pub protocols: *const CXIdxObjCProtocolRefListInfo, 1673 } 1674 1675 default!(CXIdxObjCInterfaceDeclInfo); 1676 1677 #[derive(Copy, Clone, Debug)] 1678 #[repr(C)] 1679 pub struct CXIdxObjCPropertyDeclInfo { 1680 pub declInfo: *const CXIdxDeclInfo, 1681 pub getter: *const CXIdxEntityInfo, 1682 pub setter: *const CXIdxEntityInfo, 1683 } 1684 1685 default!(CXIdxObjCPropertyDeclInfo); 1686 1687 #[derive(Copy, Clone, Debug)] 1688 #[repr(C)] 1689 pub struct CXIdxObjCProtocolRefInfo { 1690 pub protocol: *const CXIdxEntityInfo, 1691 pub cursor: CXCursor, 1692 pub loc: CXIdxLoc, 1693 } 1694 1695 default!(CXIdxObjCProtocolRefInfo); 1696 1697 #[derive(Copy, Clone, Debug)] 1698 #[repr(C)] 1699 pub struct CXIdxObjCProtocolRefListInfo { 1700 pub protocols: *const *const CXIdxObjCProtocolRefInfo, 1701 pub numProtocols: c_uint, 1702 } 1703 1704 default!(CXIdxObjCProtocolRefListInfo); 1705 1706 #[cfg(feature = "clang_17_0")] 1707 #[derive(Copy, Clone, Debug)] 1708 #[repr(C)] 1709 pub struct CXIndexOptions { 1710 pub Size: c_uint, 1711 pub ThreadBackgroundPriorityForIndexing: CXChoice, 1712 pub ThreadBackgroundPriorityForEditing: CXChoice, 1713 pub flags: CXIndexOptions_Flags, 1714 pub PreambleStoragePath: *const c_char, 1715 pub InvocationEmissionPath: *const c_char, 1716 } 1717 1718 #[cfg(feature = "clang_17_0")] 1719 default!(CXIndexOptions); 1720 1721 #[derive(Copy, Clone, Debug)] 1722 #[repr(C)] 1723 pub struct CXPlatformAvailability { 1724 pub Platform: CXString, 1725 pub Introduced: CXVersion, 1726 pub Deprecated: CXVersion, 1727 pub Obsoleted: CXVersion, 1728 pub Unavailable: c_int, 1729 pub Message: CXString, 1730 } 1731 1732 default!(CXPlatformAvailability); 1733 1734 #[derive(Copy, Clone, Debug)] 1735 #[repr(C)] 1736 pub struct CXSourceLocation { 1737 pub ptr_data: [*const c_void; 2], 1738 pub int_data: c_uint, 1739 } 1740 1741 default!(CXSourceLocation); 1742 1743 #[derive(Copy, Clone, Debug)] 1744 #[repr(C)] 1745 pub struct CXSourceRange { 1746 pub ptr_data: [*const c_void; 2], 1747 pub begin_int_data: c_uint, 1748 pub end_int_data: c_uint, 1749 } 1750 1751 default!(CXSourceRange); 1752 1753 #[derive(Copy, Clone, Debug)] 1754 #[repr(C)] 1755 pub struct CXSourceRangeList { 1756 pub count: c_uint, 1757 pub ranges: *mut CXSourceRange, 1758 } 1759 1760 default!(CXSourceRangeList); 1761 1762 #[derive(Copy, Clone, Debug)] 1763 #[repr(C)] 1764 pub struct CXString { 1765 pub data: *const c_void, 1766 pub private_flags: c_uint, 1767 } 1768 1769 default!(CXString); 1770 1771 #[cfg(feature = "clang_3_8")] 1772 #[derive(Copy, Clone, Debug)] 1773 #[repr(C)] 1774 pub struct CXStringSet { 1775 pub Strings: *mut CXString, 1776 pub Count: c_uint, 1777 } 1778 1779 #[cfg(feature = "clang_3_8")] 1780 default!(CXStringSet); 1781 1782 #[derive(Copy, Clone, Debug)] 1783 #[repr(C)] 1784 pub struct CXTUResourceUsage { 1785 pub data: *mut c_void, 1786 pub numEntries: c_uint, 1787 pub entries: *mut CXTUResourceUsageEntry, 1788 } 1789 1790 default!(CXTUResourceUsage); 1791 1792 #[derive(Copy, Clone, Debug)] 1793 #[repr(C)] 1794 pub struct CXTUResourceUsageEntry { 1795 pub kind: CXTUResourceUsageKind, 1796 pub amount: c_ulong, 1797 } 1798 1799 default!(CXTUResourceUsageEntry); 1800 1801 #[derive(Copy, Clone, Debug)] 1802 #[repr(C)] 1803 pub struct CXToken { 1804 pub int_data: [c_uint; 4], 1805 pub ptr_data: *mut c_void, 1806 } 1807 1808 default!(CXToken); 1809 1810 #[derive(Copy, Clone, Debug)] 1811 #[repr(C)] 1812 pub struct CXType { 1813 pub kind: CXTypeKind, 1814 pub data: [*mut c_void; 2], 1815 } 1816 1817 default!(CXType); 1818 1819 #[derive(Copy, Clone, Debug)] 1820 #[repr(C)] 1821 pub struct CXUnsavedFile { 1822 pub Filename: *const c_char, 1823 pub Contents: *const c_char, 1824 pub Length: c_ulong, 1825 } 1826 1827 default!(CXUnsavedFile); 1828 1829 #[derive(Copy, Clone, Debug)] 1830 #[repr(C)] 1831 pub struct CXVersion { 1832 pub Major: c_int, 1833 pub Minor: c_int, 1834 pub Subminor: c_int, 1835 } 1836 1837 default!(CXVersion); 1838 1839 #[derive(Copy, Clone, Debug)] 1840 #[repr(C)] 1841 #[rustfmt::skip] 1842 pub struct IndexerCallbacks { 1843 pub abortQuery: Option<extern "C" fn(CXClientData, *mut c_void) -> c_int>, 1844 pub diagnostic: Option<extern "C" fn(CXClientData, CXDiagnosticSet, *mut c_void)>, 1845 pub enteredMainFile: Option<extern "C" fn(CXClientData, CXFile, *mut c_void) -> CXIdxClientFile>, 1846 pub ppIncludedFile: Option<extern "C" fn(CXClientData, *const CXIdxIncludedFileInfo) -> CXIdxClientFile>, 1847 pub importedASTFile: Option<extern "C" fn(CXClientData, *const CXIdxImportedASTFileInfo) -> CXIdxClientASTFile>, 1848 pub startedTranslationUnit: Option<extern "C" fn(CXClientData, *mut c_void) -> CXIdxClientContainer>, 1849 pub indexDeclaration: Option<extern "C" fn(CXClientData, *const CXIdxDeclInfo)>, 1850 pub indexEntityReference: Option<extern "C" fn(CXClientData, *const CXIdxEntityRefInfo)>, 1851 } 1852 1853 default!(IndexerCallbacks); 1854 1855 //================================================ 1856 // Functions 1857 //================================================ 1858 1859 link! { 1860 pub fn clang_CXCursorSet_contains(set: CXCursorSet, cursor: CXCursor) -> c_uint; 1861 pub fn clang_CXCursorSet_insert(set: CXCursorSet, cursor: CXCursor) -> c_uint; 1862 pub fn clang_CXIndex_getGlobalOptions(index: CXIndex) -> CXGlobalOptFlags; 1863 pub fn clang_CXIndex_setGlobalOptions(index: CXIndex, flags: CXGlobalOptFlags); 1864 /// Only available on `libclang` 6.0 and later. 1865 #[cfg(feature = "clang_6_0")] 1866 pub fn clang_CXIndex_setInvocationEmissionPathOption(index: CXIndex, path: *const c_char); 1867 /// Only available on `libclang` 3.9 and later. 1868 #[cfg(feature = "clang_3_9")] 1869 pub fn clang_CXXConstructor_isConvertingConstructor(cursor: CXCursor) -> c_uint; 1870 /// Only available on `libclang` 3.9 and later. 1871 #[cfg(feature = "clang_3_9")] 1872 pub fn clang_CXXConstructor_isCopyConstructor(cursor: CXCursor) -> c_uint; 1873 /// Only available on `libclang` 3.9 and later. 1874 #[cfg(feature = "clang_3_9")] 1875 pub fn clang_CXXConstructor_isDefaultConstructor(cursor: CXCursor) -> c_uint; 1876 /// Only available on `libclang` 3.9 and later. 1877 #[cfg(feature = "clang_3_9")] 1878 pub fn clang_CXXConstructor_isMoveConstructor(cursor: CXCursor) -> c_uint; 1879 /// Only available on `libclang` 3.8 and later. 1880 #[cfg(feature = "clang_3_8")] 1881 pub fn clang_CXXField_isMutable(cursor: CXCursor) -> c_uint; 1882 pub fn clang_CXXMethod_isConst(cursor: CXCursor) -> c_uint; 1883 /// Only available on `libclang` 16.0 and later. 1884 #[cfg(feature = "clang_16_0")] 1885 pub fn clang_CXXMethod_isCopyAssignmentOperator(cursor: CXCursor) -> c_uint; 1886 /// Only available on `libclang` 3.9 and later. 1887 #[cfg(feature = "clang_3_9")] 1888 pub fn clang_CXXMethod_isDefaulted(cursor: CXCursor) -> c_uint; 1889 /// Only available on `libclang` 16.0 and later. 1890 #[cfg(feature = "clang_16_0")] 1891 pub fn clang_CXXMethod_isDeleted(cursor: CXCursor) -> c_uint; 1892 /// Only available on `libclang` 16.0 and later. 1893 #[cfg(feature = "clang_16_0")] 1894 pub fn clang_CXXMethod_isMoveAssignmentOperator(cursor: CXCursor) -> c_uint; 1895 pub fn clang_CXXMethod_isPureVirtual(cursor: CXCursor) -> c_uint; 1896 pub fn clang_CXXMethod_isStatic(cursor: CXCursor) -> c_uint; 1897 pub fn clang_CXXMethod_isVirtual(cursor: CXCursor) -> c_uint; 1898 /// Only available on `libclang` 17.0 and later. 1899 #[cfg(feature = "clang_17_0")] 1900 pub fn clang_CXXMethod_isExplicit(cursor: CXCursor) -> c_uint; 1901 /// Only available on `libclang` 6.0 and later. 1902 #[cfg(feature = "clang_6_0")] 1903 pub fn clang_CXXRecord_isAbstract(cursor: CXCursor) -> c_uint; 1904 pub fn clang_CompilationDatabase_dispose(database: CXCompilationDatabase); 1905 pub fn clang_CompilationDatabase_fromDirectory(directory: *const c_char, error: *mut CXCompilationDatabase_Error) -> CXCompilationDatabase; 1906 pub fn clang_CompilationDatabase_getAllCompileCommands(database: CXCompilationDatabase) -> CXCompileCommands; 1907 pub fn clang_CompilationDatabase_getCompileCommands(database: CXCompilationDatabase, filename: *const c_char) -> CXCompileCommands; 1908 pub fn clang_CompileCommand_getArg(command: CXCompileCommand, index: c_uint) -> CXString; 1909 pub fn clang_CompileCommand_getDirectory(command: CXCompileCommand) -> CXString; 1910 /// Only available on `libclang` 3.8 and later. 1911 #[cfg(feature = "clang_3_8")] 1912 pub fn clang_CompileCommand_getFilename(command: CXCompileCommand) -> CXString; 1913 /// Only available on `libclang` 3.8 and later. 1914 #[cfg(feature = "clang_3_8")] 1915 pub fn clang_CompileCommand_getMappedSourceContent(command: CXCompileCommand, index: c_uint) -> CXString; 1916 /// Only available on `libclang` 3.8 and later. 1917 #[cfg(feature = "clang_3_8")] 1918 pub fn clang_CompileCommand_getMappedSourcePath(command: CXCompileCommand, index: c_uint) -> CXString; 1919 pub fn clang_CompileCommand_getNumArgs(command: CXCompileCommand) -> c_uint; 1920 pub fn clang_CompileCommand_getNumMappedSources(command: CXCompileCommand) -> c_uint; 1921 pub fn clang_CompileCommands_dispose(command: CXCompileCommands); 1922 pub fn clang_CompileCommands_getCommand(command: CXCompileCommands, index: c_uint) -> CXCompileCommand; 1923 pub fn clang_CompileCommands_getSize(command: CXCompileCommands) -> c_uint; 1924 /// Only available on `libclang` 3.9 and later. 1925 #[cfg(feature = "clang_3_9")] 1926 pub fn clang_Cursor_Evaluate(cursor: CXCursor) -> CXEvalResult; 1927 pub fn clang_Cursor_getArgument(cursor: CXCursor, index: c_uint) -> CXCursor; 1928 pub fn clang_Cursor_getBriefCommentText(cursor: CXCursor) -> CXString; 1929 /// Only available on `libclang` 3.8 and later. 1930 #[cfg(feature = "clang_3_8")] 1931 pub fn clang_Cursor_getCXXManglings(cursor: CXCursor) -> *mut CXStringSet; 1932 pub fn clang_Cursor_getCommentRange(cursor: CXCursor) -> CXSourceRange; 1933 /// Only available on `libclang` 3.6 and later. 1934 #[cfg(feature = "clang_3_6")] 1935 pub fn clang_Cursor_getMangling(cursor: CXCursor) -> CXString; 1936 pub fn clang_Cursor_getModule(cursor: CXCursor) -> CXModule; 1937 pub fn clang_Cursor_getNumArguments(cursor: CXCursor) -> c_int; 1938 /// Only available on `libclang` 3.6 and later. 1939 #[cfg(feature = "clang_3_6")] 1940 pub fn clang_Cursor_getNumTemplateArguments(cursor: CXCursor) -> c_int; 1941 pub fn clang_Cursor_getObjCDeclQualifiers(cursor: CXCursor) -> CXObjCDeclQualifierKind; 1942 /// Only available on `libclang` 6.0 and later. 1943 #[cfg(feature = "clang_6_0")] 1944 pub fn clang_Cursor_getObjCManglings(cursor: CXCursor) -> *mut CXStringSet; 1945 pub fn clang_Cursor_getObjCPropertyAttributes(cursor: CXCursor, reserved: c_uint) -> CXObjCPropertyAttrKind; 1946 /// Only available on `libclang` 8.0 and later. 1947 #[cfg(feature = "clang_8_0")] 1948 pub fn clang_Cursor_getObjCPropertyGetterName(cursor: CXCursor) -> CXString; 1949 /// Only available on `libclang` 8.0 and later. 1950 #[cfg(feature = "clang_8_0")] 1951 pub fn clang_Cursor_getObjCPropertySetterName(cursor: CXCursor) -> CXString; 1952 pub fn clang_Cursor_getObjCSelectorIndex(cursor: CXCursor) -> c_int; 1953 /// Only available on `libclang` 3.7 and later. 1954 #[cfg(feature = "clang_3_7")] 1955 pub fn clang_Cursor_getOffsetOfField(cursor: CXCursor) -> c_longlong; 1956 pub fn clang_Cursor_getRawCommentText(cursor: CXCursor) -> CXString; 1957 pub fn clang_Cursor_getReceiverType(cursor: CXCursor) -> CXType; 1958 pub fn clang_Cursor_getSpellingNameRange(cursor: CXCursor, index: c_uint, reserved: c_uint) -> CXSourceRange; 1959 /// Only available on `libclang` 3.6 and later. 1960 #[cfg(feature = "clang_3_6")] 1961 pub fn clang_Cursor_getStorageClass(cursor: CXCursor) -> CX_StorageClass; 1962 /// Only available on `libclang` 3.6 and later. 1963 #[cfg(feature = "clang_3_6")] 1964 pub fn clang_Cursor_getTemplateArgumentKind(cursor: CXCursor, index: c_uint) -> CXTemplateArgumentKind; 1965 /// Only available on `libclang` 3.6 and later. 1966 #[cfg(feature = "clang_3_6")] 1967 pub fn clang_Cursor_getTemplateArgumentType(cursor: CXCursor, index: c_uint) -> CXType; 1968 /// Only available on `libclang` 3.6 and later. 1969 #[cfg(feature = "clang_3_6")] 1970 pub fn clang_Cursor_getTemplateArgumentUnsignedValue(cursor: CXCursor, index: c_uint) -> c_ulonglong; 1971 /// Only available on `libclang` 3.6 and later. 1972 #[cfg(feature = "clang_3_6")] 1973 pub fn clang_Cursor_getTemplateArgumentValue(cursor: CXCursor, index: c_uint) -> c_longlong; 1974 pub fn clang_Cursor_getTranslationUnit(cursor: CXCursor) -> CXTranslationUnit; 1975 /// Only available on `libclang` 12.0 and later. 1976 #[cfg(feature = "clang_12_0")] 1977 pub fn clang_Cursor_getVarDeclInitializer(cursor: CXCursor) -> CXCursor; 1978 /// Only available on `libclang` 3.9 and later. 1979 #[cfg(feature = "clang_3_9")] 1980 pub fn clang_Cursor_hasAttrs(cursor: CXCursor) -> c_uint; 1981 /// Only available on `libclang` 12.0 and later. 1982 #[cfg(feature = "clang_12_0")] 1983 pub fn clang_Cursor_hasVarDeclGlobalStorage(cursor: CXCursor) -> c_uint; 1984 /// Only available on `libclang` 12.0 and later. 1985 #[cfg(feature = "clang_12_0")] 1986 pub fn clang_Cursor_hasVarDeclExternalStorage(cursor: CXCursor) -> c_uint; 1987 /// Only available on `libclang` 3.7 and later. 1988 #[cfg(feature = "clang_3_7")] 1989 pub fn clang_Cursor_isAnonymous(cursor: CXCursor) -> c_uint; 1990 /// Only available on `libclang` 9.0 and later. 1991 #[cfg(feature = "clang_9_0")] 1992 pub fn clang_Cursor_isAnonymousRecordDecl(cursor: CXCursor) -> c_uint; 1993 pub fn clang_Cursor_isBitField(cursor: CXCursor) -> c_uint; 1994 pub fn clang_Cursor_isDynamicCall(cursor: CXCursor) -> c_int; 1995 /// Only available on `libclang` 5.0 and later. 1996 #[cfg(feature = "clang_5_0")] 1997 pub fn clang_Cursor_isExternalSymbol(cursor: CXCursor, language: *mut CXString, from: *mut CXString, generated: *mut c_uint) -> c_uint; 1998 /// Only available on `libclang` 3.9 and later. 1999 #[cfg(feature = "clang_3_9")] 2000 pub fn clang_Cursor_isFunctionInlined(cursor: CXCursor) -> c_uint; 2001 /// Only available on `libclang` 9.0 and later. 2002 #[cfg(feature = "clang_9_0")] 2003 pub fn clang_Cursor_isInlineNamespace(cursor: CXCursor) -> c_uint; 2004 /// Only available on `libclang` 3.9 and later. 2005 #[cfg(feature = "clang_3_9")] 2006 pub fn clang_Cursor_isMacroBuiltin(cursor: CXCursor) -> c_uint; 2007 /// Only available on `libclang` 3.9 and later. 2008 #[cfg(feature = "clang_3_9")] 2009 pub fn clang_Cursor_isMacroFunctionLike(cursor: CXCursor) -> c_uint; 2010 pub fn clang_Cursor_isNull(cursor: CXCursor) -> c_int; 2011 pub fn clang_Cursor_isObjCOptional(cursor: CXCursor) -> c_uint; 2012 pub fn clang_Cursor_isVariadic(cursor: CXCursor) -> c_uint; 2013 /// Only available on `libclang` 5.0 and later. 2014 #[cfg(feature = "clang_5_0")] 2015 pub fn clang_EnumDecl_isScoped(cursor: CXCursor) -> c_uint; 2016 /// Only available on `libclang` 3.9 and later. 2017 #[cfg(feature = "clang_3_9")] 2018 pub fn clang_EvalResult_dispose(result: CXEvalResult); 2019 /// Only available on `libclang` 3.9 and later. 2020 #[cfg(feature = "clang_3_9")] 2021 pub fn clang_EvalResult_getAsDouble(result: CXEvalResult) -> libc::c_double; 2022 /// Only available on `libclang` 3.9 and later. 2023 #[cfg(feature = "clang_3_9")] 2024 pub fn clang_EvalResult_getAsInt(result: CXEvalResult) -> c_int; 2025 /// Only available on `libclang` 4.0 and later. 2026 #[cfg(feature = "clang_4_0")] 2027 pub fn clang_EvalResult_getAsLongLong(result: CXEvalResult) -> c_longlong; 2028 /// Only available on `libclang` 3.9 and later. 2029 #[cfg(feature = "clang_3_9")] 2030 pub fn clang_EvalResult_getAsStr(result: CXEvalResult) -> *const c_char; 2031 /// Only available on `libclang` 4.0 and later. 2032 #[cfg(feature = "clang_4_0")] 2033 pub fn clang_EvalResult_getAsUnsigned(result: CXEvalResult) -> c_ulonglong; 2034 /// Only available on `libclang` 3.9 and later. 2035 #[cfg(feature = "clang_3_9")] 2036 pub fn clang_EvalResult_getKind(result: CXEvalResult) -> CXEvalResultKind; 2037 /// Only available on `libclang` 4.0 and later. 2038 #[cfg(feature = "clang_4_0")] 2039 pub fn clang_EvalResult_isUnsignedInt(result: CXEvalResult) -> c_uint; 2040 /// Only available on `libclang` 3.6 and later. 2041 #[cfg(feature = "clang_3_6")] 2042 pub fn clang_File_isEqual(left: CXFile, right: CXFile) -> c_int; 2043 /// Only available on `libclang` 7.0 and later. 2044 #[cfg(feature = "clang_7_0")] 2045 pub fn clang_File_tryGetRealPathName(file: CXFile) -> CXString; 2046 pub fn clang_IndexAction_create(index: CXIndex) -> CXIndexAction; 2047 pub fn clang_IndexAction_dispose(index: CXIndexAction); 2048 pub fn clang_Location_isFromMainFile(location: CXSourceLocation) -> c_int; 2049 pub fn clang_Location_isInSystemHeader(location: CXSourceLocation) -> c_int; 2050 pub fn clang_Module_getASTFile(module: CXModule) -> CXFile; 2051 pub fn clang_Module_getFullName(module: CXModule) -> CXString; 2052 pub fn clang_Module_getName(module: CXModule) -> CXString; 2053 pub fn clang_Module_getNumTopLevelHeaders(tu: CXTranslationUnit, module: CXModule) -> c_uint; 2054 pub fn clang_Module_getParent(module: CXModule) -> CXModule; 2055 pub fn clang_Module_getTopLevelHeader(tu: CXTranslationUnit, module: CXModule, index: c_uint) -> CXFile; 2056 pub fn clang_Module_isSystem(module: CXModule) -> c_int; 2057 /// Only available on `libclang` 7.0 and later. 2058 #[cfg(feature = "clang_7_0")] 2059 pub fn clang_PrintingPolicy_dispose(policy: CXPrintingPolicy); 2060 /// Only available on `libclang` 7.0 and later. 2061 #[cfg(feature = "clang_7_0")] 2062 pub fn clang_PrintingPolicy_getProperty(policy: CXPrintingPolicy, property: CXPrintingPolicyProperty) -> c_uint; 2063 /// Only available on `libclang` 7.0 and later. 2064 #[cfg(feature = "clang_7_0")] 2065 pub fn clang_PrintingPolicy_setProperty(policy: CXPrintingPolicy, property: CXPrintingPolicyProperty, value: c_uint); 2066 pub fn clang_Range_isNull(range: CXSourceRange) -> c_int; 2067 /// Only available on `libclang` 5.0 and later. 2068 #[cfg(feature = "clang_5_0")] 2069 pub fn clang_TargetInfo_dispose(info: CXTargetInfo); 2070 /// Only available on `libclang` 5.0 and later. 2071 #[cfg(feature = "clang_5_0")] 2072 pub fn clang_TargetInfo_getPointerWidth(info: CXTargetInfo) -> c_int; 2073 /// Only available on `libclang` 5.0 and later. 2074 #[cfg(feature = "clang_5_0")] 2075 pub fn clang_TargetInfo_getTriple(info: CXTargetInfo) -> CXString; 2076 pub fn clang_Type_getAlignOf(type_: CXType) -> c_longlong; 2077 pub fn clang_Type_getCXXRefQualifier(type_: CXType) -> CXRefQualifierKind; 2078 pub fn clang_Type_getClassType(type_: CXType) -> CXType; 2079 /// Only available on `libclang` 8.0 and later. 2080 #[cfg(feature = "clang_8_0")] 2081 pub fn clang_Type_getModifiedType(type_: CXType) -> CXType; 2082 /// Only available on `libclang` 3.9 and later. 2083 #[cfg(feature = "clang_3_9")] 2084 pub fn clang_Type_getNamedType(type_: CXType) -> CXType; 2085 /// Only available on `libclang` 8.0 and later. 2086 #[cfg(feature = "clang_8_0")] 2087 pub fn clang_Type_getNullability(type_: CXType) -> CXTypeNullabilityKind; 2088 /// Only available on `libclang` 8.0 and later. 2089 #[cfg(feature = "clang_8_0")] 2090 pub fn clang_Type_getNumObjCProtocolRefs(type_: CXType) -> c_uint; 2091 /// Only available on `libclang` 8.0 and later. 2092 #[cfg(feature = "clang_8_0")] 2093 pub fn clang_Type_getNumObjCTypeArgs(type_: CXType) -> c_uint; 2094 pub fn clang_Type_getNumTemplateArguments(type_: CXType) -> c_int; 2095 /// Only available on `libclang` 3.9 and later. 2096 #[cfg(feature = "clang_3_9")] 2097 pub fn clang_Type_getObjCEncoding(type_: CXType) -> CXString; 2098 /// Only available on `libclang` 8.0 and later. 2099 #[cfg(feature = "clang_8_0")] 2100 pub fn clang_Type_getObjCObjectBaseType(type_: CXType) -> CXType; 2101 /// Only available on `libclang` 8.0 and later. 2102 #[cfg(feature = "clang_8_0")] 2103 pub fn clang_Type_getObjCProtocolDecl(type_: CXType, index: c_uint) -> CXCursor; 2104 /// Only available on `libclang` 8.0 and later. 2105 #[cfg(feature = "clang_8_0")] 2106 pub fn clang_Type_getObjCTypeArg(type_: CXType, index: c_uint) -> CXType; 2107 pub fn clang_Type_getOffsetOf(type_: CXType, field: *const c_char) -> c_longlong; 2108 pub fn clang_Type_getSizeOf(type_: CXType) -> c_longlong; 2109 pub fn clang_Type_getTemplateArgumentAsType(type_: CXType, index: c_uint) -> CXType; 2110 /// Only available on `libclang` 11.0 and later. 2111 #[cfg(feature = "clang_11_0")] 2112 pub fn clang_Type_getValueType(type_: CXType) -> CXType; 2113 /// Only available on `libclang` 5.0 and later. 2114 #[cfg(feature = "clang_5_0")] 2115 pub fn clang_Type_isTransparentTagTypedef(type_: CXType) -> c_uint; 2116 /// Only available on `libclang` 3.7 and later. 2117 #[cfg(feature = "clang_3_7")] 2118 pub fn clang_Type_visitFields(type_: CXType, visitor: CXFieldVisitor, data: CXClientData) -> CXVisitorResult; 2119 pub fn clang_annotateTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint, cursors: *mut CXCursor); 2120 pub fn clang_codeCompleteAt(tu: CXTranslationUnit, file: *const c_char, line: c_uint, column: c_uint, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXCodeComplete_Flags) -> *mut CXCodeCompleteResults; 2121 pub fn clang_codeCompleteGetContainerKind(results: *mut CXCodeCompleteResults, incomplete: *mut c_uint) -> CXCursorKind; 2122 pub fn clang_codeCompleteGetContainerUSR(results: *mut CXCodeCompleteResults) -> CXString; 2123 pub fn clang_codeCompleteGetContexts(results: *mut CXCodeCompleteResults) -> c_ulonglong; 2124 pub fn clang_codeCompleteGetDiagnostic(results: *mut CXCodeCompleteResults, index: c_uint) -> CXDiagnostic; 2125 pub fn clang_codeCompleteGetNumDiagnostics(results: *mut CXCodeCompleteResults) -> c_uint; 2126 pub fn clang_codeCompleteGetObjCSelector(results: *mut CXCodeCompleteResults) -> CXString; 2127 pub fn clang_constructUSR_ObjCCategory(class: *const c_char, category: *const c_char) -> CXString; 2128 pub fn clang_constructUSR_ObjCClass(class: *const c_char) -> CXString; 2129 pub fn clang_constructUSR_ObjCIvar(name: *const c_char, usr: CXString) -> CXString; 2130 pub fn clang_constructUSR_ObjCMethod(name: *const c_char, instance: c_uint, usr: CXString) -> CXString; 2131 pub fn clang_constructUSR_ObjCProperty(property: *const c_char, usr: CXString) -> CXString; 2132 pub fn clang_constructUSR_ObjCProtocol(protocol: *const c_char) -> CXString; 2133 pub fn clang_createCXCursorSet() -> CXCursorSet; 2134 pub fn clang_createIndex(exclude: c_int, display: c_int) -> CXIndex; 2135 /// Only available on `libclang` 17.0 and later. 2136 #[cfg(feature = "clang_17_0")] 2137 pub fn clang_createIndexWithOptions(options: CXIndexOptions) -> CXIndex; 2138 pub fn clang_createTranslationUnit(index: CXIndex, file: *const c_char) -> CXTranslationUnit; 2139 pub fn clang_createTranslationUnit2(index: CXIndex, file: *const c_char, tu: *mut CXTranslationUnit) -> CXErrorCode; 2140 pub fn clang_createTranslationUnitFromSourceFile(index: CXIndex, file: *const c_char, n_arguments: c_int, arguments: *const *const c_char, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile) -> CXTranslationUnit; 2141 pub fn clang_defaultCodeCompleteOptions() -> CXCodeComplete_Flags; 2142 pub fn clang_defaultDiagnosticDisplayOptions() -> CXDiagnosticDisplayOptions; 2143 pub fn clang_defaultEditingTranslationUnitOptions() -> CXTranslationUnit_Flags; 2144 pub fn clang_defaultReparseOptions(tu: CXTranslationUnit) -> CXReparse_Flags; 2145 pub fn clang_defaultSaveOptions(tu: CXTranslationUnit) -> CXSaveTranslationUnit_Flags; 2146 pub fn clang_disposeCXCursorSet(set: CXCursorSet); 2147 pub fn clang_disposeCXPlatformAvailability(availability: *mut CXPlatformAvailability); 2148 pub fn clang_disposeCXTUResourceUsage(usage: CXTUResourceUsage); 2149 pub fn clang_disposeCodeCompleteResults(results: *mut CXCodeCompleteResults); 2150 pub fn clang_disposeDiagnostic(diagnostic: CXDiagnostic); 2151 pub fn clang_disposeDiagnosticSet(diagnostic: CXDiagnosticSet); 2152 pub fn clang_disposeIndex(index: CXIndex); 2153 pub fn clang_disposeOverriddenCursors(cursors: *mut CXCursor); 2154 pub fn clang_disposeSourceRangeList(list: *mut CXSourceRangeList); 2155 pub fn clang_disposeString(string: CXString); 2156 /// Only available on `libclang` 3.8 and later. 2157 #[cfg(feature = "clang_3_8")] 2158 pub fn clang_disposeStringSet(set: *mut CXStringSet); 2159 pub fn clang_disposeTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint); 2160 pub fn clang_disposeTranslationUnit(tu: CXTranslationUnit); 2161 pub fn clang_enableStackTraces(); 2162 pub fn clang_equalCursors(left: CXCursor, right: CXCursor) -> c_uint; 2163 pub fn clang_equalLocations(left: CXSourceLocation, right: CXSourceLocation) -> c_uint; 2164 pub fn clang_equalRanges(left: CXSourceRange, right: CXSourceRange) -> c_uint; 2165 pub fn clang_equalTypes(left: CXType, right: CXType) -> c_uint; 2166 pub fn clang_executeOnThread(function: extern fn(*mut c_void), data: *mut c_void, stack: c_uint); 2167 pub fn clang_findIncludesInFile(tu: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult; 2168 pub fn clang_findReferencesInFile(cursor: CXCursor, file: CXFile, visitor: CXCursorAndRangeVisitor) -> CXResult; 2169 pub fn clang_formatDiagnostic(diagnostic: CXDiagnostic, flags: CXDiagnosticDisplayOptions) -> CXString; 2170 /// Only available on `libclang` 3.7 and later. 2171 #[cfg(feature = "clang_3_7")] 2172 pub fn clang_free(buffer: *mut c_void); 2173 /// Only available on `libclang` 5.0 and later. 2174 #[cfg(feature = "clang_5_0")] 2175 pub fn clang_getAddressSpace(type_: CXType) -> c_uint; 2176 /// Only available on `libclang` 4.0 and later. 2177 #[cfg(feature = "clang_4_0")] 2178 pub fn clang_getAllSkippedRanges(tu: CXTranslationUnit) -> *mut CXSourceRangeList; 2179 pub fn clang_getArgType(type_: CXType, index: c_uint) -> CXType; 2180 pub fn clang_getArrayElementType(type_: CXType) -> CXType; 2181 pub fn clang_getArraySize(type_: CXType) -> c_longlong; 2182 /// Only available on `libclang` 17.0 and later. 2183 #[cfg(feature = "clang_17_0")] 2184 pub fn clang_getBinaryOperatorKindSpelling(kind: CXBinaryOperatorKind) -> CXString; 2185 pub fn clang_getCString(string: CXString) -> *const c_char; 2186 pub fn clang_getCXTUResourceUsage(tu: CXTranslationUnit) -> CXTUResourceUsage; 2187 pub fn clang_getCXXAccessSpecifier(cursor: CXCursor) -> CX_CXXAccessSpecifier; 2188 pub fn clang_getCanonicalCursor(cursor: CXCursor) -> CXCursor; 2189 pub fn clang_getCanonicalType(type_: CXType) -> CXType; 2190 pub fn clang_getChildDiagnostics(diagnostic: CXDiagnostic) -> CXDiagnosticSet; 2191 pub fn clang_getClangVersion() -> CXString; 2192 pub fn clang_getCompletionAnnotation(string: CXCompletionString, index: c_uint) -> CXString; 2193 pub fn clang_getCompletionAvailability(string: CXCompletionString) -> CXAvailabilityKind; 2194 pub fn clang_getCompletionBriefComment(string: CXCompletionString) -> CXString; 2195 pub fn clang_getCompletionChunkCompletionString(string: CXCompletionString, index: c_uint) -> CXCompletionString; 2196 pub fn clang_getCompletionChunkKind(string: CXCompletionString, index: c_uint) -> CXCompletionChunkKind; 2197 pub fn clang_getCompletionChunkText(string: CXCompletionString, index: c_uint) -> CXString; 2198 /// Only available on `libclang` 7.0 and later. 2199 #[cfg(feature = "clang_7_0")] 2200 pub fn clang_getCompletionFixIt(results: *mut CXCodeCompleteResults, completion_index: c_uint, fixit_index: c_uint, range: *mut CXSourceRange) -> CXString; 2201 pub fn clang_getCompletionNumAnnotations(string: CXCompletionString) -> c_uint; 2202 /// Only available on `libclang` 7.0 and later. 2203 #[cfg(feature = "clang_7_0")] 2204 pub fn clang_getCompletionNumFixIts(results: *mut CXCodeCompleteResults, completion_index: c_uint) -> c_uint; 2205 pub fn clang_getCompletionParent(string: CXCompletionString, kind: *mut CXCursorKind) -> CXString; 2206 pub fn clang_getCompletionPriority(string: CXCompletionString) -> c_uint; 2207 pub fn clang_getCursor(tu: CXTranslationUnit, location: CXSourceLocation) -> CXCursor; 2208 pub fn clang_getCursorAvailability(cursor: CXCursor) -> CXAvailabilityKind; 2209 /// Only available on `libclang` 17.0 and later. 2210 #[cfg(feature = "clang_17_0")] 2211 pub fn clang_getCursorBinaryOperatorKind(cursor: CXCursor) -> CXBinaryOperatorKind; 2212 pub fn clang_getCursorCompletionString(cursor: CXCursor) -> CXCompletionString; 2213 pub fn clang_getCursorDefinition(cursor: CXCursor) -> CXCursor; 2214 pub fn clang_getCursorDisplayName(cursor: CXCursor) -> CXString; 2215 /// Only available on `libclang` 5.0 and later. 2216 #[cfg(feature = "clang_5_0")] 2217 pub fn clang_getCursorExceptionSpecificationType(cursor: CXCursor) -> CXCursor_ExceptionSpecificationKind; 2218 pub fn clang_getCursorExtent(cursor: CXCursor) -> CXSourceRange; 2219 pub fn clang_getCursorKind(cursor: CXCursor) -> CXCursorKind; 2220 pub fn clang_getCursorKindSpelling(kind: CXCursorKind) -> CXString; 2221 pub fn clang_getCursorLanguage(cursor: CXCursor) -> CXLanguageKind; 2222 pub fn clang_getCursorLexicalParent(cursor: CXCursor) -> CXCursor; 2223 pub fn clang_getCursorLinkage(cursor: CXCursor) -> CXLinkageKind; 2224 pub fn clang_getCursorLocation(cursor: CXCursor) -> CXSourceLocation; 2225 pub fn clang_getCursorPlatformAvailability(cursor: CXCursor, deprecated: *mut c_int, deprecated_message: *mut CXString, unavailable: *mut c_int, unavailable_message: *mut CXString, availability: *mut CXPlatformAvailability, n_availability: c_int) -> c_int; 2226 /// Only available on `libclang` 7.0 and later. 2227 #[cfg(feature = "clang_7_0")] 2228 pub fn clang_getCursorPrettyPrinted(cursor: CXCursor, policy: CXPrintingPolicy) -> CXString; 2229 /// Only available on `libclang` 7.0 and later. 2230 #[cfg(feature = "clang_7_0")] 2231 pub fn clang_getCursorPrintingPolicy(cursor: CXCursor) -> CXPrintingPolicy; 2232 pub fn clang_getCursorReferenceNameRange(cursor: CXCursor, flags: CXNameRefFlags, index: c_uint) -> CXSourceRange; 2233 pub fn clang_getCursorReferenced(cursor: CXCursor) -> CXCursor; 2234 pub fn clang_getCursorResultType(cursor: CXCursor) -> CXType; 2235 pub fn clang_getCursorSemanticParent(cursor: CXCursor) -> CXCursor; 2236 pub fn clang_getCursorSpelling(cursor: CXCursor) -> CXString; 2237 /// Only available on `libclang` 6.0 and later. 2238 #[cfg(feature = "clang_6_0")] 2239 pub fn clang_getCursorTLSKind(cursor: CXCursor) -> CXTLSKind; 2240 pub fn clang_getCursorType(cursor: CXCursor) -> CXType; 2241 /// Only available on `libclang` 17.0 and later. 2242 #[cfg(feature = "clang_17_0")] 2243 pub fn clang_getCursorUnaryOperatorKind(cursor: CXCursor) -> CXUnaryOperatorKind; 2244 pub fn clang_getCursorUSR(cursor: CXCursor) -> CXString; 2245 /// Only available on `libclang` 3.8 and later. 2246 #[cfg(feature = "clang_3_8")] 2247 pub fn clang_getCursorVisibility(cursor: CXCursor) -> CXVisibilityKind; 2248 pub fn clang_getDeclObjCTypeEncoding(cursor: CXCursor) -> CXString; 2249 pub fn clang_getDefinitionSpellingAndExtent(cursor: CXCursor, start: *mut *const c_char, end: *mut *const c_char, start_line: *mut c_uint, start_column: *mut c_uint, end_line: *mut c_uint, end_column: *mut c_uint); 2250 pub fn clang_getDiagnostic(tu: CXTranslationUnit, index: c_uint) -> CXDiagnostic; 2251 pub fn clang_getDiagnosticCategory(diagnostic: CXDiagnostic) -> c_uint; 2252 pub fn clang_getDiagnosticCategoryName(category: c_uint) -> CXString; 2253 pub fn clang_getDiagnosticCategoryText(diagnostic: CXDiagnostic) -> CXString; 2254 pub fn clang_getDiagnosticFixIt(diagnostic: CXDiagnostic, index: c_uint, range: *mut CXSourceRange) -> CXString; 2255 pub fn clang_getDiagnosticInSet(diagnostic: CXDiagnosticSet, index: c_uint) -> CXDiagnostic; 2256 pub fn clang_getDiagnosticLocation(diagnostic: CXDiagnostic) -> CXSourceLocation; 2257 pub fn clang_getDiagnosticNumFixIts(diagnostic: CXDiagnostic) -> c_uint; 2258 pub fn clang_getDiagnosticNumRanges(diagnostic: CXDiagnostic) -> c_uint; 2259 pub fn clang_getDiagnosticOption(diagnostic: CXDiagnostic, option: *mut CXString) -> CXString; 2260 pub fn clang_getDiagnosticRange(diagnostic: CXDiagnostic, index: c_uint) -> CXSourceRange; 2261 pub fn clang_getDiagnosticSetFromTU(tu: CXTranslationUnit) -> CXDiagnosticSet; 2262 pub fn clang_getDiagnosticSeverity(diagnostic: CXDiagnostic) -> CXDiagnosticSeverity; 2263 pub fn clang_getDiagnosticSpelling(diagnostic: CXDiagnostic) -> CXString; 2264 pub fn clang_getElementType(type_: CXType) -> CXType; 2265 pub fn clang_getEnumConstantDeclUnsignedValue(cursor: CXCursor) -> c_ulonglong; 2266 pub fn clang_getEnumConstantDeclValue(cursor: CXCursor) -> c_longlong; 2267 pub fn clang_getEnumDeclIntegerType(cursor: CXCursor) -> CXType; 2268 /// Only available on `libclang` 5.0 and later. 2269 #[cfg(feature = "clang_5_0")] 2270 pub fn clang_getExceptionSpecificationType(type_: CXType) -> CXCursor_ExceptionSpecificationKind; 2271 pub fn clang_getExpansionLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 2272 pub fn clang_getFieldDeclBitWidth(cursor: CXCursor) -> c_int; 2273 pub fn clang_getFile(tu: CXTranslationUnit, file: *const c_char) -> CXFile; 2274 /// Only available on `libclang` 6.0 and later. 2275 #[cfg(feature = "clang_6_0")] 2276 pub fn clang_getFileContents(tu: CXTranslationUnit, file: CXFile, size: *mut size_t) -> *const c_char; 2277 pub fn clang_getFileLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 2278 pub fn clang_getFileName(file: CXFile) -> CXString; 2279 pub fn clang_getFileTime(file: CXFile) -> time_t; 2280 pub fn clang_getFileUniqueID(file: CXFile, id: *mut CXFileUniqueID) -> c_int; 2281 pub fn clang_getFunctionTypeCallingConv(type_: CXType) -> CXCallingConv; 2282 pub fn clang_getIBOutletCollectionType(cursor: CXCursor) -> CXType; 2283 pub fn clang_getIncludedFile(cursor: CXCursor) -> CXFile; 2284 pub fn clang_getInclusions(tu: CXTranslationUnit, visitor: CXInclusionVisitor, data: CXClientData); 2285 pub fn clang_getInstantiationLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 2286 pub fn clang_getLocation(tu: CXTranslationUnit, file: CXFile, line: c_uint, column: c_uint) -> CXSourceLocation; 2287 pub fn clang_getLocationForOffset(tu: CXTranslationUnit, file: CXFile, offset: c_uint) -> CXSourceLocation; 2288 pub fn clang_getModuleForFile(tu: CXTranslationUnit, file: CXFile) -> CXModule; 2289 /// Only available on `libclang` 16.0 and later. 2290 #[cfg(feature = "clang_16_0")] 2291 pub fn clang_getNonReferenceType(type_: CXType) -> CXType; 2292 pub fn clang_getNullCursor() -> CXCursor; 2293 pub fn clang_getNullLocation() -> CXSourceLocation; 2294 pub fn clang_getNullRange() -> CXSourceRange; 2295 pub fn clang_getNumArgTypes(type_: CXType) -> c_int; 2296 pub fn clang_getNumCompletionChunks(string: CXCompletionString) -> c_uint; 2297 pub fn clang_getNumDiagnostics(tu: CXTranslationUnit) -> c_uint; 2298 pub fn clang_getNumDiagnosticsInSet(diagnostic: CXDiagnosticSet) -> c_uint; 2299 pub fn clang_getNumElements(type_: CXType) -> c_longlong; 2300 pub fn clang_getNumOverloadedDecls(cursor: CXCursor) -> c_uint; 2301 pub fn clang_getOverloadedDecl(cursor: CXCursor, index: c_uint) -> CXCursor; 2302 pub fn clang_getOverriddenCursors(cursor: CXCursor, cursors: *mut *mut CXCursor, n_cursors: *mut c_uint); 2303 pub fn clang_getPointeeType(type_: CXType) -> CXType; 2304 pub fn clang_getPresumedLocation(location: CXSourceLocation, file: *mut CXString, line: *mut c_uint, column: *mut c_uint); 2305 pub fn clang_getRange(start: CXSourceLocation, end: CXSourceLocation) -> CXSourceRange; 2306 pub fn clang_getRangeEnd(range: CXSourceRange) -> CXSourceLocation; 2307 pub fn clang_getRangeStart(range: CXSourceRange) -> CXSourceLocation; 2308 pub fn clang_getRemappings(file: *const c_char) -> CXRemapping; 2309 pub fn clang_getRemappingsFromFileList(files: *mut *const c_char, n_files: c_uint) -> CXRemapping; 2310 pub fn clang_getResultType(type_: CXType) -> CXType; 2311 pub fn clang_getSkippedRanges(tu: CXTranslationUnit, file: CXFile) -> *mut CXSourceRangeList; 2312 pub fn clang_getSpecializedCursorTemplate(cursor: CXCursor) -> CXCursor; 2313 pub fn clang_getSpellingLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 2314 pub fn clang_getTUResourceUsageName(kind: CXTUResourceUsageKind) -> *const c_char; 2315 pub fn clang_getTemplateCursorKind(cursor: CXCursor) -> CXCursorKind; 2316 pub fn clang_getToken(tu: CXTranslationUnit, location: CXSourceLocation) -> *mut CXToken; 2317 pub fn clang_getTokenExtent(tu: CXTranslationUnit, token: CXToken) -> CXSourceRange; 2318 pub fn clang_getTokenKind(token: CXToken) -> CXTokenKind; 2319 pub fn clang_getTokenLocation(tu: CXTranslationUnit, token: CXToken) -> CXSourceLocation; 2320 pub fn clang_getTokenSpelling(tu: CXTranslationUnit, token: CXToken) -> CXString; 2321 pub fn clang_getTranslationUnitCursor(tu: CXTranslationUnit) -> CXCursor; 2322 pub fn clang_getTranslationUnitSpelling(tu: CXTranslationUnit) -> CXString; 2323 /// Only available on `libclang` 5.0 and later. 2324 #[cfg(feature = "clang_5_0")] 2325 pub fn clang_getTranslationUnitTargetInfo(tu: CXTranslationUnit) -> CXTargetInfo; 2326 /// Only available on `libclang` 17.0 and later. 2327 #[cfg(feature = "clang_17_0")] 2328 pub fn clang_getUnaryOperatorKindSpelling(kind: CXUnaryOperatorKind) -> CXString; 2329 /// Only available on `libclang` 16.0 and later. 2330 #[cfg(feature = "clang_16_0")] 2331 pub fn clang_getUnqualifiedType(type_: CXType) -> CXType; 2332 pub fn clang_getTypeDeclaration(type_: CXType) -> CXCursor; 2333 pub fn clang_getTypeKindSpelling(type_: CXTypeKind) -> CXString; 2334 pub fn clang_getTypeSpelling(type_: CXType) -> CXString; 2335 pub fn clang_getTypedefDeclUnderlyingType(cursor: CXCursor) -> CXType; 2336 /// Only available on `libclang` 5.0 and later. 2337 #[cfg(feature = "clang_5_0")] 2338 pub fn clang_getTypedefName(type_: CXType) -> CXString; 2339 pub fn clang_hashCursor(cursor: CXCursor) -> c_uint; 2340 pub fn clang_indexLoc_getCXSourceLocation(location: CXIdxLoc) -> CXSourceLocation; 2341 pub fn clang_indexLoc_getFileLocation(location: CXIdxLoc, index_file: *mut CXIdxClientFile, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 2342 pub fn clang_indexSourceFile(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode; 2343 /// Only available on `libclang` 3.8 and later. 2344 #[cfg(feature = "clang_3_8")] 2345 pub fn clang_indexSourceFileFullArgv(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, index_flags: CXIndexOptFlags, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, tu: *mut CXTranslationUnit, tu_flags: CXTranslationUnit_Flags) -> CXErrorCode; 2346 pub fn clang_indexTranslationUnit(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, flags: CXIndexOptFlags, tu: CXTranslationUnit) -> c_int; 2347 pub fn clang_index_getCXXClassDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxCXXClassDeclInfo; 2348 pub fn clang_index_getClientContainer(info: *const CXIdxContainerInfo) -> CXIdxClientContainer; 2349 pub fn clang_index_getClientEntity(info: *const CXIdxEntityInfo) -> CXIdxClientEntity; 2350 pub fn clang_index_getIBOutletCollectionAttrInfo(info: *const CXIdxAttrInfo) -> *const CXIdxIBOutletCollectionAttrInfo; 2351 pub fn clang_index_getObjCCategoryDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCCategoryDeclInfo; 2352 pub fn clang_index_getObjCContainerDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCContainerDeclInfo; 2353 pub fn clang_index_getObjCInterfaceDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCInterfaceDeclInfo; 2354 pub fn clang_index_getObjCPropertyDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCPropertyDeclInfo; 2355 pub fn clang_index_getObjCProtocolRefListInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCProtocolRefListInfo; 2356 pub fn clang_index_isEntityObjCContainerKind(info: CXIdxEntityKind) -> c_int; 2357 pub fn clang_index_setClientContainer(info: *const CXIdxContainerInfo, container: CXIdxClientContainer); 2358 pub fn clang_index_setClientEntity(info: *const CXIdxEntityInfo, entity: CXIdxClientEntity); 2359 pub fn clang_isAttribute(kind: CXCursorKind) -> c_uint; 2360 pub fn clang_isConstQualifiedType(type_: CXType) -> c_uint; 2361 pub fn clang_isCursorDefinition(cursor: CXCursor) -> c_uint; 2362 pub fn clang_isDeclaration(kind: CXCursorKind) -> c_uint; 2363 pub fn clang_isExpression(kind: CXCursorKind) -> c_uint; 2364 pub fn clang_isFileMultipleIncludeGuarded(tu: CXTranslationUnit, file: CXFile) -> c_uint; 2365 pub fn clang_isFunctionTypeVariadic(type_: CXType) -> c_uint; 2366 pub fn clang_isInvalid(kind: CXCursorKind) -> c_uint; 2367 /// Only available on `libclang` 7.0 and later. 2368 #[cfg(feature = "clang_7_0")] 2369 pub fn clang_isInvalidDeclaration(cursor: CXCursor) -> c_uint; 2370 pub fn clang_isPODType(type_: CXType) -> c_uint; 2371 pub fn clang_isPreprocessing(kind: CXCursorKind) -> c_uint; 2372 pub fn clang_isReference(kind: CXCursorKind) -> c_uint; 2373 pub fn clang_isRestrictQualifiedType(type_: CXType) -> c_uint; 2374 pub fn clang_isStatement(kind: CXCursorKind) -> c_uint; 2375 pub fn clang_isTranslationUnit(kind: CXCursorKind) -> c_uint; 2376 pub fn clang_isUnexposed(kind: CXCursorKind) -> c_uint; 2377 pub fn clang_isVirtualBase(cursor: CXCursor) -> c_uint; 2378 pub fn clang_isVolatileQualifiedType(type_: CXType) -> c_uint; 2379 pub fn clang_loadDiagnostics(file: *const c_char, error: *mut CXLoadDiag_Error, message: *mut CXString) -> CXDiagnosticSet; 2380 pub fn clang_parseTranslationUnit(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags) -> CXTranslationUnit; 2381 pub fn clang_parseTranslationUnit2(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags, tu: *mut CXTranslationUnit) -> CXErrorCode; 2382 /// Only available on `libclang` 3.8 and later. 2383 #[cfg(feature = "clang_3_8")] 2384 pub fn clang_parseTranslationUnit2FullArgv(index: CXIndex, file: *const c_char, arguments: *const *const c_char, n_arguments: c_int, unsaved: *mut CXUnsavedFile, n_unsaved: c_uint, flags: CXTranslationUnit_Flags, tu: *mut CXTranslationUnit) -> CXErrorCode; 2385 pub fn clang_remap_dispose(remapping: CXRemapping); 2386 pub fn clang_remap_getFilenames(remapping: CXRemapping, index: c_uint, original: *mut CXString, transformed: *mut CXString); 2387 pub fn clang_remap_getNumFiles(remapping: CXRemapping) -> c_uint; 2388 pub fn clang_reparseTranslationUnit(tu: CXTranslationUnit, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile, flags: CXReparse_Flags) -> CXErrorCode; 2389 pub fn clang_saveTranslationUnit(tu: CXTranslationUnit, file: *const c_char, options: CXSaveTranslationUnit_Flags) -> CXSaveError; 2390 pub fn clang_sortCodeCompletionResults(results: *mut CXCompletionResult, n_results: c_uint); 2391 /// Only available on `libclang` 5.0 and later. 2392 #[cfg(feature = "clang_5_0")] 2393 pub fn clang_suspendTranslationUnit(tu: CXTranslationUnit) -> c_uint; 2394 pub fn clang_toggleCrashRecovery(recovery: c_uint); 2395 pub fn clang_tokenize(tu: CXTranslationUnit, range: CXSourceRange, tokens: *mut *mut CXToken, n_tokens: *mut c_uint); 2396 pub fn clang_visitChildren(cursor: CXCursor, visitor: CXCursorVisitor, data: CXClientData) -> c_uint; 2397 2398 // Documentation 2399 pub fn clang_BlockCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString; 2400 pub fn clang_BlockCommandComment_getCommandName(comment: CXComment) -> CXString; 2401 pub fn clang_BlockCommandComment_getNumArgs(comment: CXComment) -> c_uint; 2402 pub fn clang_BlockCommandComment_getParagraph(comment: CXComment) -> CXComment; 2403 pub fn clang_Comment_getChild(comment: CXComment, index: c_uint) -> CXComment; 2404 pub fn clang_Comment_getKind(comment: CXComment) -> CXCommentKind; 2405 pub fn clang_Comment_getNumChildren(comment: CXComment) -> c_uint; 2406 pub fn clang_Comment_isWhitespace(comment: CXComment) -> c_uint; 2407 pub fn clang_Cursor_getParsedComment(C: CXCursor) -> CXComment; 2408 pub fn clang_FullComment_getAsHTML(comment: CXComment) -> CXString; 2409 pub fn clang_FullComment_getAsXML(comment: CXComment) -> CXString; 2410 pub fn clang_HTMLStartTag_getAttrName(comment: CXComment, index: c_uint) -> CXString; 2411 pub fn clang_HTMLStartTag_getAttrValue(comment: CXComment, index: c_uint) -> CXString; 2412 pub fn clang_HTMLStartTag_getNumAttrs(comment: CXComment) -> c_uint; 2413 pub fn clang_HTMLStartTagComment_isSelfClosing(comment: CXComment) -> c_uint; 2414 pub fn clang_HTMLTagComment_getAsString(comment: CXComment) -> CXString; 2415 pub fn clang_HTMLTagComment_getTagName(comment: CXComment) -> CXString; 2416 pub fn clang_InlineCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString; 2417 pub fn clang_InlineCommandComment_getCommandName(comment: CXComment) -> CXString; 2418 pub fn clang_InlineCommandComment_getNumArgs(comment: CXComment) -> c_uint; 2419 pub fn clang_InlineCommandComment_getRenderKind(comment: CXComment) -> CXCommentInlineCommandRenderKind; 2420 pub fn clang_InlineContentComment_hasTrailingNewline(comment: CXComment) -> c_uint; 2421 pub fn clang_ParamCommandComment_getDirection(comment: CXComment) -> CXCommentParamPassDirection; 2422 pub fn clang_ParamCommandComment_getParamIndex(comment: CXComment) -> c_uint; 2423 pub fn clang_ParamCommandComment_getParamName(comment: CXComment) -> CXString; 2424 pub fn clang_ParamCommandComment_isDirectionExplicit(comment: CXComment) -> c_uint; 2425 pub fn clang_ParamCommandComment_isParamIndexValid(comment: CXComment) -> c_uint; 2426 pub fn clang_TextComment_getText(comment: CXComment) -> CXString; 2427 pub fn clang_TParamCommandComment_getDepth(comment: CXComment) -> c_uint; 2428 pub fn clang_TParamCommandComment_getIndex(comment: CXComment, depth: c_uint) -> c_uint; 2429 pub fn clang_TParamCommandComment_getParamName(comment: CXComment) -> CXString; 2430 pub fn clang_TParamCommandComment_isParamPositionValid(comment: CXComment) -> c_uint; 2431 pub fn clang_VerbatimBlockLineComment_getText(comment: CXComment) -> CXString; 2432 pub fn clang_VerbatimLineComment_getText(comment: CXComment) -> CXString; 2433 } 2434