]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / contrib / llvm / tools / clang / include / clang / Serialization / ASTBitCodes.h
1 //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header defines Bitcode enum values for Clang serialized AST files.
11 //
12 // The enum values defined in this file should be considered permanent.  If
13 // new features are added, they should have values added at the end of the
14 // respective lists.
15 //
16 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H
18 #define LLVM_CLANG_FRONTEND_PCHBITCODES_H
19
20 #include "clang/AST/Type.h"
21 #include "llvm/Bitcode/BitCodes.h"
22 #include "llvm/Support/DataTypes.h"
23 #include "llvm/ADT/DenseMap.h"
24
25 namespace clang {
26   namespace serialization {
27     /// \brief AST file major version number supported by this version of
28     /// Clang.
29     ///
30     /// Whenever the AST file format changes in a way that makes it
31     /// incompatible with previous versions (such that a reader
32     /// designed for the previous version could not support reading
33     /// the new version), this number should be increased.
34     ///
35     /// Version 4 of AST files also requires that the version control branch and
36     /// revision match exactly, since there is no backward compatibility of
37     /// AST files at this time.
38     const unsigned VERSION_MAJOR = 4;
39
40     /// \brief AST file minor version number supported by this version of
41     /// Clang.
42     ///
43     /// Whenever the AST format changes in a way that is still
44     /// compatible with previous versions (such that a reader designed
45     /// for the previous version could still support reading the new
46     /// version by ignoring new kinds of subblocks), this number
47     /// should be increased.
48     const unsigned VERSION_MINOR = 0;
49
50     /// \brief An ID number that refers to an identifier in an AST file.
51     /// 
52     /// The ID numbers of identifiers are consecutive (in order of discovery)
53     /// and start at 1. 0 is reserved for NULL.
54     typedef uint32_t IdentifierID;
55     
56     /// \brief An ID number that refers to a declaration in an AST file.
57     ///
58     /// The ID numbers of declarations are consecutive (in order of
59     /// discovery), with values below NUM_PREDEF_DECL_IDS being reserved. 
60     /// At the start of a chain of precompiled headers, declaration ID 1 is 
61     /// used for the translation unit declaration.
62     typedef uint32_t DeclID;
63
64     /// \brief a Decl::Kind/DeclID pair.
65     typedef std::pair<uint32_t, DeclID> KindDeclIDPair;
66
67     // FIXME: Turn these into classes so we can have some type safety when
68     // we go from local ID to global and vice-versa.
69     typedef DeclID LocalDeclID;
70     typedef DeclID GlobalDeclID;
71
72     /// \brief An ID number that refers to a type in an AST file.
73     ///
74     /// The ID of a type is partitioned into two parts: the lower
75     /// three bits are used to store the const/volatile/restrict
76     /// qualifiers (as with QualType) and the upper bits provide a
77     /// type index. The type index values are partitioned into two
78     /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
79     /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
80     /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
81     /// other types that have serialized representations.
82     typedef uint32_t TypeID;
83
84     /// \brief A type index; the type ID with the qualifier bits removed.
85     class TypeIdx {
86       uint32_t Idx;
87     public:
88       TypeIdx() : Idx(0) { }
89       explicit TypeIdx(uint32_t index) : Idx(index) { }
90
91       uint32_t getIndex() const { return Idx; }
92       TypeID asTypeID(unsigned FastQuals) const {
93         if (Idx == uint32_t(-1))
94           return TypeID(-1);
95         
96         return (Idx << Qualifiers::FastWidth) | FastQuals;
97       }
98       static TypeIdx fromTypeID(TypeID ID) {
99         if (ID == TypeID(-1))
100           return TypeIdx(-1);
101         
102         return TypeIdx(ID >> Qualifiers::FastWidth);
103       }
104     };
105
106     /// A structure for putting "fast"-unqualified QualTypes into a
107     /// DenseMap.  This uses the standard pointer hash function.
108     struct UnsafeQualTypeDenseMapInfo {
109       static inline bool isEqual(QualType A, QualType B) { return A == B; }
110       static inline QualType getEmptyKey() {
111         return QualType::getFromOpaquePtr((void*) 1);
112       }
113       static inline QualType getTombstoneKey() {
114         return QualType::getFromOpaquePtr((void*) 2);
115       }
116       static inline unsigned getHashValue(QualType T) {
117         assert(!T.getLocalFastQualifiers() && 
118                "hash invalid for types with fast quals");
119         uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
120         return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
121       }
122     };
123
124     /// \brief An ID number that refers to an identifier in an AST file.
125     typedef uint32_t IdentID;
126
127     /// \brief The number of predefined identifier IDs.
128     const unsigned int NUM_PREDEF_IDENT_IDS = 1;
129     
130     /// \brief An ID number that refers to an ObjC selctor in an AST file.
131     typedef uint32_t SelectorID;
132
133     /// \brief The number of predefined selector IDs.
134     const unsigned int NUM_PREDEF_SELECTOR_IDS = 1;
135     
136     /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an 
137     /// AST file.
138     typedef uint32_t CXXBaseSpecifiersID;
139     
140     /// \brief An ID number that refers to an entity in the detailed
141     /// preprocessing record.
142     typedef uint32_t PreprocessedEntityID;
143
144     /// \brief Source range/offset of a preprocessed entity.
145     struct PPEntityOffset {
146       /// \brief Raw source location of beginning of range.
147       unsigned Begin;
148       /// \brief Raw source location of end of range.
149       unsigned End;
150       /// \brief Offset in the AST file.
151       uint32_t BitOffset;
152
153       PPEntityOffset(SourceRange R, uint32_t BitOffset)
154         : Begin(R.getBegin().getRawEncoding()),
155           End(R.getEnd().getRawEncoding()),
156           BitOffset(BitOffset) { }
157     };
158
159     /// \brief The number of predefined preprocessed entity IDs.
160     const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1;
161
162     /// \brief Describes the various kinds of blocks that occur within
163     /// an AST file.
164     enum BlockIDs {
165       /// \brief The AST block, which acts as a container around the
166       /// full AST block.
167       AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
168
169       /// \brief The block containing information about the source
170       /// manager.
171       SOURCE_MANAGER_BLOCK_ID,
172
173       /// \brief The block containing information about the
174       /// preprocessor.
175       PREPROCESSOR_BLOCK_ID,
176
177       /// \brief The block containing the definitions of all of the
178       /// types and decls used within the AST file.
179       DECLTYPES_BLOCK_ID,
180
181       /// \brief The block containing DECL_UPDATES records.
182       DECL_UPDATES_BLOCK_ID,
183       
184       /// \brief The block containing the detailed preprocessing record.
185       PREPROCESSOR_DETAIL_BLOCK_ID
186     };
187
188     /// \brief Record types that occur within the AST block itself.
189     enum ASTRecordTypes {
190       /// \brief Record code for the offsets of each type.
191       ///
192       /// The TYPE_OFFSET constant describes the record that occurs
193       /// within the AST block. The record itself is an array of offsets that
194       /// point into the declarations and types block (identified by 
195       /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
196       /// of a type. For a given type ID @c T, the lower three bits of
197       /// @c T are its qualifiers (const, volatile, restrict), as in
198       /// the QualType class. The upper bits, after being shifted and
199       /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
200       /// TYPE_OFFSET block to determine the offset of that type's
201       /// corresponding record within the DECLTYPES_BLOCK_ID block.
202       TYPE_OFFSET = 1,
203
204       /// \brief Record code for the offsets of each decl.
205       ///
206       /// The DECL_OFFSET constant describes the record that occurs
207       /// within the block identified by DECL_OFFSETS_BLOCK_ID within
208       /// the AST block. The record itself is an array of offsets that
209       /// point into the declarations and types block (identified by
210       /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
211       /// record, after subtracting one to account for the use of
212       /// declaration ID 0 for a NULL declaration pointer. Index 0 is
213       /// reserved for the translation unit declaration.
214       DECL_OFFSET = 2,
215
216       /// \brief Record code for the language options table.
217       ///
218       /// The record with this code contains the contents of the
219       /// LangOptions structure. We serialize the entire contents of
220       /// the structure, and let the reader decide which options are
221       /// actually important to check.
222       LANGUAGE_OPTIONS = 3,
223
224       /// \brief AST file metadata, including the AST file version number
225       /// and the target triple used to build the AST file.
226       METADATA = 4,
227
228       /// \brief Record code for the table of offsets of each
229       /// identifier ID.
230       ///
231       /// The offset table contains offsets into the blob stored in
232       /// the IDENTIFIER_TABLE record. Each offset points to the
233       /// NULL-terminated string that corresponds to that identifier.
234       IDENTIFIER_OFFSET = 5,
235
236       /// \brief Record code for the identifier table.
237       ///
238       /// The identifier table is a simple blob that contains
239       /// NULL-terminated strings for all of the identifiers
240       /// referenced by the AST file. The IDENTIFIER_OFFSET table
241       /// contains the mapping from identifier IDs to the characters
242       /// in this blob. Note that the starting offsets of all of the
243       /// identifiers are odd, so that, when the identifier offset
244       /// table is loaded in, we can use the low bit to distinguish
245       /// between offsets (for unresolved identifier IDs) and
246       /// IdentifierInfo pointers (for already-resolved identifier
247       /// IDs).
248       IDENTIFIER_TABLE = 6,
249
250       /// \brief Record code for the array of external definitions.
251       ///
252       /// The AST file contains a list of all of the unnamed external
253       /// definitions present within the parsed headers, stored as an
254       /// array of declaration IDs. These external definitions will be
255       /// reported to the AST consumer after the AST file has been
256       /// read, since their presence can affect the semantics of the
257       /// program (e.g., for code generation).
258       EXTERNAL_DEFINITIONS = 7,
259
260       /// \brief Record code for the set of non-builtin, special
261       /// types.
262       ///
263       /// This record contains the type IDs for the various type nodes
264       /// that are constructed during semantic analysis (e.g.,
265       /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
266       /// offsets into this record.
267       SPECIAL_TYPES = 8,
268
269       /// \brief Record code for the extra statistics we gather while
270       /// generating an AST file.
271       STATISTICS = 9,
272
273       /// \brief Record code for the array of tentative definitions.
274       TENTATIVE_DEFINITIONS = 10,
275
276       /// \brief Record code for the array of locally-scoped external
277       /// declarations.
278       LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
279
280       /// \brief Record code for the table of offsets into the
281       /// Objective-C method pool.
282       SELECTOR_OFFSETS = 12,
283
284       /// \brief Record code for the Objective-C method pool,
285       METHOD_POOL = 13,
286
287       /// \brief The value of the next __COUNTER__ to dispense.
288       /// [PP_COUNTER_VALUE, Val]
289       PP_COUNTER_VALUE = 14,
290
291       /// \brief Record code for the table of offsets into the block
292       /// of source-location information.
293       SOURCE_LOCATION_OFFSETS = 15,
294
295       /// \brief Record code for the set of source location entries
296       /// that need to be preloaded by the AST reader.
297       ///
298       /// This set contains the source location entry for the
299       /// predefines buffer and for any file entries that need to be
300       /// preloaded.
301       SOURCE_LOCATION_PRELOADS = 16,
302
303       /// \brief Record code for the stat() cache.
304       STAT_CACHE = 17,
305
306       /// \brief Record code for the set of ext_vector type names.
307       EXT_VECTOR_DECLS = 18,
308
309       /// \brief Record code for the original file that was used to
310       /// generate the AST file.
311       ORIGINAL_FILE_NAME = 19,
312
313       /// \brief Record code for the file ID of the original file used to 
314       /// generate the AST file.
315       ORIGINAL_FILE_ID = 20,
316       
317       /// \brief Record code for the version control branch and revision
318       /// information of the compiler used to build this AST file.
319       VERSION_CONTROL_BRANCH_REVISION = 21,
320       
321       /// \brief Record code for the array of unused file scoped decls.
322       UNUSED_FILESCOPED_DECLS = 22,
323       
324       /// \brief Record code for the table of offsets to entries in the
325       /// preprocessing record.
326       PPD_ENTITIES_OFFSETS = 23,
327
328       /// \brief Record code for the array of VTable uses.
329       VTABLE_USES = 24,
330
331       /// \brief Record code for the array of dynamic classes.
332       DYNAMIC_CLASSES = 25,
333
334       /// \brief Record code for the list of other AST files imported by
335       /// this AST file.
336       IMPORTS = 26,
337
338       /// \brief Record code for referenced selector pool.
339       REFERENCED_SELECTOR_POOL = 27,
340
341       /// \brief Record code for an update to the TU's lexically contained
342       /// declarations.
343       TU_UPDATE_LEXICAL = 28,
344
345       /// \brief Record code for an update to first decls pointing to the
346       /// latest redeclarations.
347       REDECLS_UPDATE_LATEST = 29,
348
349       /// \brief Record code for declarations that Sema keeps references of.
350       SEMA_DECL_REFS = 30,
351
352       /// \brief Record code for weak undeclared identifiers.
353       WEAK_UNDECLARED_IDENTIFIERS = 31,
354
355       /// \brief Record code for pending implicit instantiations.
356       PENDING_IMPLICIT_INSTANTIATIONS = 32,
357
358       /// \brief Record code for a decl replacement block.
359       ///
360       /// If a declaration is modified after having been deserialized, and then
361       /// written to a dependent AST file, its ID and offset must be added to
362       /// the replacement block.
363       DECL_REPLACEMENTS = 33,
364
365       /// \brief Record code for an update to a decl context's lookup table.
366       ///
367       /// In practice, this should only be used for the TU and namespaces.
368       UPDATE_VISIBLE = 34,
369
370       /// \brief Record for offsets of DECL_UPDATES records for declarations
371       /// that were modified after being deserialized and need updates.
372       DECL_UPDATE_OFFSETS = 35,
373
374       /// \brief Record of updates for a declaration that was modified after
375       /// being deserialized.
376       DECL_UPDATES = 36,
377       
378       /// \brief Record code for the table of offsets to CXXBaseSpecifier
379       /// sets.
380       CXX_BASE_SPECIFIER_OFFSETS = 37,
381
382       /// \brief Record code for #pragma diagnostic mappings.
383       DIAG_PRAGMA_MAPPINGS = 38,
384
385       /// \brief Record code for special CUDA declarations.
386       CUDA_SPECIAL_DECL_REFS = 39,
387       
388       /// \brief Record code for header search information.
389       HEADER_SEARCH_TABLE = 40,
390
391       /// \brief The directory that the PCH was originally created in.
392       ORIGINAL_PCH_DIR = 41,
393
394       /// \brief Record code for floating point #pragma options.
395       FP_PRAGMA_OPTIONS = 42,
396
397       /// \brief Record code for enabled OpenCL extensions.
398       OPENCL_EXTENSIONS = 43,
399
400       /// \brief The list of delegating constructor declarations.
401       DELEGATING_CTORS = 44,
402
403       /// \brief Record code for the table of offsets into the block
404       /// of file source-location information.
405       FILE_SOURCE_LOCATION_OFFSETS = 45,
406       
407       /// \brief Record code for the set of known namespaces, which are used
408       /// for typo correction.
409       KNOWN_NAMESPACES = 46,
410
411       /// \brief Record code for the remapping information used to relate
412       /// loaded modules to the various offsets and IDs(e.g., source location 
413       /// offests, declaration and type IDs) that are used in that module to
414       /// refer to other modules.
415       MODULE_OFFSET_MAP = 47,
416
417       /// \brief Record code for the source manager line table information,
418       /// which stores information about #line directives.
419       SOURCE_MANAGER_LINE_TABLE = 48,
420
421       /// \brief Record code for ObjC categories in a module that are chained to
422       /// an interface.
423       OBJC_CHAINED_CATEGORIES
424     };
425
426     /// \brief Record types used within a source manager block.
427     enum SourceManagerRecordTypes {
428       /// \brief Describes a source location entry (SLocEntry) for a
429       /// file.
430       SM_SLOC_FILE_ENTRY = 1,
431       /// \brief Describes a source location entry (SLocEntry) for a
432       /// buffer.
433       SM_SLOC_BUFFER_ENTRY = 2,
434       /// \brief Describes a blob that contains the data for a buffer
435       /// entry. This kind of record always directly follows a
436       /// SM_SLOC_BUFFER_ENTRY record.
437       SM_SLOC_BUFFER_BLOB = 3,
438       /// \brief Describes a source location entry (SLocEntry) for a
439       /// macro expansion.
440       SM_SLOC_EXPANSION_ENTRY = 4
441     };
442
443     /// \brief Record types used within a preprocessor block.
444     enum PreprocessorRecordTypes {
445       // The macros in the PP section are a PP_MACRO_* instance followed by a
446       // list of PP_TOKEN instances for each token in the definition.
447
448       /// \brief An object-like macro definition.
449       /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
450       PP_MACRO_OBJECT_LIKE = 1,
451
452       /// \brief A function-like macro definition.
453       /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
454       ///  NumArgs, ArgIdentInfoID* ]
455       PP_MACRO_FUNCTION_LIKE = 2,
456
457       /// \brief Describes one token.
458       /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
459       PP_TOKEN = 3
460     };
461
462     /// \brief Record types used within a preprocessor detail block.
463     enum PreprocessorDetailRecordTypes {
464       /// \brief Describes a macro expansion within the preprocessing record.
465       PPD_MACRO_EXPANSION = 0,
466       
467       /// \brief Describes a macro definition within the preprocessing record.
468       PPD_MACRO_DEFINITION = 1,
469       
470       /// \brief Describes an inclusion directive within the preprocessing
471       /// record.
472       PPD_INCLUSION_DIRECTIVE = 2
473     };
474     
475     /// \defgroup ASTAST AST file AST constants
476     ///
477     /// The constants in this group describe various components of the
478     /// abstract syntax tree within an AST file.
479     ///
480     /// @{
481
482     /// \brief Predefined type IDs.
483     ///
484     /// These type IDs correspond to predefined types in the AST
485     /// context, such as built-in types (int) and special place-holder
486     /// types (the <overload> and <dependent> type markers). Such
487     /// types are never actually serialized, since they will be built
488     /// by the AST context when it is created.
489     enum PredefinedTypeIDs {
490       /// \brief The NULL type.
491       PREDEF_TYPE_NULL_ID       = 0,
492       /// \brief The void type.
493       PREDEF_TYPE_VOID_ID       = 1,
494       /// \brief The 'bool' or '_Bool' type.
495       PREDEF_TYPE_BOOL_ID       = 2,
496       /// \brief The 'char' type, when it is unsigned.
497       PREDEF_TYPE_CHAR_U_ID     = 3,
498       /// \brief The 'unsigned char' type.
499       PREDEF_TYPE_UCHAR_ID      = 4,
500       /// \brief The 'unsigned short' type.
501       PREDEF_TYPE_USHORT_ID     = 5,
502       /// \brief The 'unsigned int' type.
503       PREDEF_TYPE_UINT_ID       = 6,
504       /// \brief The 'unsigned long' type.
505       PREDEF_TYPE_ULONG_ID      = 7,
506       /// \brief The 'unsigned long long' type.
507       PREDEF_TYPE_ULONGLONG_ID  = 8,
508       /// \brief The 'char' type, when it is signed.
509       PREDEF_TYPE_CHAR_S_ID     = 9,
510       /// \brief The 'signed char' type.
511       PREDEF_TYPE_SCHAR_ID      = 10,
512       /// \brief The C++ 'wchar_t' type.
513       PREDEF_TYPE_WCHAR_ID      = 11,
514       /// \brief The (signed) 'short' type.
515       PREDEF_TYPE_SHORT_ID      = 12,
516       /// \brief The (signed) 'int' type.
517       PREDEF_TYPE_INT_ID        = 13,
518       /// \brief The (signed) 'long' type.
519       PREDEF_TYPE_LONG_ID       = 14,
520       /// \brief The (signed) 'long long' type.
521       PREDEF_TYPE_LONGLONG_ID   = 15,
522       /// \brief The 'float' type.
523       PREDEF_TYPE_FLOAT_ID      = 16,
524       /// \brief The 'double' type.
525       PREDEF_TYPE_DOUBLE_ID     = 17,
526       /// \brief The 'long double' type.
527       PREDEF_TYPE_LONGDOUBLE_ID = 18,
528       /// \brief The placeholder type for overloaded function sets.
529       PREDEF_TYPE_OVERLOAD_ID   = 19,
530       /// \brief The placeholder type for dependent types.
531       PREDEF_TYPE_DEPENDENT_ID  = 20,
532       /// \brief The '__uint128_t' type.
533       PREDEF_TYPE_UINT128_ID    = 21,
534       /// \brief The '__int128_t' type.
535       PREDEF_TYPE_INT128_ID     = 22,
536       /// \brief The type of 'nullptr'.
537       PREDEF_TYPE_NULLPTR_ID    = 23,
538       /// \brief The C++ 'char16_t' type.
539       PREDEF_TYPE_CHAR16_ID     = 24,
540       /// \brief The C++ 'char32_t' type.
541       PREDEF_TYPE_CHAR32_ID     = 25,
542       /// \brief The ObjC 'id' type.
543       PREDEF_TYPE_OBJC_ID       = 26,
544       /// \brief The ObjC 'Class' type.
545       PREDEF_TYPE_OBJC_CLASS    = 27,
546       /// \brief The ObjC 'SEL' type.
547       PREDEF_TYPE_OBJC_SEL      = 28,
548       /// \brief The 'unknown any' placeholder type.
549       PREDEF_TYPE_UNKNOWN_ANY   = 29,
550       /// \brief The placeholder type for bound member functions.
551       PREDEF_TYPE_BOUND_MEMBER  = 30,
552       /// \brief The "auto" deduction type.
553       PREDEF_TYPE_AUTO_DEDUCT   = 31,
554       /// \brief The "auto &&" deduction type.
555       PREDEF_TYPE_AUTO_RREF_DEDUCT = 32,
556       /// \brief The OpenCL 'half' / ARM NEON __fp16 type.
557       PREDEF_TYPE_HALF_ID       = 33
558     };
559
560     /// \brief The number of predefined type IDs that are reserved for
561     /// the PREDEF_TYPE_* constants.
562     ///
563     /// Type IDs for non-predefined types will start at
564     /// NUM_PREDEF_TYPE_IDs.
565     const unsigned NUM_PREDEF_TYPE_IDS = 100;
566
567     /// \brief The number of allowed abbreviations in bits
568     const unsigned NUM_ALLOWED_ABBREVS_SIZE = 4;
569
570     /// \brief Record codes for each kind of type.
571     ///
572     /// These constants describe the type records that can occur within a
573     /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
574     /// constant describes a record for a specific type class in the
575     /// AST.
576     enum TypeCode {
577       /// \brief An ExtQualType record.
578       TYPE_EXT_QUAL                 = 1,
579       /// \brief A ComplexType record.
580       TYPE_COMPLEX                  = 3,
581       /// \brief A PointerType record.
582       TYPE_POINTER                  = 4,
583       /// \brief A BlockPointerType record.
584       TYPE_BLOCK_POINTER            = 5,
585       /// \brief An LValueReferenceType record.
586       TYPE_LVALUE_REFERENCE         = 6,
587       /// \brief An RValueReferenceType record.
588       TYPE_RVALUE_REFERENCE         = 7,
589       /// \brief A MemberPointerType record.
590       TYPE_MEMBER_POINTER           = 8,
591       /// \brief A ConstantArrayType record.
592       TYPE_CONSTANT_ARRAY           = 9,
593       /// \brief An IncompleteArrayType record.
594       TYPE_INCOMPLETE_ARRAY         = 10,
595       /// \brief A VariableArrayType record.
596       TYPE_VARIABLE_ARRAY           = 11,
597       /// \brief A VectorType record.
598       TYPE_VECTOR                   = 12,
599       /// \brief An ExtVectorType record.
600       TYPE_EXT_VECTOR               = 13,
601       /// \brief A FunctionNoProtoType record.
602       TYPE_FUNCTION_NO_PROTO        = 14,
603       /// \brief A FunctionProtoType record.
604       TYPE_FUNCTION_PROTO           = 15,
605       /// \brief A TypedefType record.
606       TYPE_TYPEDEF                  = 16,
607       /// \brief A TypeOfExprType record.
608       TYPE_TYPEOF_EXPR              = 17,
609       /// \brief A TypeOfType record.
610       TYPE_TYPEOF                   = 18,
611       /// \brief A RecordType record.
612       TYPE_RECORD                   = 19,
613       /// \brief An EnumType record.
614       TYPE_ENUM                     = 20,
615       /// \brief An ObjCInterfaceType record.
616       TYPE_OBJC_INTERFACE           = 21,
617       /// \brief An ObjCObjectPointerType record.
618       TYPE_OBJC_OBJECT_POINTER      = 22,
619       /// \brief a DecltypeType record.
620       TYPE_DECLTYPE                 = 23,
621       /// \brief An ElaboratedType record.
622       TYPE_ELABORATED               = 24,
623       /// \brief A SubstTemplateTypeParmType record.
624       TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
625       /// \brief An UnresolvedUsingType record.
626       TYPE_UNRESOLVED_USING         = 26,
627       /// \brief An InjectedClassNameType record.
628       TYPE_INJECTED_CLASS_NAME      = 27,
629       /// \brief An ObjCObjectType record.
630       TYPE_OBJC_OBJECT              = 28,
631       /// \brief An TemplateTypeParmType record.
632       TYPE_TEMPLATE_TYPE_PARM       = 29,
633       /// \brief An TemplateSpecializationType record.
634       TYPE_TEMPLATE_SPECIALIZATION  = 30,
635       /// \brief A DependentNameType record.
636       TYPE_DEPENDENT_NAME           = 31,
637       /// \brief A DependentTemplateSpecializationType record.
638       TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
639       /// \brief A DependentSizedArrayType record.
640       TYPE_DEPENDENT_SIZED_ARRAY    = 33,
641       /// \brief A ParenType record.
642       TYPE_PAREN                    = 34,
643       /// \brief A PackExpansionType record.
644       TYPE_PACK_EXPANSION           = 35,
645       /// \brief An AttributedType record.
646       TYPE_ATTRIBUTED               = 36,
647       /// \brief A SubstTemplateTypeParmPackType record.
648       TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
649       /// \brief A AutoType record.
650       TYPE_AUTO                  = 38,
651       /// \brief A UnaryTransformType record.
652       TYPE_UNARY_TRANSFORM       = 39,
653       /// \brief An AtomicType record.
654       TYPE_ATOMIC                = 40
655     };
656
657     /// \brief The type IDs for special types constructed by semantic
658     /// analysis.
659     ///
660     /// The constants in this enumeration are indices into the
661     /// SPECIAL_TYPES record.
662     enum SpecialTypeIDs {
663       /// \brief __builtin_va_list
664       SPECIAL_TYPE_BUILTIN_VA_LIST             = 0,
665       /// \brief Objective-C Protocol type
666       SPECIAL_TYPE_OBJC_PROTOCOL               = 1,
667       /// \brief CFConstantString type
668       SPECIAL_TYPE_CF_CONSTANT_STRING          = 2,
669       /// \brief C FILE typedef type
670       SPECIAL_TYPE_FILE                        = 3,
671       /// \brief C jmp_buf typedef type
672       SPECIAL_TYPE_jmp_buf                     = 4,
673       /// \brief C sigjmp_buf typedef type
674       SPECIAL_TYPE_sigjmp_buf                  = 5,
675       /// \brief Objective-C "id" redefinition type
676       SPECIAL_TYPE_OBJC_ID_REDEFINITION        = 6,
677       /// \brief Objective-C "Class" redefinition type
678       SPECIAL_TYPE_OBJC_CLASS_REDEFINITION     = 7,
679       /// \brief Objective-C "SEL" redefinition type
680       SPECIAL_TYPE_OBJC_SEL_REDEFINITION       = 8
681     };
682     
683     /// \brief The number of special type IDs.
684     const unsigned NumSpecialTypeIDs = 0;
685
686     /// \brief Predefined declaration IDs.
687     ///
688     /// These declaration IDs correspond to predefined declarations in the AST
689     /// context, such as the NULL declaration ID. Such declarations are never
690     /// actually serialized, since they will be built by the AST context when 
691     /// it is created.
692     enum PredefinedDeclIDs {
693       /// \brief The NULL declaration.
694       PREDEF_DECL_NULL_ID       = 0,
695       
696       /// \brief The translation unit.
697       PREDEF_DECL_TRANSLATION_UNIT_ID = 1,
698       
699       /// \brief The Objective-C 'id' type.
700       PREDEF_DECL_OBJC_ID_ID = 2,
701       
702       /// \brief The Objective-C 'SEL' type.
703       PREDEF_DECL_OBJC_SEL_ID = 3,
704       
705       /// \brief The Objective-C 'Class' type.
706       PREDEF_DECL_OBJC_CLASS_ID = 4,
707       
708       /// \brief The signed 128-bit integer type.
709       PREDEF_DECL_INT_128_ID = 5,
710
711       /// \brief The unsigned 128-bit integer type.
712       PREDEF_DECL_UNSIGNED_INT_128_ID = 6,
713       
714       /// \brief The internal 'instancetype' typedef.
715       PREDEF_DECL_OBJC_INSTANCETYPE_ID = 7
716     };
717
718     /// \brief The number of declaration IDs that are predefined.
719     ///
720     /// For more information about predefined declarations, see the
721     /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants.
722     const unsigned int NUM_PREDEF_DECL_IDS = 8;
723     
724     /// \brief Record codes for each kind of declaration.
725     ///
726     /// These constants describe the declaration records that can occur within
727     /// a declarations block (identified by DECLS_BLOCK_ID). Each
728     /// constant describes a record for a specific declaration class
729     /// in the AST.
730     enum DeclCode {
731       /// \brief A TypedefDecl record.
732       DECL_TYPEDEF = 51,
733       /// \brief A TypeAliasDecl record.
734       DECL_TYPEALIAS,
735       /// \brief An EnumDecl record.
736       DECL_ENUM,
737       /// \brief A RecordDecl record.
738       DECL_RECORD,
739       /// \brief An EnumConstantDecl record.
740       DECL_ENUM_CONSTANT,
741       /// \brief A FunctionDecl record.
742       DECL_FUNCTION,
743       /// \brief A ObjCMethodDecl record.
744       DECL_OBJC_METHOD,
745       /// \brief A ObjCInterfaceDecl record.
746       DECL_OBJC_INTERFACE,
747       /// \brief A ObjCProtocolDecl record.
748       DECL_OBJC_PROTOCOL,
749       /// \brief A ObjCIvarDecl record.
750       DECL_OBJC_IVAR,
751       /// \brief A ObjCAtDefsFieldDecl record.
752       DECL_OBJC_AT_DEFS_FIELD,
753       /// \brief A ObjCClassDecl record.
754       DECL_OBJC_CLASS,
755       /// \brief A ObjCForwardProtocolDecl record.
756       DECL_OBJC_FORWARD_PROTOCOL,
757       /// \brief A ObjCCategoryDecl record.
758       DECL_OBJC_CATEGORY,
759       /// \brief A ObjCCategoryImplDecl record.
760       DECL_OBJC_CATEGORY_IMPL,
761       /// \brief A ObjCImplementationDecl record.
762       DECL_OBJC_IMPLEMENTATION,
763       /// \brief A ObjCCompatibleAliasDecl record.
764       DECL_OBJC_COMPATIBLE_ALIAS,
765       /// \brief A ObjCPropertyDecl record.
766       DECL_OBJC_PROPERTY,
767       /// \brief A ObjCPropertyImplDecl record.
768       DECL_OBJC_PROPERTY_IMPL,
769       /// \brief A FieldDecl record.
770       DECL_FIELD,
771       /// \brief A VarDecl record.
772       DECL_VAR,
773       /// \brief An ImplicitParamDecl record.
774       DECL_IMPLICIT_PARAM,
775       /// \brief A ParmVarDecl record.
776       DECL_PARM_VAR,
777       /// \brief A FileScopeAsmDecl record.
778       DECL_FILE_SCOPE_ASM,
779       /// \brief A BlockDecl record.
780       DECL_BLOCK,
781       /// \brief A record that stores the set of declarations that are
782       /// lexically stored within a given DeclContext.
783       ///
784       /// The record itself is a blob that is an array of declaration IDs,
785       /// in the order in which those declarations were added to the
786       /// declaration context. This data is used when iterating over
787       /// the contents of a DeclContext, e.g., via
788       /// DeclContext::decls_begin()/DeclContext::decls_end().
789       DECL_CONTEXT_LEXICAL,
790       /// \brief A record that stores the set of declarations that are
791       /// visible from a given DeclContext.
792       ///
793       /// The record itself stores a set of mappings, each of which
794       /// associates a declaration name with one or more declaration
795       /// IDs. This data is used when performing qualified name lookup
796       /// into a DeclContext via DeclContext::lookup.
797       DECL_CONTEXT_VISIBLE,
798       /// \brief A LabelDecl record.
799       DECL_LABEL,
800       /// \brief A NamespaceDecl record.
801       DECL_NAMESPACE,
802       /// \brief A NamespaceAliasDecl record.
803       DECL_NAMESPACE_ALIAS,
804       /// \brief A UsingDecl record.
805       DECL_USING,
806       /// \brief A UsingShadowDecl record.
807       DECL_USING_SHADOW,
808       /// \brief A UsingDirecitveDecl record.
809       DECL_USING_DIRECTIVE,
810       /// \brief An UnresolvedUsingValueDecl record.
811       DECL_UNRESOLVED_USING_VALUE,
812       /// \brief An UnresolvedUsingTypenameDecl record.
813       DECL_UNRESOLVED_USING_TYPENAME,
814       /// \brief A LinkageSpecDecl record.
815       DECL_LINKAGE_SPEC,
816       /// \brief A CXXRecordDecl record.
817       DECL_CXX_RECORD,
818       /// \brief A CXXMethodDecl record.
819       DECL_CXX_METHOD,
820       /// \brief A CXXConstructorDecl record.
821       DECL_CXX_CONSTRUCTOR,
822       /// \brief A CXXDestructorDecl record.
823       DECL_CXX_DESTRUCTOR,
824       /// \brief A CXXConversionDecl record.
825       DECL_CXX_CONVERSION,
826       /// \brief An AccessSpecDecl record.
827       DECL_ACCESS_SPEC,
828
829       /// \brief A FriendDecl record.
830       DECL_FRIEND,
831       /// \brief A FriendTemplateDecl record.
832       DECL_FRIEND_TEMPLATE,
833       /// \brief A ClassTemplateDecl record.
834       DECL_CLASS_TEMPLATE,
835       /// \brief A ClassTemplateSpecializationDecl record.
836       DECL_CLASS_TEMPLATE_SPECIALIZATION,
837       /// \brief A ClassTemplatePartialSpecializationDecl record.
838       DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
839       /// \brief A FunctionTemplateDecl record.
840       DECL_FUNCTION_TEMPLATE,
841       /// \brief A TemplateTypeParmDecl record.
842       DECL_TEMPLATE_TYPE_PARM,
843       /// \brief A NonTypeTemplateParmDecl record.
844       DECL_NON_TYPE_TEMPLATE_PARM,
845       /// \brief A TemplateTemplateParmDecl record.
846       DECL_TEMPLATE_TEMPLATE_PARM,
847       /// \brief A TypeAliasTemplateDecl record.
848       DECL_TYPE_ALIAS_TEMPLATE,
849       /// \brief A StaticAssertDecl record.
850       DECL_STATIC_ASSERT,
851       /// \brief A record containing CXXBaseSpecifiers.
852       DECL_CXX_BASE_SPECIFIERS,
853       /// \brief A IndirectFieldDecl record.
854       DECL_INDIRECTFIELD,
855       /// \brief A NonTypeTemplateParmDecl record that stores an expanded
856       /// non-type template parameter pack.
857       DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK,
858       /// \brief A ClassScopeFunctionSpecializationDecl record a class scope
859       /// function specialization. (Microsoft extension).
860       DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION
861     };
862
863     /// \brief Record codes for each kind of statement or expression.
864     ///
865     /// These constants describe the records that describe statements
866     /// or expressions. These records  occur within type and declarations
867     /// block, so they begin with record values of 100.  Each constant 
868     /// describes a record for a specific statement or expression class in the
869     /// AST.
870     enum StmtCode {
871       /// \brief A marker record that indicates that we are at the end
872       /// of an expression.
873       STMT_STOP = 100,
874       /// \brief A NULL expression.
875       STMT_NULL_PTR,
876       /// \brief A NullStmt record.
877       STMT_NULL,
878       /// \brief A CompoundStmt record.
879       STMT_COMPOUND,
880       /// \brief A CaseStmt record.
881       STMT_CASE,
882       /// \brief A DefaultStmt record.
883       STMT_DEFAULT,
884       /// \brief A LabelStmt record.
885       STMT_LABEL,
886       /// \brief An IfStmt record.
887       STMT_IF,
888       /// \brief A SwitchStmt record.
889       STMT_SWITCH,
890       /// \brief A WhileStmt record.
891       STMT_WHILE,
892       /// \brief A DoStmt record.
893       STMT_DO,
894       /// \brief A ForStmt record.
895       STMT_FOR,
896       /// \brief A GotoStmt record.
897       STMT_GOTO,
898       /// \brief An IndirectGotoStmt record.
899       STMT_INDIRECT_GOTO,
900       /// \brief A ContinueStmt record.
901       STMT_CONTINUE,
902       /// \brief A BreakStmt record.
903       STMT_BREAK,
904       /// \brief A ReturnStmt record.
905       STMT_RETURN,
906       /// \brief A DeclStmt record.
907       STMT_DECL,
908       /// \brief An AsmStmt record.
909       STMT_ASM,
910       /// \brief A PredefinedExpr record.
911       EXPR_PREDEFINED,
912       /// \brief A DeclRefExpr record.
913       EXPR_DECL_REF,
914       /// \brief An IntegerLiteral record.
915       EXPR_INTEGER_LITERAL,
916       /// \brief A FloatingLiteral record.
917       EXPR_FLOATING_LITERAL,
918       /// \brief An ImaginaryLiteral record.
919       EXPR_IMAGINARY_LITERAL,
920       /// \brief A StringLiteral record.
921       EXPR_STRING_LITERAL,
922       /// \brief A CharacterLiteral record.
923       EXPR_CHARACTER_LITERAL,
924       /// \brief A ParenExpr record.
925       EXPR_PAREN,
926       /// \brief A ParenListExpr record.
927       EXPR_PAREN_LIST,
928       /// \brief A UnaryOperator record.
929       EXPR_UNARY_OPERATOR,
930       /// \brief An OffsetOfExpr record.
931       EXPR_OFFSETOF,
932       /// \brief A SizefAlignOfExpr record.
933       EXPR_SIZEOF_ALIGN_OF,
934       /// \brief An ArraySubscriptExpr record.
935       EXPR_ARRAY_SUBSCRIPT,
936       /// \brief A CallExpr record.
937       EXPR_CALL,
938       /// \brief A MemberExpr record.
939       EXPR_MEMBER,
940       /// \brief A BinaryOperator record.
941       EXPR_BINARY_OPERATOR,
942       /// \brief A CompoundAssignOperator record.
943       EXPR_COMPOUND_ASSIGN_OPERATOR,
944       /// \brief A ConditionOperator record.
945       EXPR_CONDITIONAL_OPERATOR,
946       /// \brief An ImplicitCastExpr record.
947       EXPR_IMPLICIT_CAST,
948       /// \brief A CStyleCastExpr record.
949       EXPR_CSTYLE_CAST,
950       /// \brief A CompoundLiteralExpr record.
951       EXPR_COMPOUND_LITERAL,
952       /// \brief An ExtVectorElementExpr record.
953       EXPR_EXT_VECTOR_ELEMENT,
954       /// \brief An InitListExpr record.
955       EXPR_INIT_LIST,
956       /// \brief A DesignatedInitExpr record.
957       EXPR_DESIGNATED_INIT,
958       /// \brief An ImplicitValueInitExpr record.
959       EXPR_IMPLICIT_VALUE_INIT,
960       /// \brief A VAArgExpr record.
961       EXPR_VA_ARG,
962       /// \brief An AddrLabelExpr record.
963       EXPR_ADDR_LABEL,
964       /// \brief A StmtExpr record.
965       EXPR_STMT,
966       /// \brief A ChooseExpr record.
967       EXPR_CHOOSE,
968       /// \brief A GNUNullExpr record.
969       EXPR_GNU_NULL,
970       /// \brief A ShuffleVectorExpr record.
971       EXPR_SHUFFLE_VECTOR,
972       /// \brief BlockExpr
973       EXPR_BLOCK,
974       /// \brief A BlockDeclRef record.
975       EXPR_BLOCK_DECL_REF,
976       /// \brief A GenericSelectionExpr record.
977       EXPR_GENERIC_SELECTION,
978       /// \brief An AtomicExpr record.
979       EXPR_ATOMIC,
980
981       // Objective-C
982
983       /// \brief An ObjCStringLiteral record.
984       EXPR_OBJC_STRING_LITERAL,
985       /// \brief An ObjCEncodeExpr record.
986       EXPR_OBJC_ENCODE,
987       /// \brief An ObjCSelectorExpr record.
988       EXPR_OBJC_SELECTOR_EXPR,
989       /// \brief An ObjCProtocolExpr record.
990       EXPR_OBJC_PROTOCOL_EXPR,
991       /// \brief An ObjCIvarRefExpr record.
992       EXPR_OBJC_IVAR_REF_EXPR,
993       /// \brief An ObjCPropertyRefExpr record.
994       EXPR_OBJC_PROPERTY_REF_EXPR,
995       /// \brief UNUSED
996       EXPR_OBJC_KVC_REF_EXPR,
997       /// \brief An ObjCMessageExpr record.
998       EXPR_OBJC_MESSAGE_EXPR,
999       /// \brief An ObjCIsa Expr record.
1000       EXPR_OBJC_ISA,
1001       /// \breif An ObjCIndirectCopyRestoreExpr record.
1002       EXPR_OBJC_INDIRECT_COPY_RESTORE,
1003
1004       /// \brief An ObjCForCollectionStmt record.
1005       STMT_OBJC_FOR_COLLECTION,
1006       /// \brief An ObjCAtCatchStmt record.
1007       STMT_OBJC_CATCH,
1008       /// \brief An ObjCAtFinallyStmt record.
1009       STMT_OBJC_FINALLY,
1010       /// \brief An ObjCAtTryStmt record.
1011       STMT_OBJC_AT_TRY,
1012       /// \brief An ObjCAtSynchronizedStmt record.
1013       STMT_OBJC_AT_SYNCHRONIZED,
1014       /// \brief An ObjCAtThrowStmt record.
1015       STMT_OBJC_AT_THROW,
1016       /// \brief An ObjCAutoreleasePoolStmt record.
1017       STMT_OBJC_AUTORELEASE_POOL,
1018
1019       // C++
1020       
1021       /// \brief A CXXCatchStmt record.
1022       STMT_CXX_CATCH,
1023       /// \brief A CXXTryStmt record.
1024       STMT_CXX_TRY,
1025       /// \brief A CXXForRangeStmt record.
1026       STMT_CXX_FOR_RANGE,
1027
1028       /// \brief A CXXOperatorCallExpr record.
1029       EXPR_CXX_OPERATOR_CALL,
1030       /// \brief A CXXMemberCallExpr record.
1031       EXPR_CXX_MEMBER_CALL,
1032       /// \brief A CXXConstructExpr record.
1033       EXPR_CXX_CONSTRUCT,
1034       /// \brief A CXXTemporaryObjectExpr record.
1035       EXPR_CXX_TEMPORARY_OBJECT,
1036       /// \brief A CXXStaticCastExpr record.
1037       EXPR_CXX_STATIC_CAST,
1038       /// \brief A CXXDynamicCastExpr record.
1039       EXPR_CXX_DYNAMIC_CAST,
1040       /// \brief A CXXReinterpretCastExpr record.
1041       EXPR_CXX_REINTERPRET_CAST,
1042       /// \brief A CXXConstCastExpr record.
1043       EXPR_CXX_CONST_CAST,
1044       /// \brief A CXXFunctionalCastExpr record.
1045       EXPR_CXX_FUNCTIONAL_CAST,
1046       /// \brief A CXXBoolLiteralExpr record.
1047       EXPR_CXX_BOOL_LITERAL,
1048       EXPR_CXX_NULL_PTR_LITERAL,  // CXXNullPtrLiteralExpr
1049       EXPR_CXX_TYPEID_EXPR,       // CXXTypeidExpr (of expr).
1050       EXPR_CXX_TYPEID_TYPE,       // CXXTypeidExpr (of type).
1051       EXPR_CXX_THIS,              // CXXThisExpr
1052       EXPR_CXX_THROW,             // CXXThrowExpr
1053       EXPR_CXX_DEFAULT_ARG,       // CXXDefaultArgExpr
1054       EXPR_CXX_BIND_TEMPORARY,    // CXXBindTemporaryExpr
1055
1056       EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
1057       EXPR_CXX_NEW,               // CXXNewExpr
1058       EXPR_CXX_DELETE,            // CXXDeleteExpr
1059       EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
1060       
1061       EXPR_EXPR_WITH_CLEANUPS,    // ExprWithCleanups
1062       
1063       EXPR_CXX_DEPENDENT_SCOPE_MEMBER,   // CXXDependentScopeMemberExpr
1064       EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
1065       EXPR_CXX_UNRESOLVED_CONSTRUCT,     // CXXUnresolvedConstructExpr
1066       EXPR_CXX_UNRESOLVED_MEMBER,        // UnresolvedMemberExpr
1067       EXPR_CXX_UNRESOLVED_LOOKUP,        // UnresolvedLookupExpr
1068
1069       EXPR_CXX_UNARY_TYPE_TRAIT,  // UnaryTypeTraitExpr
1070       EXPR_CXX_EXPRESSION_TRAIT,  // ExpressionTraitExpr
1071       EXPR_CXX_NOEXCEPT,          // CXXNoexceptExpr
1072
1073       EXPR_OPAQUE_VALUE,          // OpaqueValueExpr
1074       EXPR_BINARY_CONDITIONAL_OPERATOR,  // BinaryConditionalOperator
1075       EXPR_BINARY_TYPE_TRAIT,     // BinaryTypeTraitExpr
1076       EXPR_ARRAY_TYPE_TRAIT,      // ArrayTypeTraitIntExpr
1077       
1078       EXPR_PACK_EXPANSION,        // PackExpansionExpr
1079       EXPR_SIZEOF_PACK,           // SizeOfPackExpr
1080       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr
1081       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
1082       EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr
1083       
1084       // CUDA
1085       EXPR_CUDA_KERNEL_CALL,       // CUDAKernelCallExpr      
1086
1087       // OpenCL
1088       EXPR_ASTYPE,                 // AsTypeExpr
1089
1090       // Microsoft
1091       EXPR_CXX_UUIDOF_EXPR,       // CXXUuidofExpr (of expr).
1092       EXPR_CXX_UUIDOF_TYPE,       // CXXUuidofExpr (of type).
1093       STMT_SEH_EXCEPT,            // SEHExceptStmt
1094       STMT_SEH_FINALLY,           // SEHFinallyStmt
1095       STMT_SEH_TRY,               // SEHTryStmt
1096       
1097       // ARC
1098       EXPR_OBJC_BRIDGED_CAST       // ObjCBridgedCastExpr
1099     };
1100
1101     /// \brief The kinds of designators that can occur in a
1102     /// DesignatedInitExpr.
1103     enum DesignatorTypes {
1104       /// \brief Field designator where only the field name is known.
1105       DESIG_FIELD_NAME  = 0,
1106       /// \brief Field designator where the field has been resolved to
1107       /// a declaration.
1108       DESIG_FIELD_DECL  = 1,
1109       /// \brief Array designator.
1110       DESIG_ARRAY       = 2,
1111       /// \brief GNU array range designator.
1112       DESIG_ARRAY_RANGE = 3
1113     };
1114
1115     /// \brief The different kinds of data that can occur in a
1116     /// CtorInitializer.
1117     enum CtorInitializerType {
1118       CTOR_INITIALIZER_BASE,
1119       CTOR_INITIALIZER_DELEGATING,
1120       CTOR_INITIALIZER_MEMBER,
1121       CTOR_INITIALIZER_INDIRECT_MEMBER
1122     };
1123
1124     /// @}
1125   }
1126 } // end namespace clang
1127
1128 #endif