rustkit_clang_sys/
lib.rs

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