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