clang API Documentation

ASTBitCodes.h
Go to the documentation of this file.
00001 //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This header defines Bitcode enum values for Clang serialized AST files.
00011 //
00012 // The enum values defined in this file should be considered permanent.  If
00013 // new features are added, they should have values added at the end of the
00014 // respective lists.
00015 //
00016 //===----------------------------------------------------------------------===//
00017 #ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H
00018 #define LLVM_CLANG_FRONTEND_PCHBITCODES_H
00019 
00020 #include "clang/AST/Type.h"
00021 #include "llvm/Bitcode/BitCodes.h"
00022 #include "llvm/Support/DataTypes.h"
00023 #include "llvm/ADT/DenseMap.h"
00024 
00025 namespace clang {
00026   namespace serialization {
00027     /// \brief AST file major version number supported by this version of
00028     /// Clang.
00029     ///
00030     /// Whenever the AST file format changes in a way that makes it
00031     /// incompatible with previous versions (such that a reader
00032     /// designed for the previous version could not support reading
00033     /// the new version), this number should be increased.
00034     ///
00035     /// Version 4 of AST files also requires that the version control branch and
00036     /// revision match exactly, since there is no backward compatibility of
00037     /// AST files at this time.
00038     const unsigned VERSION_MAJOR = 4;
00039 
00040     /// \brief AST file minor version number supported by this version of
00041     /// Clang.
00042     ///
00043     /// Whenever the AST format changes in a way that is still
00044     /// compatible with previous versions (such that a reader designed
00045     /// for the previous version could still support reading the new
00046     /// version by ignoring new kinds of subblocks), this number
00047     /// should be increased.
00048     const unsigned VERSION_MINOR = 0;
00049 
00050     /// \brief An ID number that refers to an identifier in an AST file.
00051     /// 
00052     /// The ID numbers of identifiers are consecutive (in order of discovery)
00053     /// and start at 1. 0 is reserved for NULL.
00054     typedef uint32_t IdentifierID;
00055     
00056     /// \brief An ID number that refers to a declaration in an AST file.
00057     ///
00058     /// The ID numbers of declarations are consecutive (in order of
00059     /// discovery), with values below NUM_PREDEF_DECL_IDS being reserved. 
00060     /// At the start of a chain of precompiled headers, declaration ID 1 is 
00061     /// used for the translation unit declaration.
00062     typedef uint32_t DeclID;
00063 
00064     /// \brief a Decl::Kind/DeclID pair.
00065     typedef std::pair<uint32_t, DeclID> KindDeclIDPair;
00066 
00067     // FIXME: Turn these into classes so we can have some type safety when
00068     // we go from local ID to global and vice-versa.
00069     typedef DeclID LocalDeclID;
00070     typedef DeclID GlobalDeclID;
00071 
00072     /// \brief An ID number that refers to a type in an AST file.
00073     ///
00074     /// The ID of a type is partitioned into two parts: the lower
00075     /// three bits are used to store the const/volatile/restrict
00076     /// qualifiers (as with QualType) and the upper bits provide a
00077     /// type index. The type index values are partitioned into two
00078     /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
00079     /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
00080     /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
00081     /// other types that have serialized representations.
00082     typedef uint32_t TypeID;
00083 
00084     /// \brief A type index; the type ID with the qualifier bits removed.
00085     class TypeIdx {
00086       uint32_t Idx;
00087     public:
00088       TypeIdx() : Idx(0) { }
00089       explicit TypeIdx(uint32_t index) : Idx(index) { }
00090 
00091       uint32_t getIndex() const { return Idx; }
00092       TypeID asTypeID(unsigned FastQuals) const {
00093         if (Idx == uint32_t(-1))
00094           return TypeID(-1);
00095         
00096         return (Idx << Qualifiers::FastWidth) | FastQuals;
00097       }
00098       static TypeIdx fromTypeID(TypeID ID) {
00099         if (ID == TypeID(-1))
00100           return TypeIdx(-1);
00101         
00102         return TypeIdx(ID >> Qualifiers::FastWidth);
00103       }
00104     };
00105 
00106     /// A structure for putting "fast"-unqualified QualTypes into a
00107     /// DenseMap.  This uses the standard pointer hash function.
00108     struct UnsafeQualTypeDenseMapInfo {
00109       static inline bool isEqual(QualType A, QualType B) { return A == B; }
00110       static inline QualType getEmptyKey() {
00111         return QualType::getFromOpaquePtr((void*) 1);
00112       }
00113       static inline QualType getTombstoneKey() {
00114         return QualType::getFromOpaquePtr((void*) 2);
00115       }
00116       static inline unsigned getHashValue(QualType T) {
00117         assert(!T.getLocalFastQualifiers() && 
00118                "hash invalid for types with fast quals");
00119         uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
00120         return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
00121       }
00122     };
00123 
00124     /// \brief An ID number that refers to an identifier in an AST file.
00125     typedef uint32_t IdentID;
00126 
00127     /// \brief The number of predefined identifier IDs.
00128     const unsigned int NUM_PREDEF_IDENT_IDS = 1;
00129     
00130     /// \brief An ID number that refers to an ObjC selector in an AST file.
00131     typedef uint32_t SelectorID;
00132 
00133     /// \brief The number of predefined selector IDs.
00134     const unsigned int NUM_PREDEF_SELECTOR_IDS = 1;
00135     
00136     /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an 
00137     /// AST file.
00138     typedef uint32_t CXXBaseSpecifiersID;
00139     
00140     /// \brief An ID number that refers to an entity in the detailed
00141     /// preprocessing record.
00142     typedef uint32_t PreprocessedEntityID;
00143 
00144     /// \brief An ID number that refers to a submodule in a module file.
00145     typedef uint32_t SubmoduleID;
00146     
00147     /// \brief The number of predefined submodule IDs.
00148     const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1;
00149 
00150     /// \brief Source range/offset of a preprocessed entity.
00151     struct PPEntityOffset {
00152       /// \brief Raw source location of beginning of range.
00153       unsigned Begin;
00154       /// \brief Raw source location of end of range.
00155       unsigned End;
00156       /// \brief Offset in the AST file.
00157       uint32_t BitOffset;
00158 
00159       PPEntityOffset(SourceRange R, uint32_t BitOffset)
00160         : Begin(R.getBegin().getRawEncoding()),
00161           End(R.getEnd().getRawEncoding()),
00162           BitOffset(BitOffset) { }
00163     };
00164 
00165     /// \brief Source range/offset of a preprocessed entity.
00166     struct DeclOffset {
00167       /// \brief Raw source location.
00168       unsigned Loc;
00169       /// \brief Offset in the AST file.
00170       uint32_t BitOffset;
00171 
00172       DeclOffset() : Loc(0), BitOffset(0) { }
00173       DeclOffset(SourceLocation Loc, uint32_t BitOffset)
00174         : Loc(Loc.getRawEncoding()),
00175           BitOffset(BitOffset) { }
00176       void setLocation(SourceLocation L) {
00177         Loc = L.getRawEncoding();
00178       }
00179     };
00180 
00181     /// \brief The number of predefined preprocessed entity IDs.
00182     const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1;
00183 
00184     /// \brief Describes the various kinds of blocks that occur within
00185     /// an AST file.
00186     enum BlockIDs {
00187       /// \brief The AST block, which acts as a container around the
00188       /// full AST block.
00189       AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
00190 
00191       /// \brief The block containing information about the source
00192       /// manager.
00193       SOURCE_MANAGER_BLOCK_ID,
00194 
00195       /// \brief The block containing information about the
00196       /// preprocessor.
00197       PREPROCESSOR_BLOCK_ID,
00198 
00199       /// \brief The block containing the definitions of all of the
00200       /// types and decls used within the AST file.
00201       DECLTYPES_BLOCK_ID,
00202 
00203       /// \brief The block containing DECL_UPDATES records.
00204       DECL_UPDATES_BLOCK_ID,
00205       
00206       /// \brief The block containing the detailed preprocessing record.
00207       PREPROCESSOR_DETAIL_BLOCK_ID,
00208       
00209       /// \brief The block containing the submodule structure.
00210       SUBMODULE_BLOCK_ID
00211     };
00212 
00213     /// \brief Record types that occur within the AST block itself.
00214     enum ASTRecordTypes {
00215       /// \brief Record code for the offsets of each type.
00216       ///
00217       /// The TYPE_OFFSET constant describes the record that occurs
00218       /// within the AST block. The record itself is an array of offsets that
00219       /// point into the declarations and types block (identified by 
00220       /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
00221       /// of a type. For a given type ID @c T, the lower three bits of
00222       /// @c T are its qualifiers (const, volatile, restrict), as in
00223       /// the QualType class. The upper bits, after being shifted and
00224       /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
00225       /// TYPE_OFFSET block to determine the offset of that type's
00226       /// corresponding record within the DECLTYPES_BLOCK_ID block.
00227       TYPE_OFFSET = 1,
00228 
00229       /// \brief Record code for the offsets of each decl.
00230       ///
00231       /// The DECL_OFFSET constant describes the record that occurs
00232       /// within the block identified by DECL_OFFSETS_BLOCK_ID within
00233       /// the AST block. The record itself is an array of offsets that
00234       /// point into the declarations and types block (identified by
00235       /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
00236       /// record, after subtracting one to account for the use of
00237       /// declaration ID 0 for a NULL declaration pointer. Index 0 is
00238       /// reserved for the translation unit declaration.
00239       DECL_OFFSET = 2,
00240 
00241       /// \brief Record code for the language options table.
00242       ///
00243       /// The record with this code contains the contents of the
00244       /// LangOptions structure. We serialize the entire contents of
00245       /// the structure, and let the reader decide which options are
00246       /// actually important to check.
00247       LANGUAGE_OPTIONS = 3,
00248 
00249       /// \brief AST file metadata, including the AST file version number
00250       /// and the target triple used to build the AST file.
00251       METADATA = 4,
00252 
00253       /// \brief Record code for the table of offsets of each
00254       /// identifier ID.
00255       ///
00256       /// The offset table contains offsets into the blob stored in
00257       /// the IDENTIFIER_TABLE record. Each offset points to the
00258       /// NULL-terminated string that corresponds to that identifier.
00259       IDENTIFIER_OFFSET = 5,
00260 
00261       /// \brief Record code for the identifier table.
00262       ///
00263       /// The identifier table is a simple blob that contains
00264       /// NULL-terminated strings for all of the identifiers
00265       /// referenced by the AST file. The IDENTIFIER_OFFSET table
00266       /// contains the mapping from identifier IDs to the characters
00267       /// in this blob. Note that the starting offsets of all of the
00268       /// identifiers are odd, so that, when the identifier offset
00269       /// table is loaded in, we can use the low bit to distinguish
00270       /// between offsets (for unresolved identifier IDs) and
00271       /// IdentifierInfo pointers (for already-resolved identifier
00272       /// IDs).
00273       IDENTIFIER_TABLE = 6,
00274 
00275       /// \brief Record code for the array of external definitions.
00276       ///
00277       /// The AST file contains a list of all of the unnamed external
00278       /// definitions present within the parsed headers, stored as an
00279       /// array of declaration IDs. These external definitions will be
00280       /// reported to the AST consumer after the AST file has been
00281       /// read, since their presence can affect the semantics of the
00282       /// program (e.g., for code generation).
00283       EXTERNAL_DEFINITIONS = 7,
00284 
00285       /// \brief Record code for the set of non-builtin, special
00286       /// types.
00287       ///
00288       /// This record contains the type IDs for the various type nodes
00289       /// that are constructed during semantic analysis (e.g.,
00290       /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
00291       /// offsets into this record.
00292       SPECIAL_TYPES = 8,
00293 
00294       /// \brief Record code for the extra statistics we gather while
00295       /// generating an AST file.
00296       STATISTICS = 9,
00297 
00298       /// \brief Record code for the array of tentative definitions.
00299       TENTATIVE_DEFINITIONS = 10,
00300 
00301       /// \brief Record code for the array of locally-scoped external
00302       /// declarations.
00303       LOCALLY_SCOPED_EXTERNAL_DECLS = 11,
00304 
00305       /// \brief Record code for the table of offsets into the
00306       /// Objective-C method pool.
00307       SELECTOR_OFFSETS = 12,
00308 
00309       /// \brief Record code for the Objective-C method pool,
00310       METHOD_POOL = 13,
00311 
00312       /// \brief The value of the next __COUNTER__ to dispense.
00313       /// [PP_COUNTER_VALUE, Val]
00314       PP_COUNTER_VALUE = 14,
00315 
00316       /// \brief Record code for the table of offsets into the block
00317       /// of source-location information.
00318       SOURCE_LOCATION_OFFSETS = 15,
00319 
00320       /// \brief Record code for the set of source location entries
00321       /// that need to be preloaded by the AST reader.
00322       ///
00323       /// This set contains the source location entry for the
00324       /// predefines buffer and for any file entries that need to be
00325       /// preloaded.
00326       SOURCE_LOCATION_PRELOADS = 16,
00327 
00328       /// \brief Record code for the stat() cache.
00329       STAT_CACHE = 17,
00330 
00331       /// \brief Record code for the set of ext_vector type names.
00332       EXT_VECTOR_DECLS = 18,
00333 
00334       /// \brief Record code for the original file that was used to
00335       /// generate the AST file.
00336       ORIGINAL_FILE_NAME = 19,
00337 
00338       /// \brief Record code for the file ID of the original file used to 
00339       /// generate the AST file.
00340       ORIGINAL_FILE_ID = 20,
00341       
00342       /// \brief Record code for the version control branch and revision
00343       /// information of the compiler used to build this AST file.
00344       VERSION_CONTROL_BRANCH_REVISION = 21,
00345       
00346       /// \brief Record code for the array of unused file scoped decls.
00347       UNUSED_FILESCOPED_DECLS = 22,
00348       
00349       /// \brief Record code for the table of offsets to entries in the
00350       /// preprocessing record.
00351       PPD_ENTITIES_OFFSETS = 23,
00352 
00353       /// \brief Record code for the array of VTable uses.
00354       VTABLE_USES = 24,
00355 
00356       /// \brief Record code for the array of dynamic classes.
00357       DYNAMIC_CLASSES = 25,
00358 
00359       /// \brief Record code for the list of other AST files imported by
00360       /// this AST file.
00361       IMPORTS = 26,
00362 
00363       /// \brief Record code for referenced selector pool.
00364       REFERENCED_SELECTOR_POOL = 27,
00365 
00366       /// \brief Record code for an update to the TU's lexically contained
00367       /// declarations.
00368       TU_UPDATE_LEXICAL = 28,
00369       
00370       /// \brief Record code for the array describing the locations (in the
00371       /// LOCAL_REDECLARATIONS record) of the redeclaration chains, indexed by
00372       /// the first known ID.
00373       LOCAL_REDECLARATIONS_MAP = 29,
00374 
00375       /// \brief Record code for declarations that Sema keeps references of.
00376       SEMA_DECL_REFS = 30,
00377 
00378       /// \brief Record code for weak undeclared identifiers.
00379       WEAK_UNDECLARED_IDENTIFIERS = 31,
00380 
00381       /// \brief Record code for pending implicit instantiations.
00382       PENDING_IMPLICIT_INSTANTIATIONS = 32,
00383 
00384       /// \brief Record code for a decl replacement block.
00385       ///
00386       /// If a declaration is modified after having been deserialized, and then
00387       /// written to a dependent AST file, its ID and offset must be added to
00388       /// the replacement block.
00389       DECL_REPLACEMENTS = 33,
00390 
00391       /// \brief Record code for an update to a decl context's lookup table.
00392       ///
00393       /// In practice, this should only be used for the TU and namespaces.
00394       UPDATE_VISIBLE = 34,
00395 
00396       /// \brief Record for offsets of DECL_UPDATES records for declarations
00397       /// that were modified after being deserialized and need updates.
00398       DECL_UPDATE_OFFSETS = 35,
00399 
00400       /// \brief Record of updates for a declaration that was modified after
00401       /// being deserialized.
00402       DECL_UPDATES = 36,
00403       
00404       /// \brief Record code for the table of offsets to CXXBaseSpecifier
00405       /// sets.
00406       CXX_BASE_SPECIFIER_OFFSETS = 37,
00407 
00408       /// \brief Record code for #pragma diagnostic mappings.
00409       DIAG_PRAGMA_MAPPINGS = 38,
00410 
00411       /// \brief Record code for special CUDA declarations.
00412       CUDA_SPECIAL_DECL_REFS = 39,
00413       
00414       /// \brief Record code for header search information.
00415       HEADER_SEARCH_TABLE = 40,
00416 
00417       /// \brief The directory that the PCH was originally created in.
00418       ORIGINAL_PCH_DIR = 41,
00419 
00420       /// \brief Record code for floating point #pragma options.
00421       FP_PRAGMA_OPTIONS = 42,
00422 
00423       /// \brief Record code for enabled OpenCL extensions.
00424       OPENCL_EXTENSIONS = 43,
00425 
00426       /// \brief The list of delegating constructor declarations.
00427       DELEGATING_CTORS = 44,
00428 
00429       /// \brief Record code for the table of offsets into the block
00430       /// of file source-location information.
00431       FILE_SOURCE_LOCATION_OFFSETS = 45,
00432       
00433       /// \brief Record code for the set of known namespaces, which are used
00434       /// for typo correction.
00435       KNOWN_NAMESPACES = 46,
00436 
00437       /// \brief Record code for the remapping information used to relate
00438       /// loaded modules to the various offsets and IDs(e.g., source location 
00439       /// offests, declaration and type IDs) that are used in that module to
00440       /// refer to other modules.
00441       MODULE_OFFSET_MAP = 47,
00442 
00443       /// \brief Record code for the source manager line table information,
00444       /// which stores information about #line directives.
00445       SOURCE_MANAGER_LINE_TABLE = 48,
00446 
00447       /// \brief Record code for map of Objective-C class definition IDs to the 
00448       /// ObjC categories in a module that are attached to that class.
00449       OBJC_CATEGORIES_MAP = 49,
00450 
00451       /// \brief Record code for a file sorted array of DeclIDs in a module.
00452       FILE_SORTED_DECLS = 50,
00453       
00454       /// \brief Record code for an array of all of the (sub)modules that were
00455       /// imported by the AST file.
00456       IMPORTED_MODULES = 51,
00457       
00458       /// \brief Record code for the set of merged declarations in an AST file.
00459       MERGED_DECLARATIONS = 52,
00460       
00461       /// \brief Record code for the array of redeclaration chains.
00462       ///
00463       /// This array can only be interpreted properly using the local 
00464       /// redeclarations map.
00465       LOCAL_REDECLARATIONS = 53,
00466       
00467       /// \brief Record code for the array of Objective-C categories (including
00468       /// extensions).
00469       ///
00470       /// This array can only be interpreted properly using the Objective-C
00471       /// categories map.
00472       OBJC_CATEGORIES
00473     };
00474 
00475     /// \brief Record types used within a source manager block.
00476     enum SourceManagerRecordTypes {
00477       /// \brief Describes a source location entry (SLocEntry) for a
00478       /// file.
00479       SM_SLOC_FILE_ENTRY = 1,
00480       /// \brief Describes a source location entry (SLocEntry) for a
00481       /// buffer.
00482       SM_SLOC_BUFFER_ENTRY = 2,
00483       /// \brief Describes a blob that contains the data for a buffer
00484       /// entry. This kind of record always directly follows a
00485       /// SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an
00486       /// overridden buffer.
00487       SM_SLOC_BUFFER_BLOB = 3,
00488       /// \brief Describes a source location entry (SLocEntry) for a
00489       /// macro expansion.
00490       SM_SLOC_EXPANSION_ENTRY = 4
00491     };
00492 
00493     /// \brief Record types used within a preprocessor block.
00494     enum PreprocessorRecordTypes {
00495       // The macros in the PP section are a PP_MACRO_* instance followed by a
00496       // list of PP_TOKEN instances for each token in the definition.
00497 
00498       /// \brief An object-like macro definition.
00499       /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
00500       PP_MACRO_OBJECT_LIKE = 1,
00501 
00502       /// \brief A function-like macro definition.
00503       /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs, IsGNUVarars,
00504       ///  NumArgs, ArgIdentInfoID* ]
00505       PP_MACRO_FUNCTION_LIKE = 2,
00506 
00507       /// \brief Describes one token.
00508       /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
00509       PP_TOKEN = 3
00510     };
00511 
00512     /// \brief Record types used within a preprocessor detail block.
00513     enum PreprocessorDetailRecordTypes {
00514       /// \brief Describes a macro expansion within the preprocessing record.
00515       PPD_MACRO_EXPANSION = 0,
00516       
00517       /// \brief Describes a macro definition within the preprocessing record.
00518       PPD_MACRO_DEFINITION = 1,
00519       
00520       /// \brief Describes an inclusion directive within the preprocessing
00521       /// record.
00522       PPD_INCLUSION_DIRECTIVE = 2
00523     };
00524     
00525     /// \brief Record types used within a submodule description block.
00526     enum SubmoduleRecordTypes {
00527       /// \brief Metadata for submodules as a whole.
00528       SUBMODULE_METADATA = 0,
00529       /// \brief Defines the major attributes of a submodule, including its
00530       /// name and parent.
00531       SUBMODULE_DEFINITION = 1,
00532       /// \brief Specifies the umbrella header used to create this module,
00533       /// if any.
00534       SUBMODULE_UMBRELLA_HEADER = 2,
00535       /// \brief Specifies a header that falls into this (sub)module.
00536       SUBMODULE_HEADER = 3,
00537       /// \brief Specifies an umbrella directory.
00538       SUBMODULE_UMBRELLA_DIR = 4,
00539       /// \brief Specifies the submodules that are imported by this 
00540       /// submodule.
00541       SUBMODULE_IMPORTS = 5,
00542       /// \brief Specifies the submodules that are re-exported from this 
00543       /// submodule.
00544       SUBMODULE_EXPORTS = 6,
00545       /// \brief Specifies a required feature.
00546       SUBMODULE_REQUIRES = 7
00547     };
00548     
00549     /// \defgroup ASTAST AST file AST constants
00550     ///
00551     /// The constants in this group describe various components of the
00552     /// abstract syntax tree within an AST file.
00553     ///
00554     /// @{
00555 
00556     /// \brief Predefined type IDs.
00557     ///
00558     /// These type IDs correspond to predefined types in the AST
00559     /// context, such as built-in types (int) and special place-holder
00560     /// types (the <overload> and <dependent> type markers). Such
00561     /// types are never actually serialized, since they will be built
00562     /// by the AST context when it is created.
00563     enum PredefinedTypeIDs {
00564       /// \brief The NULL type.
00565       PREDEF_TYPE_NULL_ID       = 0,
00566       /// \brief The void type.
00567       PREDEF_TYPE_VOID_ID       = 1,
00568       /// \brief The 'bool' or '_Bool' type.
00569       PREDEF_TYPE_BOOL_ID       = 2,
00570       /// \brief The 'char' type, when it is unsigned.
00571       PREDEF_TYPE_CHAR_U_ID     = 3,
00572       /// \brief The 'unsigned char' type.
00573       PREDEF_TYPE_UCHAR_ID      = 4,
00574       /// \brief The 'unsigned short' type.
00575       PREDEF_TYPE_USHORT_ID     = 5,
00576       /// \brief The 'unsigned int' type.
00577       PREDEF_TYPE_UINT_ID       = 6,
00578       /// \brief The 'unsigned long' type.
00579       PREDEF_TYPE_ULONG_ID      = 7,
00580       /// \brief The 'unsigned long long' type.
00581       PREDEF_TYPE_ULONGLONG_ID  = 8,
00582       /// \brief The 'char' type, when it is signed.
00583       PREDEF_TYPE_CHAR_S_ID     = 9,
00584       /// \brief The 'signed char' type.
00585       PREDEF_TYPE_SCHAR_ID      = 10,
00586       /// \brief The C++ 'wchar_t' type.
00587       PREDEF_TYPE_WCHAR_ID      = 11,
00588       /// \brief The (signed) 'short' type.
00589       PREDEF_TYPE_SHORT_ID      = 12,
00590       /// \brief The (signed) 'int' type.
00591       PREDEF_TYPE_INT_ID        = 13,
00592       /// \brief The (signed) 'long' type.
00593       PREDEF_TYPE_LONG_ID       = 14,
00594       /// \brief The (signed) 'long long' type.
00595       PREDEF_TYPE_LONGLONG_ID   = 15,
00596       /// \brief The 'float' type.
00597       PREDEF_TYPE_FLOAT_ID      = 16,
00598       /// \brief The 'double' type.
00599       PREDEF_TYPE_DOUBLE_ID     = 17,
00600       /// \brief The 'long double' type.
00601       PREDEF_TYPE_LONGDOUBLE_ID = 18,
00602       /// \brief The placeholder type for overloaded function sets.
00603       PREDEF_TYPE_OVERLOAD_ID   = 19,
00604       /// \brief The placeholder type for dependent types.
00605       PREDEF_TYPE_DEPENDENT_ID  = 20,
00606       /// \brief The '__uint128_t' type.
00607       PREDEF_TYPE_UINT128_ID    = 21,
00608       /// \brief The '__int128_t' type.
00609       PREDEF_TYPE_INT128_ID     = 22,
00610       /// \brief The type of 'nullptr'.
00611       PREDEF_TYPE_NULLPTR_ID    = 23,
00612       /// \brief The C++ 'char16_t' type.
00613       PREDEF_TYPE_CHAR16_ID     = 24,
00614       /// \brief The C++ 'char32_t' type.
00615       PREDEF_TYPE_CHAR32_ID     = 25,
00616       /// \brief The ObjC 'id' type.
00617       PREDEF_TYPE_OBJC_ID       = 26,
00618       /// \brief The ObjC 'Class' type.
00619       PREDEF_TYPE_OBJC_CLASS    = 27,
00620       /// \brief The ObjC 'SEL' type.
00621       PREDEF_TYPE_OBJC_SEL      = 28,
00622       /// \brief The 'unknown any' placeholder type.
00623       PREDEF_TYPE_UNKNOWN_ANY   = 29,
00624       /// \brief The placeholder type for bound member functions.
00625       PREDEF_TYPE_BOUND_MEMBER  = 30,
00626       /// \brief The "auto" deduction type.
00627       PREDEF_TYPE_AUTO_DEDUCT   = 31,
00628       /// \brief The "auto &&" deduction type.
00629       PREDEF_TYPE_AUTO_RREF_DEDUCT = 32,
00630       /// \brief The OpenCL 'half' / ARM NEON __fp16 type.
00631       PREDEF_TYPE_HALF_ID       = 33,
00632       /// \brief ARC's unbridged-cast placeholder type.
00633       PREDEF_TYPE_ARC_UNBRIDGED_CAST = 34,
00634       /// \brief The pseudo-object placeholder type.
00635       PREDEF_TYPE_PSEUDO_OBJECT = 35
00636     };
00637 
00638     /// \brief The number of predefined type IDs that are reserved for
00639     /// the PREDEF_TYPE_* constants.
00640     ///
00641     /// Type IDs for non-predefined types will start at
00642     /// NUM_PREDEF_TYPE_IDs.
00643     const unsigned NUM_PREDEF_TYPE_IDS = 100;
00644 
00645     /// \brief The number of allowed abbreviations in bits
00646     const unsigned NUM_ALLOWED_ABBREVS_SIZE = 4;
00647 
00648     /// \brief Record codes for each kind of type.
00649     ///
00650     /// These constants describe the type records that can occur within a
00651     /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
00652     /// constant describes a record for a specific type class in the
00653     /// AST.
00654     enum TypeCode {
00655       /// \brief An ExtQualType record.
00656       TYPE_EXT_QUAL                 = 1,
00657       /// \brief A ComplexType record.
00658       TYPE_COMPLEX                  = 3,
00659       /// \brief A PointerType record.
00660       TYPE_POINTER                  = 4,
00661       /// \brief A BlockPointerType record.
00662       TYPE_BLOCK_POINTER            = 5,
00663       /// \brief An LValueReferenceType record.
00664       TYPE_LVALUE_REFERENCE         = 6,
00665       /// \brief An RValueReferenceType record.
00666       TYPE_RVALUE_REFERENCE         = 7,
00667       /// \brief A MemberPointerType record.
00668       TYPE_MEMBER_POINTER           = 8,
00669       /// \brief A ConstantArrayType record.
00670       TYPE_CONSTANT_ARRAY           = 9,
00671       /// \brief An IncompleteArrayType record.
00672       TYPE_INCOMPLETE_ARRAY         = 10,
00673       /// \brief A VariableArrayType record.
00674       TYPE_VARIABLE_ARRAY           = 11,
00675       /// \brief A VectorType record.
00676       TYPE_VECTOR                   = 12,
00677       /// \brief An ExtVectorType record.
00678       TYPE_EXT_VECTOR               = 13,
00679       /// \brief A FunctionNoProtoType record.
00680       TYPE_FUNCTION_NO_PROTO        = 14,
00681       /// \brief A FunctionProtoType record.
00682       TYPE_FUNCTION_PROTO           = 15,
00683       /// \brief A TypedefType record.
00684       TYPE_TYPEDEF                  = 16,
00685       /// \brief A TypeOfExprType record.
00686       TYPE_TYPEOF_EXPR              = 17,
00687       /// \brief A TypeOfType record.
00688       TYPE_TYPEOF                   = 18,
00689       /// \brief A RecordType record.
00690       TYPE_RECORD                   = 19,
00691       /// \brief An EnumType record.
00692       TYPE_ENUM                     = 20,
00693       /// \brief An ObjCInterfaceType record.
00694       TYPE_OBJC_INTERFACE           = 21,
00695       /// \brief An ObjCObjectPointerType record.
00696       TYPE_OBJC_OBJECT_POINTER      = 22,
00697       /// \brief a DecltypeType record.
00698       TYPE_DECLTYPE                 = 23,
00699       /// \brief An ElaboratedType record.
00700       TYPE_ELABORATED               = 24,
00701       /// \brief A SubstTemplateTypeParmType record.
00702       TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
00703       /// \brief An UnresolvedUsingType record.
00704       TYPE_UNRESOLVED_USING         = 26,
00705       /// \brief An InjectedClassNameType record.
00706       TYPE_INJECTED_CLASS_NAME      = 27,
00707       /// \brief An ObjCObjectType record.
00708       TYPE_OBJC_OBJECT              = 28,
00709       /// \brief An TemplateTypeParmType record.
00710       TYPE_TEMPLATE_TYPE_PARM       = 29,
00711       /// \brief An TemplateSpecializationType record.
00712       TYPE_TEMPLATE_SPECIALIZATION  = 30,
00713       /// \brief A DependentNameType record.
00714       TYPE_DEPENDENT_NAME           = 31,
00715       /// \brief A DependentTemplateSpecializationType record.
00716       TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
00717       /// \brief A DependentSizedArrayType record.
00718       TYPE_DEPENDENT_SIZED_ARRAY    = 33,
00719       /// \brief A ParenType record.
00720       TYPE_PAREN                    = 34,
00721       /// \brief A PackExpansionType record.
00722       TYPE_PACK_EXPANSION           = 35,
00723       /// \brief An AttributedType record.
00724       TYPE_ATTRIBUTED               = 36,
00725       /// \brief A SubstTemplateTypeParmPackType record.
00726       TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
00727       /// \brief A AutoType record.
00728       TYPE_AUTO                  = 38,
00729       /// \brief A UnaryTransformType record.
00730       TYPE_UNARY_TRANSFORM       = 39,
00731       /// \brief An AtomicType record.
00732       TYPE_ATOMIC                = 40
00733     };
00734 
00735     /// \brief The type IDs for special types constructed by semantic
00736     /// analysis.
00737     ///
00738     /// The constants in this enumeration are indices into the
00739     /// SPECIAL_TYPES record.
00740     enum SpecialTypeIDs {
00741       /// \brief __builtin_va_list
00742       SPECIAL_TYPE_BUILTIN_VA_LIST             = 0,
00743       /// \brief CFConstantString type
00744       SPECIAL_TYPE_CF_CONSTANT_STRING          = 1,
00745       /// \brief C FILE typedef type
00746       SPECIAL_TYPE_FILE                        = 2,
00747       /// \brief C jmp_buf typedef type
00748       SPECIAL_TYPE_JMP_BUF                     = 3,
00749       /// \brief C sigjmp_buf typedef type
00750       SPECIAL_TYPE_SIGJMP_BUF                  = 4,
00751       /// \brief Objective-C "id" redefinition type
00752       SPECIAL_TYPE_OBJC_ID_REDEFINITION        = 5,
00753       /// \brief Objective-C "Class" redefinition type
00754       SPECIAL_TYPE_OBJC_CLASS_REDEFINITION     = 6,
00755       /// \brief Objective-C "SEL" redefinition type
00756       SPECIAL_TYPE_OBJC_SEL_REDEFINITION       = 7,
00757       /// \brief C ucontext_t typedef type
00758       SPECIAL_TYPE_UCONTEXT_T                  = 8
00759     };
00760     
00761     /// \brief The number of special type IDs.
00762     const unsigned NumSpecialTypeIDs = 9;
00763 
00764     /// \brief Predefined declaration IDs.
00765     ///
00766     /// These declaration IDs correspond to predefined declarations in the AST
00767     /// context, such as the NULL declaration ID. Such declarations are never
00768     /// actually serialized, since they will be built by the AST context when 
00769     /// it is created.
00770     enum PredefinedDeclIDs {
00771       /// \brief The NULL declaration.
00772       PREDEF_DECL_NULL_ID       = 0,
00773       
00774       /// \brief The translation unit.
00775       PREDEF_DECL_TRANSLATION_UNIT_ID = 1,
00776       
00777       /// \brief The Objective-C 'id' type.
00778       PREDEF_DECL_OBJC_ID_ID = 2,
00779       
00780       /// \brief The Objective-C 'SEL' type.
00781       PREDEF_DECL_OBJC_SEL_ID = 3,
00782       
00783       /// \brief The Objective-C 'Class' type.
00784       PREDEF_DECL_OBJC_CLASS_ID = 4,
00785             
00786       /// \brief The Objective-C 'Protocol' type.
00787       PREDEF_DECL_OBJC_PROTOCOL_ID = 5,
00788       
00789       /// \brief The signed 128-bit integer type.
00790       PREDEF_DECL_INT_128_ID = 6,
00791 
00792       /// \brief The unsigned 128-bit integer type.
00793       PREDEF_DECL_UNSIGNED_INT_128_ID = 7,
00794       
00795       /// \brief The internal 'instancetype' typedef.
00796       PREDEF_DECL_OBJC_INSTANCETYPE_ID = 8
00797     };
00798 
00799     /// \brief The number of declaration IDs that are predefined.
00800     ///
00801     /// For more information about predefined declarations, see the
00802     /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants.
00803     const unsigned int NUM_PREDEF_DECL_IDS = 9;
00804     
00805     /// \brief Record codes for each kind of declaration.
00806     ///
00807     /// These constants describe the declaration records that can occur within
00808     /// a declarations block (identified by DECLS_BLOCK_ID). Each
00809     /// constant describes a record for a specific declaration class
00810     /// in the AST.
00811     enum DeclCode {
00812       /// \brief A TypedefDecl record.
00813       DECL_TYPEDEF = 51,
00814       /// \brief A TypeAliasDecl record.
00815       DECL_TYPEALIAS,
00816       /// \brief An EnumDecl record.
00817       DECL_ENUM,
00818       /// \brief A RecordDecl record.
00819       DECL_RECORD,
00820       /// \brief An EnumConstantDecl record.
00821       DECL_ENUM_CONSTANT,
00822       /// \brief A FunctionDecl record.
00823       DECL_FUNCTION,
00824       /// \brief A ObjCMethodDecl record.
00825       DECL_OBJC_METHOD,
00826       /// \brief A ObjCInterfaceDecl record.
00827       DECL_OBJC_INTERFACE,
00828       /// \brief A ObjCProtocolDecl record.
00829       DECL_OBJC_PROTOCOL,
00830       /// \brief A ObjCIvarDecl record.
00831       DECL_OBJC_IVAR,
00832       /// \brief A ObjCAtDefsFieldDecl record.
00833       DECL_OBJC_AT_DEFS_FIELD,
00834       /// \brief A ObjCCategoryDecl record.
00835       DECL_OBJC_CATEGORY,
00836       /// \brief A ObjCCategoryImplDecl record.
00837       DECL_OBJC_CATEGORY_IMPL,
00838       /// \brief A ObjCImplementationDecl record.
00839       DECL_OBJC_IMPLEMENTATION,
00840       /// \brief A ObjCCompatibleAliasDecl record.
00841       DECL_OBJC_COMPATIBLE_ALIAS,
00842       /// \brief A ObjCPropertyDecl record.
00843       DECL_OBJC_PROPERTY,
00844       /// \brief A ObjCPropertyImplDecl record.
00845       DECL_OBJC_PROPERTY_IMPL,
00846       /// \brief A FieldDecl record.
00847       DECL_FIELD,
00848       /// \brief A VarDecl record.
00849       DECL_VAR,
00850       /// \brief An ImplicitParamDecl record.
00851       DECL_IMPLICIT_PARAM,
00852       /// \brief A ParmVarDecl record.
00853       DECL_PARM_VAR,
00854       /// \brief A FileScopeAsmDecl record.
00855       DECL_FILE_SCOPE_ASM,
00856       /// \brief A BlockDecl record.
00857       DECL_BLOCK,
00858       /// \brief A record that stores the set of declarations that are
00859       /// lexically stored within a given DeclContext.
00860       ///
00861       /// The record itself is a blob that is an array of declaration IDs,
00862       /// in the order in which those declarations were added to the
00863       /// declaration context. This data is used when iterating over
00864       /// the contents of a DeclContext, e.g., via
00865       /// DeclContext::decls_begin()/DeclContext::decls_end().
00866       DECL_CONTEXT_LEXICAL,
00867       /// \brief A record that stores the set of declarations that are
00868       /// visible from a given DeclContext.
00869       ///
00870       /// The record itself stores a set of mappings, each of which
00871       /// associates a declaration name with one or more declaration
00872       /// IDs. This data is used when performing qualified name lookup
00873       /// into a DeclContext via DeclContext::lookup.
00874       DECL_CONTEXT_VISIBLE,
00875       /// \brief A LabelDecl record.
00876       DECL_LABEL,
00877       /// \brief A NamespaceDecl record.
00878       DECL_NAMESPACE,
00879       /// \brief A NamespaceAliasDecl record.
00880       DECL_NAMESPACE_ALIAS,
00881       /// \brief A UsingDecl record.
00882       DECL_USING,
00883       /// \brief A UsingShadowDecl record.
00884       DECL_USING_SHADOW,
00885       /// \brief A UsingDirecitveDecl record.
00886       DECL_USING_DIRECTIVE,
00887       /// \brief An UnresolvedUsingValueDecl record.
00888       DECL_UNRESOLVED_USING_VALUE,
00889       /// \brief An UnresolvedUsingTypenameDecl record.
00890       DECL_UNRESOLVED_USING_TYPENAME,
00891       /// \brief A LinkageSpecDecl record.
00892       DECL_LINKAGE_SPEC,
00893       /// \brief A CXXRecordDecl record.
00894       DECL_CXX_RECORD,
00895       /// \brief A CXXMethodDecl record.
00896       DECL_CXX_METHOD,
00897       /// \brief A CXXConstructorDecl record.
00898       DECL_CXX_CONSTRUCTOR,
00899       /// \brief A CXXDestructorDecl record.
00900       DECL_CXX_DESTRUCTOR,
00901       /// \brief A CXXConversionDecl record.
00902       DECL_CXX_CONVERSION,
00903       /// \brief An AccessSpecDecl record.
00904       DECL_ACCESS_SPEC,
00905 
00906       /// \brief A FriendDecl record.
00907       DECL_FRIEND,
00908       /// \brief A FriendTemplateDecl record.
00909       DECL_FRIEND_TEMPLATE,
00910       /// \brief A ClassTemplateDecl record.
00911       DECL_CLASS_TEMPLATE,
00912       /// \brief A ClassTemplateSpecializationDecl record.
00913       DECL_CLASS_TEMPLATE_SPECIALIZATION,
00914       /// \brief A ClassTemplatePartialSpecializationDecl record.
00915       DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
00916       /// \brief A FunctionTemplateDecl record.
00917       DECL_FUNCTION_TEMPLATE,
00918       /// \brief A TemplateTypeParmDecl record.
00919       DECL_TEMPLATE_TYPE_PARM,
00920       /// \brief A NonTypeTemplateParmDecl record.
00921       DECL_NON_TYPE_TEMPLATE_PARM,
00922       /// \brief A TemplateTemplateParmDecl record.
00923       DECL_TEMPLATE_TEMPLATE_PARM,
00924       /// \brief A TypeAliasTemplateDecl record.
00925       DECL_TYPE_ALIAS_TEMPLATE,
00926       /// \brief A StaticAssertDecl record.
00927       DECL_STATIC_ASSERT,
00928       /// \brief A record containing CXXBaseSpecifiers.
00929       DECL_CXX_BASE_SPECIFIERS,
00930       /// \brief A IndirectFieldDecl record.
00931       DECL_INDIRECTFIELD,
00932       /// \brief A NonTypeTemplateParmDecl record that stores an expanded
00933       /// non-type template parameter pack.
00934       DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK,
00935       /// \brief A ClassScopeFunctionSpecializationDecl record a class scope
00936       /// function specialization. (Microsoft extension).
00937       DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION,
00938       /// \brief An ImportDecl recording a module import.
00939       DECL_IMPORT
00940     };
00941 
00942     /// \brief Record codes for each kind of statement or expression.
00943     ///
00944     /// These constants describe the records that describe statements
00945     /// or expressions. These records  occur within type and declarations
00946     /// block, so they begin with record values of 100.  Each constant 
00947     /// describes a record for a specific statement or expression class in the
00948     /// AST.
00949     enum StmtCode {
00950       /// \brief A marker record that indicates that we are at the end
00951       /// of an expression.
00952       STMT_STOP = 100,
00953       /// \brief A NULL expression.
00954       STMT_NULL_PTR,
00955       /// \brief A reference to a previously [de]serialized Stmt record.
00956       STMT_REF_PTR,
00957       /// \brief A NullStmt record.
00958       STMT_NULL,
00959       /// \brief A CompoundStmt record.
00960       STMT_COMPOUND,
00961       /// \brief A CaseStmt record.
00962       STMT_CASE,
00963       /// \brief A DefaultStmt record.
00964       STMT_DEFAULT,
00965       /// \brief A LabelStmt record.
00966       STMT_LABEL,
00967       /// \brief An AttributedStmt record.
00968       STMT_ATTRIBUTED,
00969       /// \brief An IfStmt record.
00970       STMT_IF,
00971       /// \brief A SwitchStmt record.
00972       STMT_SWITCH,
00973       /// \brief A WhileStmt record.
00974       STMT_WHILE,
00975       /// \brief A DoStmt record.
00976       STMT_DO,
00977       /// \brief A ForStmt record.
00978       STMT_FOR,
00979       /// \brief A GotoStmt record.
00980       STMT_GOTO,
00981       /// \brief An IndirectGotoStmt record.
00982       STMT_INDIRECT_GOTO,
00983       /// \brief A ContinueStmt record.
00984       STMT_CONTINUE,
00985       /// \brief A BreakStmt record.
00986       STMT_BREAK,
00987       /// \brief A ReturnStmt record.
00988       STMT_RETURN,
00989       /// \brief A DeclStmt record.
00990       STMT_DECL,
00991       /// \brief An AsmStmt record.
00992       STMT_ASM,
00993       /// \brief A PredefinedExpr record.
00994       EXPR_PREDEFINED,
00995       /// \brief A DeclRefExpr record.
00996       EXPR_DECL_REF,
00997       /// \brief An IntegerLiteral record.
00998       EXPR_INTEGER_LITERAL,
00999       /// \brief A FloatingLiteral record.
01000       EXPR_FLOATING_LITERAL,
01001       /// \brief An ImaginaryLiteral record.
01002       EXPR_IMAGINARY_LITERAL,
01003       /// \brief A StringLiteral record.
01004       EXPR_STRING_LITERAL,
01005       /// \brief A CharacterLiteral record.
01006       EXPR_CHARACTER_LITERAL,
01007       /// \brief A ParenExpr record.
01008       EXPR_PAREN,
01009       /// \brief A ParenListExpr record.
01010       EXPR_PAREN_LIST,
01011       /// \brief A UnaryOperator record.
01012       EXPR_UNARY_OPERATOR,
01013       /// \brief An OffsetOfExpr record.
01014       EXPR_OFFSETOF,
01015       /// \brief A SizefAlignOfExpr record.
01016       EXPR_SIZEOF_ALIGN_OF,
01017       /// \brief An ArraySubscriptExpr record.
01018       EXPR_ARRAY_SUBSCRIPT,
01019       /// \brief A CallExpr record.
01020       EXPR_CALL,
01021       /// \brief A MemberExpr record.
01022       EXPR_MEMBER,
01023       /// \brief A BinaryOperator record.
01024       EXPR_BINARY_OPERATOR,
01025       /// \brief A CompoundAssignOperator record.
01026       EXPR_COMPOUND_ASSIGN_OPERATOR,
01027       /// \brief A ConditionOperator record.
01028       EXPR_CONDITIONAL_OPERATOR,
01029       /// \brief An ImplicitCastExpr record.
01030       EXPR_IMPLICIT_CAST,
01031       /// \brief A CStyleCastExpr record.
01032       EXPR_CSTYLE_CAST,
01033       /// \brief A CompoundLiteralExpr record.
01034       EXPR_COMPOUND_LITERAL,
01035       /// \brief An ExtVectorElementExpr record.
01036       EXPR_EXT_VECTOR_ELEMENT,
01037       /// \brief An InitListExpr record.
01038       EXPR_INIT_LIST,
01039       /// \brief A DesignatedInitExpr record.
01040       EXPR_DESIGNATED_INIT,
01041       /// \brief An ImplicitValueInitExpr record.
01042       EXPR_IMPLICIT_VALUE_INIT,
01043       /// \brief A VAArgExpr record.
01044       EXPR_VA_ARG,
01045       /// \brief An AddrLabelExpr record.
01046       EXPR_ADDR_LABEL,
01047       /// \brief A StmtExpr record.
01048       EXPR_STMT,
01049       /// \brief A ChooseExpr record.
01050       EXPR_CHOOSE,
01051       /// \brief A GNUNullExpr record.
01052       EXPR_GNU_NULL,
01053       /// \brief A ShuffleVectorExpr record.
01054       EXPR_SHUFFLE_VECTOR,
01055       /// \brief BlockExpr
01056       EXPR_BLOCK,
01057       /// \brief A GenericSelectionExpr record.
01058       EXPR_GENERIC_SELECTION,
01059       /// \brief A PseudoObjectExpr record.
01060       EXPR_PSEUDO_OBJECT,
01061       /// \brief An AtomicExpr record.
01062       EXPR_ATOMIC,
01063 
01064       // Objective-C
01065 
01066       /// \brief An ObjCStringLiteral record.
01067       EXPR_OBJC_STRING_LITERAL,
01068 
01069       EXPR_OBJC_BOXED_EXPRESSION,
01070       EXPR_OBJC_ARRAY_LITERAL,
01071       EXPR_OBJC_DICTIONARY_LITERAL,
01072 
01073     
01074       /// \brief An ObjCEncodeExpr record.
01075       EXPR_OBJC_ENCODE,
01076       /// \brief An ObjCSelectorExpr record.
01077       EXPR_OBJC_SELECTOR_EXPR,
01078       /// \brief An ObjCProtocolExpr record.
01079       EXPR_OBJC_PROTOCOL_EXPR,
01080       /// \brief An ObjCIvarRefExpr record.
01081       EXPR_OBJC_IVAR_REF_EXPR,
01082       /// \brief An ObjCPropertyRefExpr record.
01083       EXPR_OBJC_PROPERTY_REF_EXPR,
01084       /// \brief An ObjCSubscriptRefExpr record.
01085       EXPR_OBJC_SUBSCRIPT_REF_EXPR,
01086       /// \brief UNUSED
01087       EXPR_OBJC_KVC_REF_EXPR,
01088       /// \brief An ObjCMessageExpr record.
01089       EXPR_OBJC_MESSAGE_EXPR,
01090       /// \brief An ObjCIsa Expr record.
01091       EXPR_OBJC_ISA,
01092       /// \breif An ObjCIndirectCopyRestoreExpr record.
01093       EXPR_OBJC_INDIRECT_COPY_RESTORE,
01094 
01095       /// \brief An ObjCForCollectionStmt record.
01096       STMT_OBJC_FOR_COLLECTION,
01097       /// \brief An ObjCAtCatchStmt record.
01098       STMT_OBJC_CATCH,
01099       /// \brief An ObjCAtFinallyStmt record.
01100       STMT_OBJC_FINALLY,
01101       /// \brief An ObjCAtTryStmt record.
01102       STMT_OBJC_AT_TRY,
01103       /// \brief An ObjCAtSynchronizedStmt record.
01104       STMT_OBJC_AT_SYNCHRONIZED,
01105       /// \brief An ObjCAtThrowStmt record.
01106       STMT_OBJC_AT_THROW,
01107       /// \brief An ObjCAutoreleasePoolStmt record.
01108       STMT_OBJC_AUTORELEASE_POOL,
01109       /// \brief A ObjCBoolLiteralExpr record.
01110       EXPR_OBJC_BOOL_LITERAL,
01111 
01112       // C++
01113       
01114       /// \brief A CXXCatchStmt record.
01115       STMT_CXX_CATCH,
01116       /// \brief A CXXTryStmt record.
01117       STMT_CXX_TRY,
01118       /// \brief A CXXForRangeStmt record.
01119       STMT_CXX_FOR_RANGE,
01120 
01121       /// \brief A CXXOperatorCallExpr record.
01122       EXPR_CXX_OPERATOR_CALL,
01123       /// \brief A CXXMemberCallExpr record.
01124       EXPR_CXX_MEMBER_CALL,
01125       /// \brief A CXXConstructExpr record.
01126       EXPR_CXX_CONSTRUCT,
01127       /// \brief A CXXTemporaryObjectExpr record.
01128       EXPR_CXX_TEMPORARY_OBJECT,
01129       /// \brief A CXXStaticCastExpr record.
01130       EXPR_CXX_STATIC_CAST,
01131       /// \brief A CXXDynamicCastExpr record.
01132       EXPR_CXX_DYNAMIC_CAST,
01133       /// \brief A CXXReinterpretCastExpr record.
01134       EXPR_CXX_REINTERPRET_CAST,
01135       /// \brief A CXXConstCastExpr record.
01136       EXPR_CXX_CONST_CAST,
01137       /// \brief A CXXFunctionalCastExpr record.
01138       EXPR_CXX_FUNCTIONAL_CAST,
01139       /// \brief A UserDefinedLiteral record.
01140       EXPR_USER_DEFINED_LITERAL,
01141       /// \brief A CXXBoolLiteralExpr record.
01142       EXPR_CXX_BOOL_LITERAL,
01143       EXPR_CXX_NULL_PTR_LITERAL,  // CXXNullPtrLiteralExpr
01144       EXPR_CXX_TYPEID_EXPR,       // CXXTypeidExpr (of expr).
01145       EXPR_CXX_TYPEID_TYPE,       // CXXTypeidExpr (of type).
01146       EXPR_CXX_THIS,              // CXXThisExpr
01147       EXPR_CXX_THROW,             // CXXThrowExpr
01148       EXPR_CXX_DEFAULT_ARG,       // CXXDefaultArgExpr
01149       EXPR_CXX_BIND_TEMPORARY,    // CXXBindTemporaryExpr
01150 
01151       EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
01152       EXPR_CXX_NEW,               // CXXNewExpr
01153       EXPR_CXX_DELETE,            // CXXDeleteExpr
01154       EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
01155       
01156       EXPR_EXPR_WITH_CLEANUPS,    // ExprWithCleanups
01157       
01158       EXPR_CXX_DEPENDENT_SCOPE_MEMBER,   // CXXDependentScopeMemberExpr
01159       EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
01160       EXPR_CXX_UNRESOLVED_CONSTRUCT,     // CXXUnresolvedConstructExpr
01161       EXPR_CXX_UNRESOLVED_MEMBER,        // UnresolvedMemberExpr
01162       EXPR_CXX_UNRESOLVED_LOOKUP,        // UnresolvedLookupExpr
01163 
01164       EXPR_CXX_UNARY_TYPE_TRAIT,  // UnaryTypeTraitExpr
01165       EXPR_CXX_EXPRESSION_TRAIT,  // ExpressionTraitExpr
01166       EXPR_CXX_NOEXCEPT,          // CXXNoexceptExpr
01167 
01168       EXPR_OPAQUE_VALUE,          // OpaqueValueExpr
01169       EXPR_BINARY_CONDITIONAL_OPERATOR,  // BinaryConditionalOperator
01170       EXPR_BINARY_TYPE_TRAIT,     // BinaryTypeTraitExpr
01171       EXPR_TYPE_TRAIT,            // TypeTraitExpr
01172       EXPR_ARRAY_TYPE_TRAIT,      // ArrayTypeTraitIntExpr
01173       
01174       EXPR_PACK_EXPANSION,        // PackExpansionExpr
01175       EXPR_SIZEOF_PACK,           // SizeOfPackExpr
01176       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr
01177       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
01178       EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr
01179       
01180       // CUDA
01181       EXPR_CUDA_KERNEL_CALL,       // CUDAKernelCallExpr      
01182 
01183       // OpenCL
01184       EXPR_ASTYPE,                 // AsTypeExpr
01185 
01186       // Microsoft
01187       EXPR_CXX_UUIDOF_EXPR,       // CXXUuidofExpr (of expr).
01188       EXPR_CXX_UUIDOF_TYPE,       // CXXUuidofExpr (of type).
01189       STMT_SEH_EXCEPT,            // SEHExceptStmt
01190       STMT_SEH_FINALLY,           // SEHFinallyStmt
01191       STMT_SEH_TRY,               // SEHTryStmt
01192       
01193       // ARC
01194       EXPR_OBJC_BRIDGED_CAST,     // ObjCBridgedCastExpr
01195       
01196       STMT_MS_DEPENDENT_EXISTS,   // MSDependentExistsStmt
01197       EXPR_LAMBDA                 // LambdaExpr
01198     };
01199 
01200     /// \brief The kinds of designators that can occur in a
01201     /// DesignatedInitExpr.
01202     enum DesignatorTypes {
01203       /// \brief Field designator where only the field name is known.
01204       DESIG_FIELD_NAME  = 0,
01205       /// \brief Field designator where the field has been resolved to
01206       /// a declaration.
01207       DESIG_FIELD_DECL  = 1,
01208       /// \brief Array designator.
01209       DESIG_ARRAY       = 2,
01210       /// \brief GNU array range designator.
01211       DESIG_ARRAY_RANGE = 3
01212     };
01213 
01214     /// \brief The different kinds of data that can occur in a
01215     /// CtorInitializer.
01216     enum CtorInitializerType {
01217       CTOR_INITIALIZER_BASE,
01218       CTOR_INITIALIZER_DELEGATING,
01219       CTOR_INITIALIZER_MEMBER,
01220       CTOR_INITIALIZER_INDIRECT_MEMBER
01221     };
01222 
01223     /// \brief Describes the redeclarations of a declaration.
01224     struct LocalRedeclarationsInfo {
01225       DeclID FirstID;      // The ID of the first declaration
01226       unsigned Offset;     // Offset into the array of redeclaration chains.
01227       
01228       friend bool operator<(const LocalRedeclarationsInfo &X,
01229                             const LocalRedeclarationsInfo &Y) {
01230         return X.FirstID < Y.FirstID;
01231       }
01232       
01233       friend bool operator>(const LocalRedeclarationsInfo &X,
01234                             const LocalRedeclarationsInfo &Y) {
01235         return X.FirstID > Y.FirstID;
01236       }
01237       
01238       friend bool operator<=(const LocalRedeclarationsInfo &X,
01239                              const LocalRedeclarationsInfo &Y) {
01240         return X.FirstID <= Y.FirstID;
01241       }
01242       
01243       friend bool operator>=(const LocalRedeclarationsInfo &X,
01244                              const LocalRedeclarationsInfo &Y) {
01245         return X.FirstID >= Y.FirstID;
01246       }
01247     };
01248 
01249     /// \brief Describes the categories of an Objective-C class.
01250     struct ObjCCategoriesInfo {
01251       DeclID DefinitionID; // The ID of the definition
01252       unsigned Offset;     // Offset into the array of category lists.
01253       
01254       friend bool operator<(const ObjCCategoriesInfo &X,
01255                             const ObjCCategoriesInfo &Y) {
01256         return X.DefinitionID < Y.DefinitionID;
01257       }
01258       
01259       friend bool operator>(const ObjCCategoriesInfo &X,
01260                             const ObjCCategoriesInfo &Y) {
01261         return X.DefinitionID > Y.DefinitionID;
01262       }
01263       
01264       friend bool operator<=(const ObjCCategoriesInfo &X,
01265                              const ObjCCategoriesInfo &Y) {
01266         return X.DefinitionID <= Y.DefinitionID;
01267       }
01268       
01269       friend bool operator>=(const ObjCCategoriesInfo &X,
01270                              const ObjCCategoriesInfo &Y) {
01271         return X.DefinitionID >= Y.DefinitionID;
01272       }
01273     };
01274 
01275     /// @}
01276   }
01277 } // end namespace clang
01278 
01279 #endif