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