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