1 // Copyright 2016 Kyle Mayes 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 //! Rust bindings for `libclang`. 16 //! 17 //! ## Supported Versions 18 //! 19 //! * 3.5 - [Documentation](https://kylemayes.github.io/clang-sys/3_5/clang_sys) 20 //! * 3.6 - [Documentation](https://kylemayes.github.io/clang-sys/3_6/clang_sys) 21 //! * 3.7 - [Documentation](https://kylemayes.github.io/clang-sys/3_7/clang_sys) 22 //! * 3.8 - [Documentation](https://kylemayes.github.io/clang-sys/3_8/clang_sys) 23 //! * 3.9 - [Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys) 24 //! * 4.0 - [Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys) 25 //! * 5.0 - [Documentation](https://kylemayes.github.io/clang-sys/5_0/clang_sys) 26 //! * 6.0 - [Documentation](https://kylemayes.github.io/clang-sys/6_0/clang_sys) 27 28 #![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] 29 30 #![cfg_attr(feature="cargo-clippy", allow(unreadable_literal))] 31 32 extern crate glob; 33 extern crate libc; 34 #[cfg(feature="runtime")] 35 extern crate libloading; 36 37 pub mod support; 38 39 #[macro_use] 40 mod link; 41 42 use std::mem; 43 44 use libc::{c_char, c_int, c_longlong, c_uint, c_ulong, c_ulonglong, c_void, time_t}; 45 #[cfg(feature="gte_clang_6_0")] 46 use libc::{size_t}; 47 48 pub type CXClientData = *mut c_void; 49 pub type CXCursorVisitor = extern fn(CXCursor, CXCursor, CXClientData) -> CXChildVisitResult; 50 #[cfg(feature="gte_clang_3_7")] 51 pub type CXFieldVisitor = extern fn(CXCursor, CXClientData) -> CXVisitorResult; 52 pub type CXInclusionVisitor = extern fn(CXFile, *mut CXSourceLocation, c_uint, CXClientData); 53 54 //================================================ 55 // Macros 56 //================================================ 57 58 // cenum! ________________________________________ 59 60 /// Defines a C enum as a series of constants. 61 macro_rules! cenum { 62 ($(#[$meta:meta])* enum $name:ident { 63 $($(#[$vmeta:meta])* const $variant:ident = $value:expr), +, 64 }) => ( 65 pub type $name = c_int; 66 67 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 68 ); 69 ($(#[$meta:meta])* enum $name:ident { 70 $($(#[$vmeta:meta])* const $variant:ident = $value:expr); +; 71 }) => ( 72 pub type $name = c_int; 73 74 $($(#[$vmeta])* pub const $variant: $name = $value;)+ 75 ); 76 } 77 78 // default! ______________________________________ 79 80 /// Implements a zeroing implementation of `Default` for the supplied type. 81 macro_rules! default { 82 (#[$meta:meta] $ty:ty) => { 83 #[$meta] 84 impl Default for $ty { 85 fn default() -> $ty { 86 unsafe { mem::zeroed() } 87 } 88 } 89 }; 90 91 ($ty:ty) => { 92 impl Default for $ty { 93 fn default() -> $ty { 94 unsafe { mem::zeroed() } 95 } 96 } 97 }; 98 } 99 100 //================================================ 101 // Enums 102 //================================================ 103 104 cenum! { 105 enum CXAvailabilityKind { 106 const CXAvailability_Available = 0, 107 const CXAvailability_Deprecated = 1, 108 const CXAvailability_NotAvailable = 2, 109 const CXAvailability_NotAccessible = 3, 110 } 111 } 112 113 cenum! { 114 enum CXCallingConv { 115 const CXCallingConv_Default = 0, 116 const CXCallingConv_C = 1, 117 const CXCallingConv_X86StdCall = 2, 118 const CXCallingConv_X86FastCall = 3, 119 const CXCallingConv_X86ThisCall = 4, 120 const CXCallingConv_X86Pascal = 5, 121 const CXCallingConv_AAPCS = 6, 122 const CXCallingConv_AAPCS_VFP = 7, 123 /// Only produced by `libclang` 4.0 and later. 124 const CXCallingConv_X86RegCall = 8, 125 const CXCallingConv_IntelOclBicc = 9, 126 const CXCallingConv_Win64 = 10, 127 const CXCallingConv_X86_64Win64 = 10, 128 const CXCallingConv_X86_64SysV = 11, 129 /// Only produced by `libclang` 3.6 and later. 130 const CXCallingConv_X86VectorCall = 12, 131 /// Only produced by `libclang` 3.9 and later. 132 const CXCallingConv_Swift = 13, 133 /// Only produced by `libclang` 3.9 and later. 134 const CXCallingConv_PreserveMost = 14, 135 /// Only produced by `libclang` 3.9 and later. 136 const CXCallingConv_PreserveAll = 15, 137 const CXCallingConv_Invalid = 100, 138 const CXCallingConv_Unexposed = 200, 139 } 140 } 141 142 cenum! { 143 enum CXChildVisitResult { 144 const CXChildVisit_Break = 0, 145 const CXChildVisit_Continue = 1, 146 const CXChildVisit_Recurse = 2, 147 } 148 } 149 150 cenum! { 151 enum CXCommentInlineCommandRenderKind { 152 const CXCommentInlineCommandRenderKind_Normal = 0, 153 const CXCommentInlineCommandRenderKind_Bold = 1, 154 const CXCommentInlineCommandRenderKind_Monospaced = 2, 155 const CXCommentInlineCommandRenderKind_Emphasized = 3, 156 } 157 } 158 159 cenum! { 160 enum CXCommentKind { 161 const CXComment_Null = 0, 162 const CXComment_Text = 1, 163 const CXComment_InlineCommand = 2, 164 const CXComment_HTMLStartTag = 3, 165 const CXComment_HTMLEndTag = 4, 166 const CXComment_Paragraph = 5, 167 const CXComment_BlockCommand = 6, 168 const CXComment_ParamCommand = 7, 169 const CXComment_TParamCommand = 8, 170 const CXComment_VerbatimBlockCommand = 9, 171 const CXComment_VerbatimBlockLine = 10, 172 const CXComment_VerbatimLine = 11, 173 const CXComment_FullComment = 12, 174 } 175 } 176 177 cenum! { 178 enum CXCommentParamPassDirection { 179 const CXCommentParamPassDirection_In = 0, 180 const CXCommentParamPassDirection_Out = 1, 181 const CXCommentParamPassDirection_InOut = 2, 182 } 183 } 184 185 cenum! { 186 enum CXCompilationDatabase_Error { 187 const CXCompilationDatabase_NoError = 0, 188 const CXCompilationDatabase_CanNotLoadDatabase = 1, 189 } 190 } 191 192 cenum! { 193 enum CXCompletionChunkKind { 194 const CXCompletionChunk_Optional = 0, 195 const CXCompletionChunk_TypedText = 1, 196 const CXCompletionChunk_Text = 2, 197 const CXCompletionChunk_Placeholder = 3, 198 const CXCompletionChunk_Informative = 4, 199 const CXCompletionChunk_CurrentParameter = 5, 200 const CXCompletionChunk_LeftParen = 6, 201 const CXCompletionChunk_RightParen = 7, 202 const CXCompletionChunk_LeftBracket = 8, 203 const CXCompletionChunk_RightBracket = 9, 204 const CXCompletionChunk_LeftBrace = 10, 205 const CXCompletionChunk_RightBrace = 11, 206 const CXCompletionChunk_LeftAngle = 12, 207 const CXCompletionChunk_RightAngle = 13, 208 const CXCompletionChunk_Comma = 14, 209 const CXCompletionChunk_ResultType = 15, 210 const CXCompletionChunk_Colon = 16, 211 const CXCompletionChunk_SemiColon = 17, 212 const CXCompletionChunk_Equal = 18, 213 const CXCompletionChunk_HorizontalSpace = 19, 214 const CXCompletionChunk_VerticalSpace = 20, 215 } 216 } 217 218 cenum! { 219 enum CXCursorKind { 220 const CXCursor_UnexposedDecl = 1, 221 const CXCursor_StructDecl = 2, 222 const CXCursor_UnionDecl = 3, 223 const CXCursor_ClassDecl = 4, 224 const CXCursor_EnumDecl = 5, 225 const CXCursor_FieldDecl = 6, 226 const CXCursor_EnumConstantDecl = 7, 227 const CXCursor_FunctionDecl = 8, 228 const CXCursor_VarDecl = 9, 229 const CXCursor_ParmDecl = 10, 230 const CXCursor_ObjCInterfaceDecl = 11, 231 const CXCursor_ObjCCategoryDecl = 12, 232 const CXCursor_ObjCProtocolDecl = 13, 233 const CXCursor_ObjCPropertyDecl = 14, 234 const CXCursor_ObjCIvarDecl = 15, 235 const CXCursor_ObjCInstanceMethodDecl = 16, 236 const CXCursor_ObjCClassMethodDecl = 17, 237 const CXCursor_ObjCImplementationDecl = 18, 238 const CXCursor_ObjCCategoryImplDecl = 19, 239 const CXCursor_TypedefDecl = 20, 240 const CXCursor_CXXMethod = 21, 241 const CXCursor_Namespace = 22, 242 const CXCursor_LinkageSpec = 23, 243 const CXCursor_Constructor = 24, 244 const CXCursor_Destructor = 25, 245 const CXCursor_ConversionFunction = 26, 246 const CXCursor_TemplateTypeParameter = 27, 247 const CXCursor_NonTypeTemplateParameter = 28, 248 const CXCursor_TemplateTemplateParameter = 29, 249 const CXCursor_FunctionTemplate = 30, 250 const CXCursor_ClassTemplate = 31, 251 const CXCursor_ClassTemplatePartialSpecialization = 32, 252 const CXCursor_NamespaceAlias = 33, 253 const CXCursor_UsingDirective = 34, 254 const CXCursor_UsingDeclaration = 35, 255 const CXCursor_TypeAliasDecl = 36, 256 const CXCursor_ObjCSynthesizeDecl = 37, 257 const CXCursor_ObjCDynamicDecl = 38, 258 const CXCursor_CXXAccessSpecifier = 39, 259 const CXCursor_ObjCSuperClassRef = 40, 260 const CXCursor_ObjCProtocolRef = 41, 261 const CXCursor_ObjCClassRef = 42, 262 const CXCursor_TypeRef = 43, 263 const CXCursor_CXXBaseSpecifier = 44, 264 const CXCursor_TemplateRef = 45, 265 const CXCursor_NamespaceRef = 46, 266 const CXCursor_MemberRef = 47, 267 const CXCursor_LabelRef = 48, 268 const CXCursor_OverloadedDeclRef = 49, 269 const CXCursor_VariableRef = 50, 270 const CXCursor_InvalidFile = 70, 271 const CXCursor_NoDeclFound = 71, 272 const CXCursor_NotImplemented = 72, 273 const CXCursor_InvalidCode = 73, 274 const CXCursor_UnexposedExpr = 100, 275 const CXCursor_DeclRefExpr = 101, 276 const CXCursor_MemberRefExpr = 102, 277 const CXCursor_CallExpr = 103, 278 const CXCursor_ObjCMessageExpr = 104, 279 const CXCursor_BlockExpr = 105, 280 const CXCursor_IntegerLiteral = 106, 281 const CXCursor_FloatingLiteral = 107, 282 const CXCursor_ImaginaryLiteral = 108, 283 const CXCursor_StringLiteral = 109, 284 const CXCursor_CharacterLiteral = 110, 285 const CXCursor_ParenExpr = 111, 286 const CXCursor_UnaryOperator = 112, 287 const CXCursor_ArraySubscriptExpr = 113, 288 const CXCursor_BinaryOperator = 114, 289 const CXCursor_CompoundAssignOperator = 115, 290 const CXCursor_ConditionalOperator = 116, 291 const CXCursor_CStyleCastExpr = 117, 292 const CXCursor_CompoundLiteralExpr = 118, 293 const CXCursor_InitListExpr = 119, 294 const CXCursor_AddrLabelExpr = 120, 295 const CXCursor_StmtExpr = 121, 296 const CXCursor_GenericSelectionExpr = 122, 297 const CXCursor_GNUNullExpr = 123, 298 const CXCursor_CXXStaticCastExpr = 124, 299 const CXCursor_CXXDynamicCastExpr = 125, 300 const CXCursor_CXXReinterpretCastExpr = 126, 301 const CXCursor_CXXConstCastExpr = 127, 302 const CXCursor_CXXFunctionalCastExpr = 128, 303 const CXCursor_CXXTypeidExpr = 129, 304 const CXCursor_CXXBoolLiteralExpr = 130, 305 const CXCursor_CXXNullPtrLiteralExpr = 131, 306 const CXCursor_CXXThisExpr = 132, 307 const CXCursor_CXXThrowExpr = 133, 308 const CXCursor_CXXNewExpr = 134, 309 const CXCursor_CXXDeleteExpr = 135, 310 const CXCursor_UnaryExpr = 136, 311 const CXCursor_ObjCStringLiteral = 137, 312 const CXCursor_ObjCEncodeExpr = 138, 313 const CXCursor_ObjCSelectorExpr = 139, 314 const CXCursor_ObjCProtocolExpr = 140, 315 const CXCursor_ObjCBridgedCastExpr = 141, 316 const CXCursor_PackExpansionExpr = 142, 317 const CXCursor_SizeOfPackExpr = 143, 318 const CXCursor_LambdaExpr = 144, 319 const CXCursor_ObjCBoolLiteralExpr = 145, 320 const CXCursor_ObjCSelfExpr = 146, 321 /// Only produced by `libclang` 3.8 and later. 322 const CXCursor_OMPArraySectionExpr = 147, 323 /// Only produced by `libclang` 3.9 and later. 324 const CXCursor_ObjCAvailabilityCheckExpr = 148, 325 const CXCursor_UnexposedStmt = 200, 326 const CXCursor_LabelStmt = 201, 327 const CXCursor_CompoundStmt = 202, 328 const CXCursor_CaseStmt = 203, 329 const CXCursor_DefaultStmt = 204, 330 const CXCursor_IfStmt = 205, 331 const CXCursor_SwitchStmt = 206, 332 const CXCursor_WhileStmt = 207, 333 const CXCursor_DoStmt = 208, 334 const CXCursor_ForStmt = 209, 335 const CXCursor_GotoStmt = 210, 336 const CXCursor_IndirectGotoStmt = 211, 337 const CXCursor_ContinueStmt = 212, 338 const CXCursor_BreakStmt = 213, 339 const CXCursor_ReturnStmt = 214, 340 /// Duplicate of `CXCursor_GccAsmStmt`. 341 const CXCursor_AsmStmt = 215, 342 const CXCursor_ObjCAtTryStmt = 216, 343 const CXCursor_ObjCAtCatchStmt = 217, 344 const CXCursor_ObjCAtFinallyStmt = 218, 345 const CXCursor_ObjCAtThrowStmt = 219, 346 const CXCursor_ObjCAtSynchronizedStmt = 220, 347 const CXCursor_ObjCAutoreleasePoolStmt = 221, 348 const CXCursor_ObjCForCollectionStmt = 222, 349 const CXCursor_CXXCatchStmt = 223, 350 const CXCursor_CXXTryStmt = 224, 351 const CXCursor_CXXForRangeStmt = 225, 352 const CXCursor_SEHTryStmt = 226, 353 const CXCursor_SEHExceptStmt = 227, 354 const CXCursor_SEHFinallyStmt = 228, 355 const CXCursor_MSAsmStmt = 229, 356 const CXCursor_NullStmt = 230, 357 const CXCursor_DeclStmt = 231, 358 const CXCursor_OMPParallelDirective = 232, 359 const CXCursor_OMPSimdDirective = 233, 360 const CXCursor_OMPForDirective = 234, 361 const CXCursor_OMPSectionsDirective = 235, 362 const CXCursor_OMPSectionDirective = 236, 363 const CXCursor_OMPSingleDirective = 237, 364 const CXCursor_OMPParallelForDirective = 238, 365 const CXCursor_OMPParallelSectionsDirective = 239, 366 const CXCursor_OMPTaskDirective = 240, 367 const CXCursor_OMPMasterDirective = 241, 368 const CXCursor_OMPCriticalDirective = 242, 369 const CXCursor_OMPTaskyieldDirective = 243, 370 const CXCursor_OMPBarrierDirective = 244, 371 const CXCursor_OMPTaskwaitDirective = 245, 372 const CXCursor_OMPFlushDirective = 246, 373 const CXCursor_SEHLeaveStmt = 247, 374 /// Only produced by `libclang` 3.6 and later. 375 const CXCursor_OMPOrderedDirective = 248, 376 /// Only produced by `libclang` 3.6 and later. 377 const CXCursor_OMPAtomicDirective = 249, 378 /// Only produced by `libclang` 3.6 and later. 379 const CXCursor_OMPForSimdDirective = 250, 380 /// Only produced by `libclang` 3.6 and later. 381 const CXCursor_OMPParallelForSimdDirective = 251, 382 /// Only produced by `libclang` 3.6 and later. 383 const CXCursor_OMPTargetDirective = 252, 384 /// Only produced by `libclang` 3.6 and later. 385 const CXCursor_OMPTeamsDirective = 253, 386 /// Only produced by `libclang` 3.7 and later. 387 const CXCursor_OMPTaskgroupDirective = 254, 388 /// Only produced by `libclang` 3.7 and later. 389 const CXCursor_OMPCancellationPointDirective = 255, 390 /// Only produced by `libclang` 3.7 and later. 391 const CXCursor_OMPCancelDirective = 256, 392 /// Only produced by `libclang` 3.8 and later. 393 const CXCursor_OMPTargetDataDirective = 257, 394 /// Only produced by `libclang` 3.8 and later. 395 const CXCursor_OMPTaskLoopDirective = 258, 396 /// Only produced by `libclang` 3.8 and later. 397 const CXCursor_OMPTaskLoopSimdDirective = 259, 398 /// Only produced by `libclang` 3.8 and later. 399 const CXCursor_OMPDistributeDirective = 260, 400 /// Only produced by `libclang` 3.9 and later. 401 const CXCursor_OMPTargetEnterDataDirective = 261, 402 /// Only produced by `libclang` 3.9 and later. 403 const CXCursor_OMPTargetExitDataDirective = 262, 404 /// Only produced by `libclang` 3.9 and later. 405 const CXCursor_OMPTargetParallelDirective = 263, 406 /// Only produced by `libclang` 3.9 and later. 407 const CXCursor_OMPTargetParallelForDirective = 264, 408 /// Only produced by `libclang` 3.9 and later. 409 const CXCursor_OMPTargetUpdateDirective = 265, 410 /// Only produced by `libclang` 3.9 and later. 411 const CXCursor_OMPDistributeParallelForDirective = 266, 412 /// Only produced by `libclang` 3.9 and later. 413 const CXCursor_OMPDistributeParallelForSimdDirective = 267, 414 /// Only produced by `libclang` 3.9 and later. 415 const CXCursor_OMPDistributeSimdDirective = 268, 416 /// Only produced by `libclang` 3.9 and later. 417 const CXCursor_OMPTargetParallelForSimdDirective = 269, 418 /// Only produced by `libclang` 4.0 and later. 419 const CXCursor_OMPTargetSimdDirective = 270, 420 /// Only produced by `libclang` 4.0 and later. 421 const CXCursor_OMPTeamsDistributeDirective = 271, 422 /// Only produced by `libclang` 4.0 and later. 423 const CXCursor_OMPTeamsDistributeSimdDirective = 272, 424 /// Only produced by `libclang` 4.0 and later. 425 const CXCursor_OMPTeamsDistributeParallelForSimdDirective = 273, 426 /// Only produced by `libclang` 4.0 and later. 427 const CXCursor_OMPTeamsDistributeParallelForDirective = 274, 428 /// Only produced by `libclang` 4.0 and later. 429 const CXCursor_OMPTargetTeamsDirective = 275, 430 /// Only produced by `libclang` 4.0 and later. 431 const CXCursor_OMPTargetTeamsDistributeDirective = 276, 432 /// Only produced by `libclang` 4.0 and later. 433 const CXCursor_OMPTargetTeamsDistributeParallelForDirective = 277, 434 /// Only produced by `libclang` 4.0 and later. 435 const CXCursor_OMPTargetTeamsDistributeParallelForSimdDirective = 278, 436 /// Only producer by `libclang` 4.0 and later. 437 const CXCursor_OMPTargetTeamsDistributeSimdDirective = 279, 438 const CXCursor_TranslationUnit = 300, 439 const CXCursor_UnexposedAttr = 400, 440 const CXCursor_IBActionAttr = 401, 441 const CXCursor_IBOutletAttr = 402, 442 const CXCursor_IBOutletCollectionAttr = 403, 443 const CXCursor_CXXFinalAttr = 404, 444 const CXCursor_CXXOverrideAttr = 405, 445 const CXCursor_AnnotateAttr = 406, 446 const CXCursor_AsmLabelAttr = 407, 447 const CXCursor_PackedAttr = 408, 448 const CXCursor_PureAttr = 409, 449 const CXCursor_ConstAttr = 410, 450 const CXCursor_NoDuplicateAttr = 411, 451 const CXCursor_CUDAConstantAttr = 412, 452 const CXCursor_CUDADeviceAttr = 413, 453 const CXCursor_CUDAGlobalAttr = 414, 454 const CXCursor_CUDAHostAttr = 415, 455 /// Only produced by `libclang` 3.6 and later. 456 const CXCursor_CUDASharedAttr = 416, 457 /// Only produced by `libclang` 3.8 and later. 458 const CXCursor_VisibilityAttr = 417, 459 /// Only produced by `libclang` 3.8 and later. 460 const CXCursor_DLLExport = 418, 461 /// Only produced by `libclang` 3.8 and later. 462 const CXCursor_DLLImport = 419, 463 const CXCursor_PreprocessingDirective = 500, 464 const CXCursor_MacroDefinition = 501, 465 /// Duplicate of `CXCursor_MacroInstantiation`. 466 const CXCursor_MacroExpansion = 502, 467 const CXCursor_InclusionDirective = 503, 468 const CXCursor_ModuleImportDecl = 600, 469 /// Only produced by `libclang` 3.8 and later. 470 const CXCursor_TypeAliasTemplateDecl = 601, 471 /// Only produced by `libclang` 3.9 and later. 472 const CXCursor_StaticAssert = 602, 473 /// Only produced by `libclang` 4.0 and later. 474 const CXCursor_FriendDecl = 603, 475 /// Only produced by `libclang` 3.7 and later. 476 const CXCursor_OverloadCandidate = 700, 477 } 478 } 479 480 cenum! { 481 #[cfg(feature="gte_clang_5_0")] 482 enum CXCursor_ExceptionSpecificationKind { 483 const CXCursor_ExceptionSpecificationKind_None = 0, 484 const CXCursor_ExceptionSpecificationKind_DynamicNone = 1, 485 const CXCursor_ExceptionSpecificationKind_Dynamic = 2, 486 const CXCursor_ExceptionSpecificationKind_MSAny = 3, 487 const CXCursor_ExceptionSpecificationKind_BasicNoexcept = 4, 488 const CXCursor_ExceptionSpecificationKind_ComputedNoexcept = 5, 489 const CXCursor_ExceptionSpecificationKind_Unevaluated = 6, 490 const CXCursor_ExceptionSpecificationKind_Uninstantiated = 7, 491 const CXCursor_ExceptionSpecificationKind_Unparsed = 8, 492 } 493 } 494 495 cenum! { 496 enum CXDiagnosticSeverity { 497 const CXDiagnostic_Ignored = 0, 498 const CXDiagnostic_Note = 1, 499 const CXDiagnostic_Warning = 2, 500 const CXDiagnostic_Error = 3, 501 const CXDiagnostic_Fatal = 4, 502 } 503 } 504 505 cenum! { 506 enum CXErrorCode { 507 const CXError_Success = 0, 508 const CXError_Failure = 1, 509 const CXError_Crashed = 2, 510 const CXError_InvalidArguments = 3, 511 const CXError_ASTReadError = 4, 512 } 513 } 514 515 cenum! { 516 enum CXEvalResultKind { 517 const CXEval_UnExposed = 0, 518 const CXEval_Int = 1 , 519 const CXEval_Float = 2, 520 const CXEval_ObjCStrLiteral = 3, 521 const CXEval_StrLiteral = 4, 522 const CXEval_CFStr = 5, 523 const CXEval_Other = 6, 524 } 525 } 526 527 cenum! { 528 enum CXIdxAttrKind { 529 const CXIdxAttr_Unexposed = 0, 530 const CXIdxAttr_IBAction = 1, 531 const CXIdxAttr_IBOutlet = 2, 532 const CXIdxAttr_IBOutletCollection = 3, 533 } 534 } 535 536 cenum! { 537 enum CXIdxEntityCXXTemplateKind { 538 const CXIdxEntity_NonTemplate = 0, 539 const CXIdxEntity_Template = 1, 540 const CXIdxEntity_TemplatePartialSpecialization = 2, 541 const CXIdxEntity_TemplateSpecialization = 3, 542 } 543 } 544 545 cenum! { 546 enum CXIdxEntityKind { 547 const CXIdxEntity_Unexposed = 0, 548 const CXIdxEntity_Typedef = 1, 549 const CXIdxEntity_Function = 2, 550 const CXIdxEntity_Variable = 3, 551 const CXIdxEntity_Field = 4, 552 const CXIdxEntity_EnumConstant = 5, 553 const CXIdxEntity_ObjCClass = 6, 554 const CXIdxEntity_ObjCProtocol = 7, 555 const CXIdxEntity_ObjCCategory = 8, 556 const CXIdxEntity_ObjCInstanceMethod = 9, 557 const CXIdxEntity_ObjCClassMethod = 10, 558 const CXIdxEntity_ObjCProperty = 11, 559 const CXIdxEntity_ObjCIvar = 12, 560 const CXIdxEntity_Enum = 13, 561 const CXIdxEntity_Struct = 14, 562 const CXIdxEntity_Union = 15, 563 const CXIdxEntity_CXXClass = 16, 564 const CXIdxEntity_CXXNamespace = 17, 565 const CXIdxEntity_CXXNamespaceAlias = 18, 566 const CXIdxEntity_CXXStaticVariable = 19, 567 const CXIdxEntity_CXXStaticMethod = 20, 568 const CXIdxEntity_CXXInstanceMethod = 21, 569 const CXIdxEntity_CXXConstructor = 22, 570 const CXIdxEntity_CXXDestructor = 23, 571 const CXIdxEntity_CXXConversionFunction = 24, 572 const CXIdxEntity_CXXTypeAlias = 25, 573 const CXIdxEntity_CXXInterface = 26, 574 } 575 } 576 577 cenum! { 578 enum CXIdxEntityLanguage { 579 const CXIdxEntityLang_None = 0, 580 const CXIdxEntityLang_C = 1, 581 const CXIdxEntityLang_ObjC = 2, 582 const CXIdxEntityLang_CXX = 3, 583 /// Only produced by `libclang` 5.0 and later. 584 const CXIdxEntityLang_Swift = 4, 585 } 586 } 587 588 cenum! { 589 enum CXIdxEntityRefKind { 590 const CXIdxEntityRef_Direct = 1, 591 const CXIdxEntityRef_Implicit = 2, 592 } 593 } 594 595 cenum! { 596 enum CXIdxObjCContainerKind { 597 const CXIdxObjCContainer_ForwardRef = 0, 598 const CXIdxObjCContainer_Interface = 1, 599 const CXIdxObjCContainer_Implementation = 2, 600 } 601 } 602 603 cenum! { 604 enum CXLanguageKind { 605 const CXLanguage_Invalid = 0, 606 const CXLanguage_C = 1, 607 const CXLanguage_ObjC = 2, 608 const CXLanguage_CPlusPlus = 3, 609 } 610 } 611 612 cenum! { 613 enum CXLinkageKind { 614 const CXLinkage_Invalid = 0, 615 const CXLinkage_NoLinkage = 1, 616 const CXLinkage_Internal = 2, 617 const CXLinkage_UniqueExternal = 3, 618 const CXLinkage_External = 4, 619 } 620 } 621 622 cenum! { 623 enum CXLoadDiag_Error { 624 const CXLoadDiag_None = 0, 625 const CXLoadDiag_Unknown = 1, 626 const CXLoadDiag_CannotLoad = 2, 627 const CXLoadDiag_InvalidFile = 3, 628 } 629 } 630 631 cenum! { 632 enum CXRefQualifierKind { 633 const CXRefQualifier_None = 0, 634 const CXRefQualifier_LValue = 1, 635 const CXRefQualifier_RValue = 2, 636 } 637 } 638 639 cenum! { 640 enum CXResult { 641 const CXResult_Success = 0, 642 const CXResult_Invalid = 1, 643 const CXResult_VisitBreak = 2, 644 } 645 } 646 647 cenum! { 648 enum CXSaveError { 649 const CXSaveError_None = 0, 650 const CXSaveError_Unknown = 1, 651 const CXSaveError_TranslationErrors = 2, 652 const CXSaveError_InvalidTU = 3, 653 } 654 } 655 656 cenum! { 657 #[cfg(feature="gte_clang_6_0")] 658 enum CXTLSKind { 659 const CXTLS_None = 0, 660 const CXTLS_Dynamic = 1, 661 const CXTLS_Static = 2, 662 } 663 } 664 665 cenum! { 666 enum CXTUResourceUsageKind { 667 const CXTUResourceUsage_AST = 1, 668 const CXTUResourceUsage_Identifiers = 2, 669 const CXTUResourceUsage_Selectors = 3, 670 const CXTUResourceUsage_GlobalCompletionResults = 4, 671 const CXTUResourceUsage_SourceManagerContentCache = 5, 672 const CXTUResourceUsage_AST_SideTables = 6, 673 const CXTUResourceUsage_SourceManager_Membuffer_Malloc = 7, 674 const CXTUResourceUsage_SourceManager_Membuffer_MMap = 8, 675 const CXTUResourceUsage_ExternalASTSource_Membuffer_Malloc = 9, 676 const CXTUResourceUsage_ExternalASTSource_Membuffer_MMap = 10, 677 const CXTUResourceUsage_Preprocessor = 11, 678 const CXTUResourceUsage_PreprocessingRecord = 12, 679 const CXTUResourceUsage_SourceManager_DataStructures = 13, 680 const CXTUResourceUsage_Preprocessor_HeaderSearch = 14, 681 } 682 } 683 684 cenum! { 685 #[cfg(feature="gte_clang_3_6")] 686 enum CXTemplateArgumentKind { 687 const CXTemplateArgumentKind_Null = 0, 688 const CXTemplateArgumentKind_Type = 1, 689 const CXTemplateArgumentKind_Declaration = 2, 690 const CXTemplateArgumentKind_NullPtr = 3, 691 const CXTemplateArgumentKind_Integral = 4, 692 const CXTemplateArgumentKind_Template = 5, 693 const CXTemplateArgumentKind_TemplateExpansion = 6, 694 const CXTemplateArgumentKind_Expression = 7, 695 const CXTemplateArgumentKind_Pack = 8, 696 const CXTemplateArgumentKind_Invalid = 9, 697 } 698 } 699 700 cenum! { 701 enum CXTokenKind { 702 const CXToken_Punctuation = 0, 703 const CXToken_Keyword = 1, 704 const CXToken_Identifier = 2, 705 const CXToken_Literal = 3, 706 const CXToken_Comment = 4, 707 } 708 } 709 710 cenum! { 711 enum CXTypeKind { 712 const CXType_Invalid = 0, 713 const CXType_Unexposed = 1, 714 const CXType_Void = 2, 715 const CXType_Bool = 3, 716 const CXType_Char_U = 4, 717 const CXType_UChar = 5, 718 const CXType_Char16 = 6, 719 const CXType_Char32 = 7, 720 const CXType_UShort = 8, 721 const CXType_UInt = 9, 722 const CXType_ULong = 10, 723 const CXType_ULongLong = 11, 724 const CXType_UInt128 = 12, 725 const CXType_Char_S = 13, 726 const CXType_SChar = 14, 727 const CXType_WChar = 15, 728 const CXType_Short = 16, 729 const CXType_Int = 17, 730 const CXType_Long = 18, 731 const CXType_LongLong = 19, 732 const CXType_Int128 = 20, 733 const CXType_Float = 21, 734 const CXType_Double = 22, 735 const CXType_LongDouble = 23, 736 const CXType_NullPtr = 24, 737 const CXType_Overload = 25, 738 const CXType_Dependent = 26, 739 const CXType_ObjCId = 27, 740 const CXType_ObjCClass = 28, 741 const CXType_ObjCSel = 29, 742 /// Only produced by `libclang` 3.9 and later. 743 const CXType_Float128 = 30, 744 /// Only produced by `libclang` 5.0 and later. 745 const CXType_Half = 31, 746 /// Only produced by `libclang` 6.0 and later. 747 const CXType_Float16 = 32, 748 const CXType_Complex = 100, 749 const CXType_Pointer = 101, 750 const CXType_BlockPointer = 102, 751 const CXType_LValueReference = 103, 752 const CXType_RValueReference = 104, 753 const CXType_Record = 105, 754 const CXType_Enum = 106, 755 const CXType_Typedef = 107, 756 const CXType_ObjCInterface = 108, 757 const CXType_ObjCObjectPointer = 109, 758 const CXType_FunctionNoProto = 110, 759 const CXType_FunctionProto = 111, 760 const CXType_ConstantArray = 112, 761 const CXType_Vector = 113, 762 const CXType_IncompleteArray = 114, 763 const CXType_VariableArray = 115, 764 const CXType_DependentSizedArray = 116, 765 const CXType_MemberPointer = 117, 766 /// Only produced by `libclang` 3.8 and later. 767 const CXType_Auto = 118, 768 /// Only produced by `libclang` 3.9 and later. 769 const CXType_Elaborated = 119, 770 /// Only produced by `libclang` 5.0 and later. 771 const CXType_Pipe = 120, 772 /// Only produced by `libclang` 5.0 and later. 773 const CXType_OCLImage1dRO = 121, 774 /// Only produced by `libclang` 5.0 and later. 775 const CXType_OCLImage1dArrayRO = 122, 776 /// Only produced by `libclang` 5.0 and later. 777 const CXType_OCLImage1dBufferRO = 123, 778 /// Only produced by `libclang` 5.0 and later. 779 const CXType_OCLImage2dRO = 124, 780 /// Only produced by `libclang` 5.0 and later. 781 const CXType_OCLImage2dArrayRO = 125, 782 /// Only produced by `libclang` 5.0 and later. 783 const CXType_OCLImage2dDepthRO = 126, 784 /// Only produced by `libclang` 5.0 and later. 785 const CXType_OCLImage2dArrayDepthRO = 127, 786 /// Only produced by `libclang` 5.0 and later. 787 const CXType_OCLImage2dMSAARO = 128, 788 /// Only produced by `libclang` 5.0 and later. 789 const CXType_OCLImage2dArrayMSAARO = 129, 790 /// Only produced by `libclang` 5.0 and later. 791 const CXType_OCLImage2dMSAADepthRO = 130, 792 /// Only produced by `libclang` 5.0 and later. 793 const CXType_OCLImage2dArrayMSAADepthRO = 131, 794 /// Only produced by `libclang` 5.0 and later. 795 const CXType_OCLImage3dRO = 132, 796 /// Only produced by `libclang` 5.0 and later. 797 const CXType_OCLImage1dWO = 133, 798 /// Only produced by `libclang` 5.0 and later. 799 const CXType_OCLImage1dArrayWO = 134, 800 /// Only produced by `libclang` 5.0 and later. 801 const CXType_OCLImage1dBufferWO = 135, 802 /// Only produced by `libclang` 5.0 and later. 803 const CXType_OCLImage2dWO = 136, 804 /// Only produced by `libclang` 5.0 and later. 805 const CXType_OCLImage2dArrayWO = 137, 806 /// Only produced by `libclang` 5.0 and later. 807 const CXType_OCLImage2dDepthWO = 138, 808 /// Only produced by `libclang` 5.0 and later. 809 const CXType_OCLImage2dArrayDepthWO = 139, 810 /// Only produced by `libclang` 5.0 and later. 811 const CXType_OCLImage2dMSAAWO = 140, 812 /// Only produced by `libclang` 5.0 and later. 813 const CXType_OCLImage2dArrayMSAAWO = 141, 814 /// Only produced by `libclang` 5.0 and later. 815 const CXType_OCLImage2dMSAADepthWO = 142, 816 /// Only produced by `libclang` 5.0 and later. 817 const CXType_OCLImage2dArrayMSAADepthWO = 143, 818 /// Only produced by `libclang` 5.0 and later. 819 const CXType_OCLImage3dWO = 144, 820 /// Only produced by `libclang` 5.0 and later. 821 const CXType_OCLImage1dRW = 145, 822 /// Only produced by `libclang` 5.0 and later. 823 const CXType_OCLImage1dArrayRW = 146, 824 /// Only produced by `libclang` 5.0 and later. 825 const CXType_OCLImage1dBufferRW = 147, 826 /// Only produced by `libclang` 5.0 and later. 827 const CXType_OCLImage2dRW = 148, 828 /// Only produced by `libclang` 5.0 and later. 829 const CXType_OCLImage2dArrayRW = 149, 830 /// Only produced by `libclang` 5.0 and later. 831 const CXType_OCLImage2dDepthRW = 150, 832 /// Only produced by `libclang` 5.0 and later. 833 const CXType_OCLImage2dArrayDepthRW = 151, 834 /// Only produced by `libclang` 5.0 and later. 835 const CXType_OCLImage2dMSAARW = 152, 836 /// Only produced by `libclang` 5.0 and later. 837 const CXType_OCLImage2dArrayMSAARW = 153, 838 /// Only produced by `libclang` 5.0 and later. 839 const CXType_OCLImage2dMSAADepthRW = 154, 840 /// Only produced by `libclang` 5.0 and later. 841 const CXType_OCLImage2dArrayMSAADepthRW = 155, 842 /// Only produced by `libclang` 5.0 and later. 843 const CXType_OCLImage3dRW = 156, 844 /// Only produced by `libclang` 5.0 and later. 845 const CXType_OCLSampler = 157, 846 /// Only produced by `libclang` 5.0 and later. 847 const CXType_OCLEvent = 158, 848 /// Only produced by `libclang` 5.0 and later. 849 const CXType_OCLQueue = 159, 850 /// Only produced by `libclang` 5.0 and later. 851 const CXType_OCLReserveID = 160, 852 } 853 } 854 855 cenum! { 856 enum CXTypeLayoutError { 857 const CXTypeLayoutError_Invalid = -1, 858 const CXTypeLayoutError_Incomplete = -2, 859 const CXTypeLayoutError_Dependent = -3, 860 const CXTypeLayoutError_NotConstantSize = -4, 861 const CXTypeLayoutError_InvalidFieldName = -5, 862 } 863 } 864 865 cenum! { 866 #[cfg(feature="gte_clang_3_8")] 867 enum CXVisibilityKind { 868 const CXVisibility_Invalid = 0, 869 const CXVisibility_Hidden = 1, 870 const CXVisibility_Protected = 2, 871 const CXVisibility_Default = 3, 872 } 873 } 874 875 cenum! { 876 enum CXVisitorResult { 877 const CXVisit_Break = 0, 878 const CXVisit_Continue = 1, 879 } 880 } 881 882 cenum! { 883 enum CX_CXXAccessSpecifier { 884 const CX_CXXInvalidAccessSpecifier = 0, 885 const CX_CXXPublic = 1, 886 const CX_CXXProtected = 2, 887 const CX_CXXPrivate = 3, 888 } 889 } 890 891 cenum! { 892 #[cfg(feature="gte_clang_3_6")] 893 enum CX_StorageClass { 894 const CX_SC_Invalid = 0, 895 const CX_SC_None = 1, 896 const CX_SC_Extern = 2, 897 const CX_SC_Static = 3, 898 const CX_SC_PrivateExtern = 4, 899 const CX_SC_OpenCLWorkGroupLocal = 5, 900 const CX_SC_Auto = 6, 901 const CX_SC_Register = 7, 902 } 903 } 904 905 //================================================ 906 // Flags 907 //================================================ 908 909 cenum! { 910 enum CXCodeComplete_Flags { 911 const CXCodeComplete_IncludeMacros = 1; 912 const CXCodeComplete_IncludeCodePatterns = 2; 913 const CXCodeComplete_IncludeBriefComments = 4; 914 } 915 } 916 917 cenum! { 918 enum CXCompletionContext { 919 const CXCompletionContext_Unexposed = 0; 920 const CXCompletionContext_AnyType = 1; 921 const CXCompletionContext_AnyValue = 2; 922 const CXCompletionContext_ObjCObjectValue = 4; 923 const CXCompletionContext_ObjCSelectorValue = 8; 924 const CXCompletionContext_CXXClassTypeValue = 16; 925 const CXCompletionContext_DotMemberAccess = 32; 926 const CXCompletionContext_ArrowMemberAccess = 64; 927 const CXCompletionContext_ObjCPropertyAccess = 128; 928 const CXCompletionContext_EnumTag = 256; 929 const CXCompletionContext_UnionTag = 512; 930 const CXCompletionContext_StructTag = 1024; 931 const CXCompletionContext_ClassTag = 2048; 932 const CXCompletionContext_Namespace = 4096; 933 const CXCompletionContext_NestedNameSpecifier = 8192; 934 const CXCompletionContext_ObjCInterface = 16384; 935 const CXCompletionContext_ObjCProtocol = 32768; 936 const CXCompletionContext_ObjCCategory = 65536; 937 const CXCompletionContext_ObjCInstanceMessage = 131072; 938 const CXCompletionContext_ObjCClassMessage = 262144; 939 const CXCompletionContext_ObjCSelectorName = 524288; 940 const CXCompletionContext_MacroName = 1048576; 941 const CXCompletionContext_NaturalLanguage = 2097152; 942 const CXCompletionContext_Unknown = 4194303; 943 } 944 } 945 946 cenum! { 947 enum CXDiagnosticDisplayOptions { 948 const CXDiagnostic_DisplaySourceLocation = 1; 949 const CXDiagnostic_DisplayColumn = 2; 950 const CXDiagnostic_DisplaySourceRanges = 4; 951 const CXDiagnostic_DisplayOption = 8; 952 const CXDiagnostic_DisplayCategoryId = 16; 953 const CXDiagnostic_DisplayCategoryName = 32; 954 } 955 } 956 957 cenum! { 958 enum CXGlobalOptFlags { 959 const CXGlobalOpt_None = 0; 960 const CXGlobalOpt_ThreadBackgroundPriorityForIndexing = 1; 961 const CXGlobalOpt_ThreadBackgroundPriorityForEditing = 2; 962 const CXGlobalOpt_ThreadBackgroundPriorityForAll = 3; 963 } 964 } 965 966 cenum! { 967 enum CXIdxDeclInfoFlags { 968 const CXIdxDeclFlag_Skipped = 1; 969 } 970 } 971 972 cenum! { 973 enum CXIndexOptFlags { 974 const CXIndexOptNone = 0; 975 const CXIndexOptSuppressRedundantRefs = 1; 976 const CXIndexOptIndexFunctionLocalSymbols = 2; 977 const CXIndexOptIndexImplicitTemplateInstantiations = 4; 978 const CXIndexOptSuppressWarnings = 8; 979 const CXIndexOptSkipParsedBodiesInSession = 16; 980 } 981 } 982 983 cenum! { 984 enum CXNameRefFlags { 985 const CXNameRange_WantQualifier = 1; 986 const CXNameRange_WantTemplateArgs = 2; 987 const CXNameRange_WantSinglePiece = 4; 988 } 989 } 990 991 cenum! { 992 enum CXObjCDeclQualifierKind { 993 const CXObjCDeclQualifier_None = 0; 994 const CXObjCDeclQualifier_In = 1; 995 const CXObjCDeclQualifier_Inout = 2; 996 const CXObjCDeclQualifier_Out = 4; 997 const CXObjCDeclQualifier_Bycopy = 8; 998 const CXObjCDeclQualifier_Byref = 16; 999 const CXObjCDeclQualifier_Oneway = 32; 1000 } 1001 } 1002 1003 cenum! { 1004 enum CXObjCPropertyAttrKind { 1005 const CXObjCPropertyAttr_noattr = 0; 1006 const CXObjCPropertyAttr_readonly = 1; 1007 const CXObjCPropertyAttr_getter = 2; 1008 const CXObjCPropertyAttr_assign = 4; 1009 const CXObjCPropertyAttr_readwrite = 8; 1010 const CXObjCPropertyAttr_retain = 16; 1011 const CXObjCPropertyAttr_copy = 32; 1012 const CXObjCPropertyAttr_nonatomic = 64; 1013 const CXObjCPropertyAttr_setter = 128; 1014 const CXObjCPropertyAttr_atomic = 256; 1015 const CXObjCPropertyAttr_weak = 512; 1016 const CXObjCPropertyAttr_strong = 1024; 1017 const CXObjCPropertyAttr_unsafe_unretained = 2048; 1018 #[cfg(feature="gte_clang_3_9")] 1019 const CXObjCPropertyAttr_class = 4096; 1020 } 1021 } 1022 1023 cenum! { 1024 enum CXReparse_Flags { 1025 const CXReparse_None = 0; 1026 } 1027 } 1028 1029 cenum! { 1030 enum CXSaveTranslationUnit_Flags { 1031 const CXSaveTranslationUnit_None = 0; 1032 } 1033 } 1034 1035 cenum! { 1036 enum CXTranslationUnit_Flags { 1037 const CXTranslationUnit_None = 0; 1038 const CXTranslationUnit_DetailedPreprocessingRecord = 1; 1039 const CXTranslationUnit_Incomplete = 2; 1040 const CXTranslationUnit_PrecompiledPreamble = 4; 1041 const CXTranslationUnit_CacheCompletionResults = 8; 1042 const CXTranslationUnit_ForSerialization = 16; 1043 const CXTranslationUnit_CXXChainedPCH = 32; 1044 const CXTranslationUnit_SkipFunctionBodies = 64; 1045 const CXTranslationUnit_IncludeBriefCommentsInCodeCompletion = 128; 1046 #[cfg(feature="gte_clang_3_8")] 1047 const CXTranslationUnit_CreatePreambleOnFirstParse = 256; 1048 #[cfg(feature="gte_clang_3_9")] 1049 const CXTranslationUnit_KeepGoing = 512; 1050 #[cfg(feature="gte_clang_5_0")] 1051 const CXTranslationUnit_SingleFileParse = 1024; 1052 } 1053 } 1054 1055 //================================================ 1056 // Structs 1057 //================================================ 1058 1059 // Opaque ________________________________________ 1060 1061 macro_rules! opaque { ($name:ident) => (pub type $name = *mut c_void;); } 1062 1063 opaque!(CXCompilationDatabase); 1064 opaque!(CXCompileCommand); 1065 opaque!(CXCompileCommands); 1066 opaque!(CXCompletionString); 1067 opaque!(CXCursorSet); 1068 opaque!(CXDiagnostic); 1069 opaque!(CXDiagnosticSet); 1070 #[cfg(feature="gte_clang_3_9")] 1071 opaque!(CXEvalResult); 1072 opaque!(CXFile); 1073 opaque!(CXIdxClientASTFile); 1074 opaque!(CXIdxClientContainer); 1075 opaque!(CXIdxClientEntity); 1076 opaque!(CXIdxClientFile); 1077 opaque!(CXIndex); 1078 opaque!(CXIndexAction); 1079 opaque!(CXModule); 1080 opaque!(CXRemapping); 1081 #[cfg(feature="gte_clang_5_0")] 1082 opaque!(CXTargetInfo); 1083 opaque!(CXTranslationUnit); 1084 1085 // Transparent ___________________________________ 1086 1087 #[derive(Copy, Clone, Debug)] 1088 #[repr(C)] 1089 pub struct CXCodeCompleteResults { 1090 pub Results: *mut CXCompletionResult, 1091 pub NumResults: c_uint, 1092 } 1093 1094 default!(CXCodeCompleteResults); 1095 1096 #[derive(Copy, Clone, Debug)] 1097 #[repr(C)] 1098 pub struct CXComment { 1099 pub ASTNode: *const c_void, 1100 pub TranslationUnit: CXTranslationUnit, 1101 } 1102 1103 default!(CXComment); 1104 1105 #[derive(Copy, Clone, Debug)] 1106 #[repr(C)] 1107 pub struct CXCompletionResult { 1108 pub CursorKind: CXCursorKind, 1109 pub CompletionString: CXCompletionString, 1110 } 1111 1112 default!(CXCompletionResult); 1113 1114 #[derive(Copy, Clone, Debug)] 1115 #[repr(C)] 1116 pub struct CXCursor { 1117 pub kind: CXCursorKind, 1118 pub xdata: c_int, 1119 pub data: [*const c_void; 3], 1120 } 1121 1122 default!(CXCursor); 1123 1124 #[derive(Copy, Clone, Debug)] 1125 #[repr(C)] 1126 pub struct CXCursorAndRangeVisitor { 1127 pub context: *mut c_void, 1128 pub visit: extern fn(*mut c_void, CXCursor, CXSourceRange) -> CXVisitorResult, 1129 } 1130 1131 default!(CXCursorAndRangeVisitor); 1132 1133 #[derive(Copy, Clone, Debug)] 1134 #[repr(C)] 1135 pub struct CXFileUniqueID { 1136 pub data: [c_ulonglong; 3], 1137 } 1138 1139 default!(CXFileUniqueID); 1140 1141 #[derive(Copy, Clone, Debug)] 1142 #[repr(C)] 1143 pub struct CXIdxAttrInfo { 1144 pub kind: CXIdxAttrKind, 1145 pub cursor: CXCursor, 1146 pub loc: CXIdxLoc, 1147 } 1148 1149 default!(CXIdxAttrInfo); 1150 1151 #[derive(Copy, Clone, Debug)] 1152 #[repr(C)] 1153 pub struct CXIdxBaseClassInfo { 1154 pub base: *const CXIdxEntityInfo, 1155 pub cursor: CXCursor, 1156 pub loc: CXIdxLoc, 1157 } 1158 1159 default!(CXIdxBaseClassInfo); 1160 1161 #[derive(Copy, Clone, Debug)] 1162 #[repr(C)] 1163 pub struct CXIdxCXXClassDeclInfo { 1164 pub declInfo: *const CXIdxDeclInfo, 1165 pub bases: *const *const CXIdxBaseClassInfo, 1166 pub numBases: c_uint, 1167 } 1168 1169 default!(CXIdxCXXClassDeclInfo); 1170 1171 #[derive(Copy, Clone, Debug)] 1172 #[repr(C)] 1173 pub struct CXIdxContainerInfo { 1174 pub cursor: CXCursor, 1175 } 1176 1177 default!(CXIdxContainerInfo); 1178 1179 #[derive(Copy, Clone, Debug)] 1180 #[repr(C)] 1181 pub struct CXIdxDeclInfo { 1182 pub entityInfo: *const CXIdxEntityInfo, 1183 pub cursor: CXCursor, 1184 pub loc: CXIdxLoc, 1185 pub semanticContainer: *const CXIdxContainerInfo, 1186 pub lexicalContainer: *const CXIdxContainerInfo, 1187 pub isRedeclaration: c_int, 1188 pub isDefinition: c_int, 1189 pub isContainer: c_int, 1190 pub declAsContainer: *const CXIdxContainerInfo, 1191 pub isImplicit: c_int, 1192 pub attributes: *const *const CXIdxAttrInfo, 1193 pub numAttributes: c_uint, 1194 pub flags: c_uint, 1195 } 1196 1197 default!(CXIdxDeclInfo); 1198 1199 #[derive(Copy, Clone, Debug)] 1200 #[repr(C)] 1201 pub struct CXIdxEntityInfo { 1202 pub kind: CXIdxEntityKind, 1203 pub templateKind: CXIdxEntityCXXTemplateKind, 1204 pub lang: CXIdxEntityLanguage, 1205 pub name: *const c_char, 1206 pub USR: *const c_char, 1207 pub cursor: CXCursor, 1208 pub attributes: *const *const CXIdxAttrInfo, 1209 pub numAttributes: c_uint, 1210 } 1211 1212 default!(CXIdxEntityInfo); 1213 1214 #[derive(Copy, Clone, Debug)] 1215 #[repr(C)] 1216 pub struct CXIdxEntityRefInfo { 1217 pub kind: CXIdxEntityRefKind, 1218 pub cursor: CXCursor, 1219 pub loc: CXIdxLoc, 1220 pub referencedEntity: *const CXIdxEntityInfo, 1221 pub parentEntity: *const CXIdxEntityInfo, 1222 pub container: *const CXIdxContainerInfo, 1223 } 1224 1225 default!(CXIdxEntityRefInfo); 1226 1227 #[derive(Copy, Clone, Debug)] 1228 #[repr(C)] 1229 pub struct CXIdxIBOutletCollectionAttrInfo { 1230 pub attrInfo: *const CXIdxAttrInfo, 1231 pub objcClass: *const CXIdxEntityInfo, 1232 pub classCursor: CXCursor, 1233 pub classLoc: CXIdxLoc, 1234 } 1235 1236 default!(CXIdxIBOutletCollectionAttrInfo); 1237 1238 #[derive(Copy, Clone, Debug)] 1239 #[repr(C)] 1240 pub struct CXIdxImportedASTFileInfo { 1241 pub file: CXFile, 1242 pub module: CXModule, 1243 pub loc: CXIdxLoc, 1244 pub isImplicit: c_int, 1245 } 1246 1247 default!(CXIdxImportedASTFileInfo); 1248 1249 #[derive(Copy, Clone, Debug)] 1250 #[repr(C)] 1251 pub struct CXIdxIncludedFileInfo { 1252 pub hashLoc: CXIdxLoc, 1253 pub filename: *const c_char, 1254 pub file: CXFile, 1255 pub isImport: c_int, 1256 pub isAngled: c_int, 1257 pub isModuleImport: c_int, 1258 } 1259 1260 default!(CXIdxIncludedFileInfo); 1261 1262 #[derive(Copy, Clone, Debug)] 1263 #[repr(C)] 1264 pub struct CXIdxLoc { 1265 pub ptr_data: [*mut c_void; 2], 1266 pub int_data: c_uint, 1267 } 1268 1269 default!(CXIdxLoc); 1270 1271 #[derive(Copy, Clone, Debug)] 1272 #[repr(C)] 1273 pub struct CXIdxObjCCategoryDeclInfo { 1274 pub containerInfo: *const CXIdxObjCContainerDeclInfo, 1275 pub objcClass: *const CXIdxEntityInfo, 1276 pub classCursor: CXCursor, 1277 pub classLoc: CXIdxLoc, 1278 pub protocols: *const CXIdxObjCProtocolRefListInfo, 1279 } 1280 1281 default!(CXIdxObjCCategoryDeclInfo); 1282 1283 #[derive(Copy, Clone, Debug)] 1284 #[repr(C)] 1285 pub struct CXIdxObjCContainerDeclInfo { 1286 pub declInfo: *const CXIdxDeclInfo, 1287 pub kind: CXIdxObjCContainerKind, 1288 } 1289 1290 default!(CXIdxObjCContainerDeclInfo); 1291 1292 #[derive(Copy, Clone, Debug)] 1293 #[repr(C)] 1294 pub struct CXIdxObjCInterfaceDeclInfo { 1295 pub containerInfo: *const CXIdxObjCContainerDeclInfo, 1296 pub superInfo: *const CXIdxBaseClassInfo, 1297 pub protocols: *const CXIdxObjCProtocolRefListInfo, 1298 } 1299 1300 default!(CXIdxObjCInterfaceDeclInfo); 1301 1302 #[derive(Copy, Clone, Debug)] 1303 #[repr(C)] 1304 pub struct CXIdxObjCPropertyDeclInfo { 1305 pub declInfo: *const CXIdxDeclInfo, 1306 pub getter: *const CXIdxEntityInfo, 1307 pub setter: *const CXIdxEntityInfo, 1308 } 1309 1310 default!(CXIdxObjCPropertyDeclInfo); 1311 1312 #[derive(Copy, Clone, Debug)] 1313 #[repr(C)] 1314 pub struct CXIdxObjCProtocolRefInfo { 1315 pub protocol: *const CXIdxEntityInfo, 1316 pub cursor: CXCursor, 1317 pub loc: CXIdxLoc, 1318 } 1319 1320 default!(CXIdxObjCProtocolRefInfo); 1321 1322 #[derive(Copy, Clone, Debug)] 1323 #[repr(C)] 1324 pub struct CXIdxObjCProtocolRefListInfo { 1325 pub protocols: *const *const CXIdxObjCProtocolRefInfo, 1326 pub numProtocols: c_uint, 1327 } 1328 1329 default!(CXIdxObjCProtocolRefListInfo); 1330 1331 #[derive(Copy, Clone, Debug)] 1332 #[repr(C)] 1333 pub struct CXPlatformAvailability { 1334 pub Platform: CXString, 1335 pub Introduced: CXVersion, 1336 pub Deprecated: CXVersion, 1337 pub Obsoleted: CXVersion, 1338 pub Unavailable: c_int, 1339 pub Message: CXString, 1340 } 1341 1342 default!(CXPlatformAvailability); 1343 1344 #[derive(Copy, Clone, Debug)] 1345 #[repr(C)] 1346 pub struct CXSourceLocation { 1347 pub ptr_data: [*const c_void; 2], 1348 pub int_data: c_uint, 1349 } 1350 1351 default!(CXSourceLocation); 1352 1353 #[derive(Copy, Clone, Debug)] 1354 #[repr(C)] 1355 pub struct CXSourceRange { 1356 pub ptr_data: [*const c_void; 2], 1357 pub begin_int_data: c_uint, 1358 pub end_int_data: c_uint, 1359 } 1360 1361 default!(CXSourceRange); 1362 1363 #[derive(Copy, Clone, Debug)] 1364 #[repr(C)] 1365 pub struct CXSourceRangeList { 1366 pub count: c_uint, 1367 pub ranges: *mut CXSourceRange, 1368 } 1369 1370 default!(CXSourceRangeList); 1371 1372 #[derive(Copy, Clone, Debug)] 1373 #[repr(C)] 1374 pub struct CXString { 1375 pub data: *const c_void, 1376 pub private_flags: c_uint, 1377 } 1378 1379 default!(CXString); 1380 1381 #[cfg(feature="gte_clang_3_8")] 1382 #[derive(Copy, Clone, Debug)] 1383 #[repr(C)] 1384 pub struct CXStringSet { 1385 pub Strings: *mut CXString, 1386 pub Count: c_uint, 1387 } 1388 1389 default!(#[cfg(feature="gte_clang_3_8")] CXStringSet); 1390 1391 #[derive(Copy, Clone, Debug)] 1392 #[repr(C)] 1393 pub struct CXTUResourceUsage { 1394 pub data: *mut c_void, 1395 pub numEntries: c_uint, 1396 pub entries: *mut CXTUResourceUsageEntry, 1397 } 1398 1399 default!(CXTUResourceUsage); 1400 1401 #[derive(Copy, Clone, Debug)] 1402 #[repr(C)] 1403 pub struct CXTUResourceUsageEntry { 1404 pub kind: CXTUResourceUsageKind, 1405 pub amount: c_ulong, 1406 } 1407 1408 default!(CXTUResourceUsageEntry); 1409 1410 #[derive(Copy, Clone, Debug)] 1411 #[repr(C)] 1412 pub struct CXToken { 1413 pub int_data: [c_uint; 4], 1414 pub ptr_data: *mut c_void, 1415 } 1416 1417 default!(CXToken); 1418 1419 #[derive(Copy, Clone, Debug)] 1420 #[repr(C)] 1421 pub struct CXType { 1422 pub kind: CXTypeKind, 1423 pub data: [*mut c_void; 2], 1424 } 1425 1426 default!(CXType); 1427 1428 #[derive(Copy, Clone, Debug)] 1429 #[repr(C)] 1430 pub struct CXUnsavedFile { 1431 pub Filename: *const c_char, 1432 pub Contents: *const c_char, 1433 pub Length: c_ulong, 1434 } 1435 1436 default!(CXUnsavedFile); 1437 1438 #[derive(Copy, Clone, Debug)] 1439 #[repr(C)] 1440 pub struct CXVersion { 1441 pub Major: c_int, 1442 pub Minor: c_int, 1443 pub Subminor: c_int, 1444 } 1445 1446 default!(CXVersion); 1447 1448 #[derive(Copy, Clone, Debug)] 1449 #[repr(C)] 1450 pub struct IndexerCallbacks { 1451 pub abortQuery: extern fn(CXClientData, *mut c_void) -> c_int, 1452 pub diagnostic: extern fn(CXClientData, CXDiagnosticSet, *mut c_void), 1453 pub enteredMainFile: extern fn(CXClientData, CXFile, *mut c_void) -> CXIdxClientFile, 1454 pub ppIncludedFile: extern fn(CXClientData, *const CXIdxIncludedFileInfo) -> CXIdxClientFile, 1455 pub importedASTFile: extern fn(CXClientData, *const CXIdxImportedASTFileInfo) -> CXIdxClientASTFile, 1456 pub startedTranslationUnit: extern fn(CXClientData, *mut c_void) -> CXIdxClientContainer, 1457 pub indexDeclaration: extern fn(CXClientData, *const CXIdxDeclInfo), 1458 pub indexEntityReference: extern fn(CXClientData, *const CXIdxEntityRefInfo), 1459 } 1460 1461 default!(IndexerCallbacks); 1462 1463 //================================================ 1464 // Functions 1465 //================================================ 1466 1467 link! { 1468 pub fn clang_CXCursorSet_contains(set: CXCursorSet, cursor: CXCursor) -> c_uint; 1469 pub fn clang_CXCursorSet_insert(set: CXCursorSet, cursor: CXCursor) -> c_uint; 1470 pub fn clang_CXIndex_getGlobalOptions(index: CXIndex) -> CXGlobalOptFlags; 1471 pub fn clang_CXIndex_setGlobalOptions(index: CXIndex, flags: CXGlobalOptFlags); 1472 #[cfg(feature="gte_clang_6_0")] 1473 pub fn clang_CXIndex_setInvocationEmissionPathOption(index: CXIndex, path: *const c_char); 1474 #[cfg(feature="gte_clang_3_9")] 1475 pub fn clang_CXXConstructor_isConvertingConstructor(cursor: CXCursor) -> c_uint; 1476 #[cfg(feature="gte_clang_3_9")] 1477 pub fn clang_CXXConstructor_isCopyConstructor(cursor: CXCursor) -> c_uint; 1478 #[cfg(feature="gte_clang_3_9")] 1479 pub fn clang_CXXConstructor_isDefaultConstructor(cursor: CXCursor) -> c_uint; 1480 #[cfg(feature="gte_clang_3_9")] 1481 pub fn clang_CXXConstructor_isMoveConstructor(cursor: CXCursor) -> c_uint; 1482 #[cfg(feature="gte_clang_3_8")] 1483 pub fn clang_CXXField_isMutable(cursor: CXCursor) -> c_uint; 1484 pub fn clang_CXXMethod_isConst(cursor: CXCursor) -> c_uint; 1485 #[cfg(feature="gte_clang_3_9")] 1486 pub fn clang_CXXMethod_isDefaulted(cursor: CXCursor) -> c_uint; 1487 pub fn clang_CXXMethod_isPureVirtual(cursor: CXCursor) -> c_uint; 1488 pub fn clang_CXXMethod_isStatic(cursor: CXCursor) -> c_uint; 1489 pub fn clang_CXXMethod_isVirtual(cursor: CXCursor) -> c_uint; 1490 #[cfg(feature="gte_clang_6_0")] 1491 pub fn clang_CXXRecord_isAbstract(cursor: CXCursor) -> c_uint; 1492 pub fn clang_CompilationDatabase_dispose(database: CXCompilationDatabase); 1493 pub fn clang_CompilationDatabase_fromDirectory(directory: *const c_char, error: *mut CXCompilationDatabase_Error) -> CXCompilationDatabase; 1494 pub fn clang_CompilationDatabase_getAllCompileCommands(database: CXCompilationDatabase) -> CXCompileCommands; 1495 pub fn clang_CompilationDatabase_getCompileCommands(database: CXCompilationDatabase, filename: *const c_char) -> CXCompileCommands; 1496 pub fn clang_CompileCommand_getArg(command: CXCompileCommand, index: c_uint) -> CXString; 1497 pub fn clang_CompileCommand_getDirectory(command: CXCompileCommand) -> CXString; 1498 #[cfg(feature="gte_clang_3_8")] 1499 pub fn clang_CompileCommand_getFilename(command: CXCompileCommand) -> CXString; 1500 #[cfg(feature="gte_clang_3_8")] 1501 pub fn clang_CompileCommand_getMappedSourceContent(command: CXCompileCommand, index: c_uint) -> CXString; 1502 #[cfg(feature="gte_clang_3_8")] 1503 pub fn clang_CompileCommand_getMappedSourcePath(command: CXCompileCommand, index: c_uint) -> CXString; 1504 pub fn clang_CompileCommand_getNumArgs(command: CXCompileCommand) -> c_uint; 1505 pub fn clang_CompileCommands_dispose(command: CXCompileCommands); 1506 pub fn clang_CompileCommands_getCommand(command: CXCompileCommands, index: c_uint) -> CXCompileCommand; 1507 pub fn clang_CompileCommands_getSize(command: CXCompileCommands) -> c_uint; 1508 #[cfg(feature="gte_clang_3_9")] 1509 pub fn clang_Cursor_Evaluate(cursor: CXCursor) -> CXEvalResult; 1510 pub fn clang_Cursor_getArgument(cursor: CXCursor, index: c_uint) -> CXCursor; 1511 pub fn clang_Cursor_getBriefCommentText(cursor: CXCursor) -> CXString; 1512 #[cfg(feature="gte_clang_3_8")] 1513 pub fn clang_Cursor_getCXXManglings(cursor: CXCursor) -> *mut CXStringSet; 1514 pub fn clang_Cursor_getCommentRange(cursor: CXCursor) -> CXSourceRange; 1515 #[cfg(feature="gte_clang_3_6")] 1516 pub fn clang_Cursor_getMangling(cursor: CXCursor) -> CXString; 1517 pub fn clang_Cursor_getModule(cursor: CXCursor) -> CXModule; 1518 pub fn clang_Cursor_getNumArguments(cursor: CXCursor) -> c_int; 1519 #[cfg(feature="gte_clang_3_6")] 1520 pub fn clang_Cursor_getNumTemplateArguments(cursor: CXCursor) -> c_int; 1521 pub fn clang_Cursor_getObjCDeclQualifiers(cursor: CXCursor) -> CXObjCDeclQualifierKind; 1522 #[cfg(feature="gte_clang_6_0")] 1523 pub fn clang_Cursor_getObjCManglings(cursor: CXCursor) -> *mut CXStringSet; 1524 pub fn clang_Cursor_getObjCPropertyAttributes(cursor: CXCursor, reserved: c_uint) -> CXObjCPropertyAttrKind; 1525 pub fn clang_Cursor_getObjCSelectorIndex(cursor: CXCursor) -> c_int; 1526 #[cfg(feature="gte_clang_3_7")] 1527 pub fn clang_Cursor_getOffsetOfField(cursor: CXCursor) -> c_longlong; 1528 pub fn clang_Cursor_getRawCommentText(cursor: CXCursor) -> CXString; 1529 pub fn clang_Cursor_getReceiverType(cursor: CXCursor) -> CXType; 1530 pub fn clang_Cursor_getSpellingNameRange(cursor: CXCursor, index: c_uint, reserved: c_uint) -> CXSourceRange; 1531 #[cfg(feature="gte_clang_3_6")] 1532 pub fn clang_Cursor_getStorageClass(cursor: CXCursor) -> CX_StorageClass; 1533 #[cfg(feature="gte_clang_3_6")] 1534 pub fn clang_Cursor_getTemplateArgumentKind(cursor: CXCursor, index: c_uint) -> CXTemplateArgumentKind; 1535 #[cfg(feature="gte_clang_3_6")] 1536 pub fn clang_Cursor_getTemplateArgumentType(cursor: CXCursor, index: c_uint) -> CXType; 1537 #[cfg(feature="gte_clang_3_6")] 1538 pub fn clang_Cursor_getTemplateArgumentUnsignedValue(cursor: CXCursor, index: c_uint) -> c_ulonglong; 1539 #[cfg(feature="gte_clang_3_6")] 1540 pub fn clang_Cursor_getTemplateArgumentValue(cursor: CXCursor, index: c_uint) -> c_longlong; 1541 pub fn clang_Cursor_getTranslationUnit(cursor: CXCursor) -> CXTranslationUnit; 1542 #[cfg(feature="gte_clang_3_9")] 1543 pub fn clang_Cursor_hasAttrs(cursor: CXCursor) -> c_uint; 1544 #[cfg(feature="gte_clang_3_7")] 1545 pub fn clang_Cursor_isAnonymous(cursor: CXCursor) -> c_uint; 1546 pub fn clang_Cursor_isBitField(cursor: CXCursor) -> c_uint; 1547 pub fn clang_Cursor_isDynamicCall(cursor: CXCursor) -> c_int; 1548 #[cfg(feature="gte_clang_5_0")] 1549 pub fn clang_Cursor_isExternalSymbol(cursor: CXCursor, language: *mut CXString, from: *mut CXString, generated: *mut c_uint) -> c_uint; 1550 #[cfg(feature="gte_clang_3_9")] 1551 pub fn clang_Cursor_isFunctionInlined(cursor: CXCursor) -> c_uint; 1552 #[cfg(feature="gte_clang_3_9")] 1553 pub fn clang_Cursor_isMacroBuiltin(cursor: CXCursor) -> c_uint; 1554 #[cfg(feature="gte_clang_3_9")] 1555 pub fn clang_Cursor_isMacroFunctionLike(cursor: CXCursor) -> c_uint; 1556 pub fn clang_Cursor_isNull(cursor: CXCursor) -> c_int; 1557 pub fn clang_Cursor_isObjCOptional(cursor: CXCursor) -> c_uint; 1558 pub fn clang_Cursor_isVariadic(cursor: CXCursor) -> c_uint; 1559 #[cfg(feature="gte_clang_5_0")] 1560 pub fn clang_EnumDecl_isScoped(cursor: CXCursor) -> c_uint; 1561 #[cfg(feature="gte_clang_3_9")] 1562 pub fn clang_EvalResult_dispose(result: CXEvalResult); 1563 #[cfg(feature="gte_clang_3_9")] 1564 pub fn clang_EvalResult_getAsDouble(result: CXEvalResult) -> libc::c_double; 1565 #[cfg(feature="gte_clang_3_9")] 1566 pub fn clang_EvalResult_getAsInt(result: CXEvalResult) -> c_int; 1567 #[cfg(feature="gte_clang_4_0")] 1568 pub fn clang_EvalResult_getAsLongLong(result: CXEvalResult) -> c_longlong; 1569 #[cfg(feature="gte_clang_3_9")] 1570 pub fn clang_EvalResult_getAsStr(result: CXEvalResult) -> *const c_char; 1571 #[cfg(feature="gte_clang_4_0")] 1572 pub fn clang_EvalResult_getAsUnsigned(result: CXEvalResult) -> c_ulonglong; 1573 #[cfg(feature="gte_clang_3_9")] 1574 pub fn clang_EvalResult_getKind(result: CXEvalResult) -> CXEvalResultKind; 1575 #[cfg(feature="gte_clang_4_0")] 1576 pub fn clang_EvalResult_isUnsignedInt(result: CXEvalResult) -> c_uint; 1577 #[cfg(feature="gte_clang_3_6")] 1578 pub fn clang_File_isEqual(left: CXFile, right: CXFile) -> c_int; 1579 pub fn clang_IndexAction_create(index: CXIndex) -> CXIndexAction; 1580 pub fn clang_IndexAction_dispose(index: CXIndexAction); 1581 pub fn clang_Location_isFromMainFile(location: CXSourceLocation) -> c_int; 1582 pub fn clang_Location_isInSystemHeader(location: CXSourceLocation) -> c_int; 1583 pub fn clang_Module_getASTFile(module: CXModule) -> CXFile; 1584 pub fn clang_Module_getFullName(module: CXModule) -> CXString; 1585 pub fn clang_Module_getName(module: CXModule) -> CXString; 1586 pub fn clang_Module_getNumTopLevelHeaders(tu: CXTranslationUnit, module: CXModule) -> c_uint; 1587 pub fn clang_Module_getParent(module: CXModule) -> CXModule; 1588 pub fn clang_Module_getTopLevelHeader(tu: CXTranslationUnit, module: CXModule, index: c_uint) -> CXFile; 1589 pub fn clang_Module_isSystem(module: CXModule) -> c_int; 1590 pub fn clang_Range_isNull(range: CXSourceRange) -> c_int; 1591 #[cfg(feature="gte_clang_5_0")] 1592 pub fn clang_TargetInfo_dispose(info: CXTargetInfo); 1593 #[cfg(feature="gte_clang_5_0")] 1594 pub fn clang_TargetInfo_getPointerWidth(info: CXTargetInfo) -> c_int; 1595 #[cfg(feature="gte_clang_5_0")] 1596 pub fn clang_TargetInfo_getTriple(info: CXTargetInfo) -> CXString; 1597 pub fn clang_Type_getAlignOf(type_: CXType) -> c_longlong; 1598 pub fn clang_Type_getCXXRefQualifier(type_: CXType) -> CXRefQualifierKind; 1599 pub fn clang_Type_getClassType(type_: CXType) -> CXType; 1600 #[cfg(feature="gte_clang_3_9")] 1601 pub fn clang_Type_getNamedType(type_: CXType) -> CXType; 1602 pub fn clang_Type_getNumTemplateArguments(type_: CXType) -> c_int; 1603 #[cfg(feature="gte_clang_3_9")] 1604 pub fn clang_Type_getObjCEncoding(type_: CXType) -> CXString; 1605 pub fn clang_Type_getOffsetOf(type_: CXType, field: *const c_char) -> c_longlong; 1606 pub fn clang_Type_getSizeOf(type_: CXType) -> c_longlong; 1607 pub fn clang_Type_getTemplateArgumentAsType(type_: CXType, index: c_uint) -> CXType; 1608 #[cfg(feature="gte_clang_5_0")] 1609 pub fn clang_Type_isTransparentTagTypedef(type_: CXType) -> c_uint; 1610 #[cfg(feature="gte_clang_3_7")] 1611 pub fn clang_Type_visitFields(type_: CXType, visitor: CXFieldVisitor, data: CXClientData) -> CXVisitorResult; 1612 pub fn clang_annotateTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint, cursors: *mut CXCursor); 1613 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; 1614 pub fn clang_codeCompleteGetContainerKind(results: *mut CXCodeCompleteResults, incomplete: *mut c_uint) -> CXCursorKind; 1615 pub fn clang_codeCompleteGetContainerUSR(results: *mut CXCodeCompleteResults) -> CXString; 1616 pub fn clang_codeCompleteGetContexts(results: *mut CXCodeCompleteResults) -> c_ulonglong; 1617 pub fn clang_codeCompleteGetDiagnostic(results: *mut CXCodeCompleteResults, index: c_uint) -> CXDiagnostic; 1618 pub fn clang_codeCompleteGetNumDiagnostics(results: *mut CXCodeCompleteResults) -> c_uint; 1619 pub fn clang_codeCompleteGetObjCSelector(results: *mut CXCodeCompleteResults) -> CXString; 1620 pub fn clang_constructUSR_ObjCCategory(class: *const c_char, category: *const c_char) -> CXString; 1621 pub fn clang_constructUSR_ObjCClass(class: *const c_char) -> CXString; 1622 pub fn clang_constructUSR_ObjCIvar(name: *const c_char, usr: CXString) -> CXString; 1623 pub fn clang_constructUSR_ObjCMethod(name: *const c_char, instance: c_uint, usr: CXString) -> CXString; 1624 pub fn clang_constructUSR_ObjCProperty(property: *const c_char, usr: CXString) -> CXString; 1625 pub fn clang_constructUSR_ObjCProtocol(protocol: *const c_char) -> CXString; 1626 pub fn clang_createCXCursorSet() -> CXCursorSet; 1627 pub fn clang_createIndex(exclude: c_int, display: c_int) -> CXIndex; 1628 pub fn clang_createTranslationUnit(index: CXIndex, file: *const c_char) -> CXTranslationUnit; 1629 pub fn clang_createTranslationUnit2(index: CXIndex, file: *const c_char, tu: *mut CXTranslationUnit) -> CXErrorCode; 1630 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; 1631 pub fn clang_defaultCodeCompleteOptions() -> CXCodeComplete_Flags; 1632 pub fn clang_defaultDiagnosticDisplayOptions() -> CXDiagnosticDisplayOptions; 1633 pub fn clang_defaultEditingTranslationUnitOptions() -> CXTranslationUnit_Flags; 1634 pub fn clang_defaultReparseOptions(tu: CXTranslationUnit) -> CXReparse_Flags; 1635 pub fn clang_defaultSaveOptions(tu: CXTranslationUnit) -> CXSaveTranslationUnit_Flags; 1636 pub fn clang_disposeCXCursorSet(set: CXCursorSet); 1637 pub fn clang_disposeCXPlatformAvailability(availability: *mut CXPlatformAvailability); 1638 pub fn clang_disposeCXTUResourceUsage(usage: CXTUResourceUsage); 1639 pub fn clang_disposeCodeCompleteResults(results: *mut CXCodeCompleteResults); 1640 pub fn clang_disposeDiagnostic(diagnostic: CXDiagnostic); 1641 pub fn clang_disposeDiagnosticSet(diagnostic: CXDiagnosticSet); 1642 pub fn clang_disposeIndex(index: CXIndex); 1643 pub fn clang_disposeOverriddenCursors(cursors: *mut CXCursor); 1644 pub fn clang_disposeSourceRangeList(list: *mut CXSourceRangeList); 1645 pub fn clang_disposeString(string: CXString); 1646 #[cfg(feature="gte_clang_3_8")] 1647 pub fn clang_disposeStringSet(set: *mut CXStringSet); 1648 pub fn clang_disposeTokens(tu: CXTranslationUnit, tokens: *mut CXToken, n_tokens: c_uint); 1649 pub fn clang_disposeTranslationUnit(tu: CXTranslationUnit); 1650 pub fn clang_enableStackTraces(); 1651 pub fn clang_equalCursors(left: CXCursor, right: CXCursor) -> c_uint; 1652 pub fn clang_equalLocations(left: CXSourceLocation, right: CXSourceLocation) -> c_uint; 1653 pub fn clang_equalRanges(left: CXSourceRange, right: CXSourceRange) -> c_uint; 1654 pub fn clang_equalTypes(left: CXType, right: CXType) -> c_uint; 1655 pub fn clang_executeOnThread(function: extern fn(*mut c_void), data: *mut c_void, stack: c_uint); 1656 pub fn clang_findIncludesInFile(tu: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult; 1657 pub fn clang_findReferencesInFile(cursor: CXCursor, file: CXFile, visitor: CXCursorAndRangeVisitor) -> CXResult; 1658 pub fn clang_formatDiagnostic(diagnostic: CXDiagnostic, flags: CXDiagnosticDisplayOptions) -> CXString; 1659 #[cfg(feature="gte_clang_3_7")] 1660 pub fn clang_free(buffer: *mut c_void); 1661 #[cfg(feature="gte_clang_5_0")] 1662 pub fn clang_getAddressSpace(type_: CXType) -> c_uint; 1663 #[cfg(feature="gte_clang_4_0")] 1664 pub fn clang_getAllSkippedRanges(tu: CXTranslationUnit) -> *mut CXSourceRangeList; 1665 pub fn clang_getArgType(type_: CXType, index: c_uint) -> CXType; 1666 pub fn clang_getArrayElementType(type_: CXType) -> CXType; 1667 pub fn clang_getArraySize(type_: CXType) -> c_longlong; 1668 pub fn clang_getCString(string: CXString) -> *const c_char; 1669 pub fn clang_getCXTUResourceUsage(tu: CXTranslationUnit) -> CXTUResourceUsage; 1670 pub fn clang_getCXXAccessSpecifier(cursor: CXCursor) -> CX_CXXAccessSpecifier; 1671 pub fn clang_getCanonicalCursor(cursor: CXCursor) -> CXCursor; 1672 pub fn clang_getCanonicalType(type_: CXType) -> CXType; 1673 pub fn clang_getChildDiagnostics(diagnostic: CXDiagnostic) -> CXDiagnosticSet; 1674 pub fn clang_getClangVersion() -> CXString; 1675 pub fn clang_getCompletionAnnotation(string: CXCompletionString, index: c_uint) -> CXString; 1676 pub fn clang_getCompletionAvailability(string: CXCompletionString) -> CXAvailabilityKind; 1677 pub fn clang_getCompletionBriefComment(string: CXCompletionString) -> CXString; 1678 pub fn clang_getCompletionChunkCompletionString(string: CXCompletionString, index: c_uint) -> CXCompletionString; 1679 pub fn clang_getCompletionChunkKind(string: CXCompletionString, index: c_uint) -> CXCompletionChunkKind; 1680 pub fn clang_getCompletionChunkText(string: CXCompletionString, index: c_uint) -> CXString; 1681 pub fn clang_getCompletionNumAnnotations(string: CXCompletionString) -> c_uint; 1682 pub fn clang_getCompletionParent(string: CXCompletionString, kind: *mut CXCursorKind) -> CXString; 1683 pub fn clang_getCompletionPriority(string: CXCompletionString) -> c_uint; 1684 pub fn clang_getCursor(tu: CXTranslationUnit, location: CXSourceLocation) -> CXCursor; 1685 pub fn clang_getCursorAvailability(cursor: CXCursor) -> CXAvailabilityKind; 1686 pub fn clang_getCursorCompletionString(cursor: CXCursor) -> CXCompletionString; 1687 pub fn clang_getCursorDefinition(cursor: CXCursor) -> CXCursor; 1688 pub fn clang_getCursorDisplayName(cursor: CXCursor) -> CXString; 1689 #[cfg(feature="gte_clang_5_0")] 1690 pub fn clang_getCursorExceptionSpecificationType(cursor: CXCursor) -> CXCursor_ExceptionSpecificationKind; 1691 pub fn clang_getCursorExtent(cursor: CXCursor) -> CXSourceRange; 1692 pub fn clang_getCursorKind(cursor: CXCursor) -> CXCursorKind; 1693 pub fn clang_getCursorKindSpelling(kind: CXCursorKind) -> CXString; 1694 pub fn clang_getCursorLanguage(cursor: CXCursor) -> CXLanguageKind; 1695 pub fn clang_getCursorLexicalParent(cursor: CXCursor) -> CXCursor; 1696 pub fn clang_getCursorLinkage(cursor: CXCursor) -> CXLinkageKind; 1697 pub fn clang_getCursorLocation(cursor: CXCursor) -> CXSourceLocation; 1698 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; 1699 pub fn clang_getCursorReferenceNameRange(cursor: CXCursor, flags: CXNameRefFlags, index: c_uint) -> CXSourceRange; 1700 pub fn clang_getCursorReferenced(cursor: CXCursor) -> CXCursor; 1701 pub fn clang_getCursorResultType(cursor: CXCursor) -> CXType; 1702 pub fn clang_getCursorSemanticParent(cursor: CXCursor) -> CXCursor; 1703 pub fn clang_getCursorSpelling(cursor: CXCursor) -> CXString; 1704 #[cfg(feature="gte_clang_6_0")] 1705 pub fn clang_getCursorTLSKind(cursor: CXCursor) -> CXTLSKind; 1706 pub fn clang_getCursorType(cursor: CXCursor) -> CXType; 1707 pub fn clang_getCursorUSR(cursor: CXCursor) -> CXString; 1708 #[cfg(feature="gte_clang_3_8")] 1709 pub fn clang_getCursorVisibility(cursor: CXCursor) -> CXVisibilityKind; 1710 pub fn clang_getDeclObjCTypeEncoding(cursor: CXCursor) -> CXString; 1711 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); 1712 pub fn clang_getDiagnostic(tu: CXTranslationUnit, index: c_uint) -> CXDiagnostic; 1713 pub fn clang_getDiagnosticCategory(diagnostic: CXDiagnostic) -> c_uint; 1714 pub fn clang_getDiagnosticCategoryName(category: c_uint) -> CXString; 1715 pub fn clang_getDiagnosticCategoryText(diagnostic: CXDiagnostic) -> CXString; 1716 pub fn clang_getDiagnosticFixIt(diagnostic: CXDiagnostic, index: c_uint, range: *mut CXSourceRange) -> CXString; 1717 pub fn clang_getDiagnosticInSet(diagnostic: CXDiagnosticSet, index: c_uint) -> CXDiagnostic; 1718 pub fn clang_getDiagnosticLocation(diagnostic: CXDiagnostic) -> CXSourceLocation; 1719 pub fn clang_getDiagnosticNumFixIts(diagnostic: CXDiagnostic) -> c_uint; 1720 pub fn clang_getDiagnosticNumRanges(diagnostic: CXDiagnostic) -> c_uint; 1721 pub fn clang_getDiagnosticOption(diagnostic: CXDiagnostic, option: *mut CXString) -> CXString; 1722 pub fn clang_getDiagnosticRange(diagnostic: CXDiagnostic, index: c_uint) -> CXSourceRange; 1723 pub fn clang_getDiagnosticSetFromTU(tu: CXTranslationUnit) -> CXDiagnosticSet; 1724 pub fn clang_getDiagnosticSeverity(diagnostic: CXDiagnostic) -> CXDiagnosticSeverity; 1725 pub fn clang_getDiagnosticSpelling(diagnostic: CXDiagnostic) -> CXString; 1726 pub fn clang_getElementType(type_: CXType) -> CXType; 1727 pub fn clang_getEnumConstantDeclUnsignedValue(cursor: CXCursor) -> c_ulonglong; 1728 pub fn clang_getEnumConstantDeclValue(cursor: CXCursor) -> c_longlong; 1729 pub fn clang_getEnumDeclIntegerType(cursor: CXCursor) -> CXType; 1730 #[cfg(feature="gte_clang_5_0")] 1731 pub fn clang_getExceptionSpecificationType(type_: CXType) -> CXCursor_ExceptionSpecificationKind; 1732 pub fn clang_getExpansionLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 1733 pub fn clang_getFieldDeclBitWidth(cursor: CXCursor) -> c_int; 1734 pub fn clang_getFile(tu: CXTranslationUnit, file: *const c_char) -> CXFile; 1735 #[cfg(feature="gte_clang_6_0")] 1736 pub fn clang_getFileContents(tu: CXTranslationUnit, file: CXFile, size: *mut size_t) -> *const c_char; 1737 pub fn clang_getFileLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 1738 pub fn clang_getFileName(file: CXFile) -> CXString; 1739 pub fn clang_getFileTime(file: CXFile) -> time_t; 1740 pub fn clang_getFileUniqueID(file: CXFile, id: *mut CXFileUniqueID) -> c_int; 1741 pub fn clang_getFunctionTypeCallingConv(type_: CXType) -> CXCallingConv; 1742 pub fn clang_getIBOutletCollectionType(cursor: CXCursor) -> CXType; 1743 pub fn clang_getIncludedFile(cursor: CXCursor) -> CXFile; 1744 pub fn clang_getInclusions(tu: CXTranslationUnit, visitor: CXInclusionVisitor, data: CXClientData); 1745 pub fn clang_getInstantiationLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 1746 pub fn clang_getLocation(tu: CXTranslationUnit, file: CXFile, line: c_uint, column: c_uint) -> CXSourceLocation; 1747 pub fn clang_getLocationForOffset(tu: CXTranslationUnit, file: CXFile, offset: c_uint) -> CXSourceLocation; 1748 pub fn clang_getModuleForFile(tu: CXTranslationUnit, file: CXFile) -> CXModule; 1749 pub fn clang_getNullCursor() -> CXCursor; 1750 pub fn clang_getNullLocation() -> CXSourceLocation; 1751 pub fn clang_getNullRange() -> CXSourceRange; 1752 pub fn clang_getNumArgTypes(type_: CXType) -> c_int; 1753 pub fn clang_getNumCompletionChunks(string: CXCompletionString) -> c_uint; 1754 pub fn clang_getNumDiagnostics(tu: CXTranslationUnit) -> c_uint; 1755 pub fn clang_getNumDiagnosticsInSet(diagnostic: CXDiagnosticSet) -> c_uint; 1756 pub fn clang_getNumElements(type_: CXType) -> c_longlong; 1757 pub fn clang_getNumOverloadedDecls(cursor: CXCursor) -> c_uint; 1758 pub fn clang_getOverloadedDecl(cursor: CXCursor, index: c_uint) -> CXCursor; 1759 pub fn clang_getOverriddenCursors(cursor: CXCursor, cursors: *mut *mut CXCursor, n_cursors: *mut c_uint); 1760 pub fn clang_getPointeeType(type_: CXType) -> CXType; 1761 pub fn clang_getPresumedLocation(location: CXSourceLocation, file: *mut CXString, line: *mut c_uint, column: *mut c_uint); 1762 pub fn clang_getRange(start: CXSourceLocation, end: CXSourceLocation) -> CXSourceRange; 1763 pub fn clang_getRangeEnd(range: CXSourceRange) -> CXSourceLocation; 1764 pub fn clang_getRangeStart(range: CXSourceRange) -> CXSourceLocation; 1765 pub fn clang_getRemappings(file: *const c_char) -> CXRemapping; 1766 pub fn clang_getRemappingsFromFileList(files: *mut *const c_char, n_files: c_uint) -> CXRemapping; 1767 pub fn clang_getResultType(type_: CXType) -> CXType; 1768 pub fn clang_getSkippedRanges(tu: CXTranslationUnit, file: CXFile) -> *mut CXSourceRangeList; 1769 pub fn clang_getSpecializedCursorTemplate(cursor: CXCursor) -> CXCursor; 1770 pub fn clang_getSpellingLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint); 1771 pub fn clang_getTUResourceUsageName(kind: CXTUResourceUsageKind) -> *const c_char; 1772 #[cfg(feature="gte_clang_5_0")] 1773 pub fn clang_getTranslationUnitTargetInfo(tu: CXTranslationUnit) -> CXTargetInfo; 1774 pub fn clang_getTemplateCursorKind(cursor: CXCursor) -> CXCursorKind; 1775 pub fn clang_getTokenExtent(tu: CXTranslationUnit, token: CXToken) -> CXSourceRange; 1776 pub fn clang_getTokenKind(token: CXToken) -> CXTokenKind; 1777 pub fn clang_getTokenLocation(tu: CXTranslationUnit, token: CXToken) -> CXSourceLocation; 1778 pub fn clang_getTokenSpelling(tu: CXTranslationUnit, token: CXToken) -> CXString; 1779 pub fn clang_getTranslationUnitCursor(tu: CXTranslationUnit) -> CXCursor; 1780 pub fn clang_getTranslationUnitSpelling(tu: CXTranslationUnit) -> CXString; 1781 pub fn clang_getTypeDeclaration(type_: CXType) -> CXCursor; 1782 pub fn clang_getTypeKindSpelling(type_: CXTypeKind) -> CXString; 1783 pub fn clang_getTypeSpelling(type_: CXType) -> CXString; 1784 pub fn clang_getTypedefDeclUnderlyingType(cursor: CXCursor) -> CXType; 1785 #[cfg(feature="gte_clang_5_0")] 1786 pub fn clang_getTypedefName(type_: CXType) -> CXString; 1787 pub fn clang_hashCursor(cursor: CXCursor) -> c_uint; 1788 pub fn clang_indexLoc_getCXSourceLocation(location: CXIdxLoc) -> CXSourceLocation; 1789 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); 1790 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; 1791 #[cfg(feature="gte_clang_3_8")] 1792 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; 1793 pub fn clang_indexTranslationUnit(index: CXIndexAction, data: CXClientData, callbacks: *mut IndexerCallbacks, n_callbacks: c_uint, flags: CXIndexOptFlags, tu: CXTranslationUnit) -> c_int; 1794 pub fn clang_index_getCXXClassDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxCXXClassDeclInfo; 1795 pub fn clang_index_getClientContainer(info: *const CXIdxContainerInfo) -> CXIdxClientContainer; 1796 pub fn clang_index_getClientEntity(info: *const CXIdxEntityInfo) -> CXIdxClientEntity; 1797 pub fn clang_index_getIBOutletCollectionAttrInfo(info: *const CXIdxAttrInfo) -> *const CXIdxIBOutletCollectionAttrInfo; 1798 pub fn clang_index_getObjCCategoryDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCCategoryDeclInfo; 1799 pub fn clang_index_getObjCContainerDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCContainerDeclInfo; 1800 pub fn clang_index_getObjCInterfaceDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCInterfaceDeclInfo; 1801 pub fn clang_index_getObjCPropertyDeclInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCPropertyDeclInfo; 1802 pub fn clang_index_getObjCProtocolRefListInfo(info: *const CXIdxDeclInfo) -> *const CXIdxObjCProtocolRefListInfo; 1803 pub fn clang_index_isEntityObjCContainerKind(info: CXIdxEntityKind) -> c_int; 1804 pub fn clang_index_setClientContainer(info: *const CXIdxContainerInfo, container: CXIdxClientContainer); 1805 pub fn clang_index_setClientEntity(info: *const CXIdxEntityInfo, entity: CXIdxClientEntity); 1806 pub fn clang_isAttribute(kind: CXCursorKind) -> c_uint; 1807 pub fn clang_isConstQualifiedType(type_: CXType) -> c_uint; 1808 pub fn clang_isCursorDefinition(cursor: CXCursor) -> c_uint; 1809 pub fn clang_isDeclaration(kind: CXCursorKind) -> c_uint; 1810 pub fn clang_isExpression(kind: CXCursorKind) -> c_uint; 1811 pub fn clang_isFileMultipleIncludeGuarded(tu: CXTranslationUnit, file: CXFile) -> c_uint; 1812 pub fn clang_isFunctionTypeVariadic(type_: CXType) -> c_uint; 1813 pub fn clang_isInvalid(kind: CXCursorKind) -> c_uint; 1814 pub fn clang_isPODType(type_: CXType) -> c_uint; 1815 pub fn clang_isPreprocessing(kind: CXCursorKind) -> c_uint; 1816 pub fn clang_isReference(kind: CXCursorKind) -> c_uint; 1817 pub fn clang_isRestrictQualifiedType(type_: CXType) -> c_uint; 1818 pub fn clang_isStatement(kind: CXCursorKind) -> c_uint; 1819 pub fn clang_isTranslationUnit(kind: CXCursorKind) -> c_uint; 1820 pub fn clang_isUnexposed(kind: CXCursorKind) -> c_uint; 1821 pub fn clang_isVirtualBase(cursor: CXCursor) -> c_uint; 1822 pub fn clang_isVolatileQualifiedType(type_: CXType) -> c_uint; 1823 pub fn clang_loadDiagnostics(file: *const c_char, error: *mut CXLoadDiag_Error, message: *mut CXString) -> CXDiagnosticSet; 1824 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; 1825 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; 1826 #[cfg(feature="gte_clang_3_8")] 1827 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; 1828 pub fn clang_remap_dispose(remapping: CXRemapping); 1829 pub fn clang_remap_getFilenames(remapping: CXRemapping, index: c_uint, original: *mut CXString, transformed: *mut CXString); 1830 pub fn clang_remap_getNumFiles(remapping: CXRemapping) -> c_uint; 1831 pub fn clang_reparseTranslationUnit(tu: CXTranslationUnit, n_unsaved: c_uint, unsaved: *mut CXUnsavedFile, flags: CXReparse_Flags) -> CXErrorCode; 1832 pub fn clang_saveTranslationUnit(tu: CXTranslationUnit, file: *const c_char, options: CXSaveTranslationUnit_Flags) -> CXSaveError; 1833 pub fn clang_sortCodeCompletionResults(results: *mut CXCompletionResult, n_results: c_uint); 1834 #[cfg(feature="gte_clang_5_0")] 1835 pub fn clang_suspendTranslationUnit(tu: CXTranslationUnit) -> c_uint; 1836 pub fn clang_toggleCrashRecovery(recovery: c_uint); 1837 pub fn clang_tokenize(tu: CXTranslationUnit, range: CXSourceRange, tokens: *mut *mut CXToken, n_tokens: *mut c_uint); 1838 pub fn clang_visitChildren(cursor: CXCursor, visitor: CXCursorVisitor, data: CXClientData) -> c_uint; 1839 1840 // Documentation 1841 pub fn clang_BlockCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString; 1842 pub fn clang_BlockCommandComment_getCommandName(comment: CXComment) -> CXString; 1843 pub fn clang_BlockCommandComment_getNumArgs(comment: CXComment) -> c_uint; 1844 pub fn clang_BlockCommandComment_getParagraph(comment: CXComment) -> CXComment; 1845 pub fn clang_Comment_getChild(comment: CXComment, index: c_uint) -> CXComment; 1846 pub fn clang_Comment_getKind(comment: CXComment) -> CXCommentKind; 1847 pub fn clang_Comment_getNumChildren(comment: CXComment) -> c_uint; 1848 pub fn clang_Comment_isWhitespace(comment: CXComment) -> c_uint; 1849 pub fn clang_Cursor_getParsedComment(C: CXCursor) -> CXComment; 1850 pub fn clang_FullComment_getAsHTML(comment: CXComment) -> CXString; 1851 pub fn clang_FullComment_getAsXML(comment: CXComment) -> CXString; 1852 pub fn clang_HTMLStartTagComment_isSelfClosing(comment: CXComment) -> c_uint; 1853 pub fn clang_HTMLStartTag_getAttrName(comment: CXComment, index: c_uint) -> CXString; 1854 pub fn clang_HTMLStartTag_getAttrValue(comment: CXComment, index: c_uint) -> CXString; 1855 pub fn clang_HTMLStartTag_getNumAttrs(comment: CXComment) -> c_uint; 1856 pub fn clang_HTMLTagComment_getAsString(comment: CXComment) -> CXString; 1857 pub fn clang_HTMLTagComment_getTagName(comment: CXComment) -> CXString; 1858 pub fn clang_InlineCommandComment_getArgText(comment: CXComment, index: c_uint) -> CXString; 1859 pub fn clang_InlineCommandComment_getCommandName(comment: CXComment) -> CXString; 1860 pub fn clang_InlineCommandComment_getNumArgs(comment: CXComment) -> c_uint; 1861 pub fn clang_InlineCommandComment_getRenderKind(comment: CXComment) -> CXCommentInlineCommandRenderKind; 1862 pub fn clang_InlineContentComment_hasTrailingNewline(comment: CXComment) -> c_uint; 1863 pub fn clang_ParamCommandComment_getDirection(comment: CXComment) -> CXCommentParamPassDirection; 1864 pub fn clang_ParamCommandComment_getParamIndex(comment: CXComment) -> c_uint; 1865 pub fn clang_ParamCommandComment_getParamName(comment: CXComment) -> CXString; 1866 pub fn clang_ParamCommandComment_isDirectionExplicit(comment: CXComment) -> c_uint; 1867 pub fn clang_ParamCommandComment_isParamIndexValid(comment: CXComment) -> c_uint; 1868 pub fn clang_TParamCommandComment_getDepth(comment: CXComment) -> c_uint; 1869 pub fn clang_TParamCommandComment_getIndex(comment: CXComment, depth: c_uint) -> c_uint; 1870 pub fn clang_TParamCommandComment_getParamName(comment: CXComment) -> CXString; 1871 pub fn clang_TParamCommandComment_isParamPositionValid(comment: CXComment) -> c_uint; 1872 pub fn clang_TextComment_getText(comment: CXComment) -> CXString; 1873 pub fn clang_VerbatimBlockLineComment_getText(comment: CXComment) -> CXString; 1874 pub fn clang_VerbatimLineComment_getText(comment: CXComment) -> CXString; 1875 } 1876