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_SERIALIZATION_ASTBITCODES_H
00018 #define LLVM_CLANG_SERIALIZATION_ASTBITCODES_H
00019 
00020 #include "clang/AST/Type.h"
00021 #include "llvm/ADT/DenseMap.h"
00022 #include "llvm/Bitcode/BitCodes.h"
00023 #include "llvm/Support/DataTypes.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 = 5;
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 a macro in an AST file.
00131     typedef uint32_t MacroID;
00132 
00133     /// \brief A global ID number that refers to a macro in an AST file.
00134     typedef uint32_t GlobalMacroID;
00135 
00136     /// \brief A local to a module ID number that refers to a macro in an
00137     /// AST file.
00138     typedef uint32_t LocalMacroID;
00139 
00140     /// \brief The number of predefined macro IDs.
00141     const unsigned int NUM_PREDEF_MACRO_IDS = 1;
00142 
00143     /// \brief An ID number that refers to an ObjC selector in an AST file.
00144     typedef uint32_t SelectorID;
00145 
00146     /// \brief The number of predefined selector IDs.
00147     const unsigned int NUM_PREDEF_SELECTOR_IDS = 1;
00148     
00149     /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an 
00150     /// AST file.
00151     typedef uint32_t CXXBaseSpecifiersID;
00152     
00153     /// \brief An ID number that refers to an entity in the detailed
00154     /// preprocessing record.
00155     typedef uint32_t PreprocessedEntityID;
00156 
00157     /// \brief An ID number that refers to a submodule in a module file.
00158     typedef uint32_t SubmoduleID;
00159     
00160     /// \brief The number of predefined submodule IDs.
00161     const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1;
00162 
00163     /// \brief Source range/offset of a preprocessed entity.
00164     struct PPEntityOffset {
00165       /// \brief Raw source location of beginning of range.
00166       unsigned Begin;
00167       /// \brief Raw source location of end of range.
00168       unsigned End;
00169       /// \brief Offset in the AST file.
00170       uint32_t BitOffset;
00171 
00172       PPEntityOffset(SourceRange R, uint32_t BitOffset)
00173         : Begin(R.getBegin().getRawEncoding()),
00174           End(R.getEnd().getRawEncoding()),
00175           BitOffset(BitOffset) { }
00176     };
00177 
00178     /// \brief Source range/offset of a preprocessed entity.
00179     struct DeclOffset {
00180       /// \brief Raw source location.
00181       unsigned Loc;
00182       /// \brief Offset in the AST file.
00183       uint32_t BitOffset;
00184 
00185       DeclOffset() : Loc(0), BitOffset(0) { }
00186       DeclOffset(SourceLocation Loc, uint32_t BitOffset)
00187         : Loc(Loc.getRawEncoding()),
00188           BitOffset(BitOffset) { }
00189       void setLocation(SourceLocation L) {
00190         Loc = L.getRawEncoding();
00191       }
00192     };
00193 
00194     /// \brief The number of predefined preprocessed entity IDs.
00195     const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1;
00196 
00197     /// \brief Describes the various kinds of blocks that occur within
00198     /// an AST file.
00199     enum BlockIDs {
00200       /// \brief The AST block, which acts as a container around the
00201       /// full AST block.
00202       AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
00203 
00204       /// \brief The block containing information about the source
00205       /// manager.
00206       SOURCE_MANAGER_BLOCK_ID,
00207 
00208       /// \brief The block containing information about the
00209       /// preprocessor.
00210       PREPROCESSOR_BLOCK_ID,
00211 
00212       /// \brief The block containing the definitions of all of the
00213       /// types and decls used within the AST file.
00214       DECLTYPES_BLOCK_ID,
00215 
00216       /// \brief The block containing the detailed preprocessing record.
00217       PREPROCESSOR_DETAIL_BLOCK_ID,
00218       
00219       /// \brief The block containing the submodule structure.
00220       SUBMODULE_BLOCK_ID,
00221 
00222       /// \brief The block containing comments.
00223       COMMENTS_BLOCK_ID,
00224 
00225       /// \brief The control block, which contains all of the
00226       /// information that needs to be validated prior to committing
00227       /// to loading the AST file.
00228       CONTROL_BLOCK_ID,
00229 
00230       /// \brief The block of input files, which were used as inputs
00231       /// to create this AST file.
00232       ///
00233       /// This block is part of the control block.
00234       INPUT_FILES_BLOCK_ID
00235     };
00236 
00237     /// \brief Record types that occur within the control block.
00238     enum ControlRecordTypes {
00239       /// \brief AST file metadata, including the AST file version number
00240       /// and information about the compiler used to build this AST file.
00241       METADATA = 1,
00242 
00243       /// \brief Record code for the list of other AST files imported by
00244       /// this AST file.
00245       IMPORTS = 2,
00246 
00247       /// \brief Record code for the language options table.
00248       ///
00249       /// The record with this code contains the contents of the
00250       /// LangOptions structure. We serialize the entire contents of
00251       /// the structure, and let the reader decide which options are
00252       /// actually important to check.
00253       LANGUAGE_OPTIONS = 3,
00254 
00255       /// \brief Record code for the target options table.
00256       TARGET_OPTIONS = 4,
00257 
00258       /// \brief Record code for the original file that was used to
00259       /// generate the AST file, including both its file ID and its
00260       /// name.
00261       ORIGINAL_FILE = 5,
00262       
00263       /// \brief The directory that the PCH was originally created in.
00264       ORIGINAL_PCH_DIR = 6,
00265 
00266       /// \brief Record code for file ID of the file or buffer that was used to
00267       /// generate the AST file.
00268       ORIGINAL_FILE_ID = 7,
00269 
00270       /// \brief Offsets into the input-files block where input files
00271       /// reside.
00272       INPUT_FILE_OFFSETS = 8,
00273 
00274       /// \brief Record code for the diagnostic options table.
00275       DIAGNOSTIC_OPTIONS = 9,
00276 
00277       /// \brief Record code for the filesystem options table.
00278       FILE_SYSTEM_OPTIONS = 10,
00279 
00280       /// \brief Record code for the headers search options table.
00281       HEADER_SEARCH_OPTIONS = 11,
00282 
00283       /// \brief Record code for the preprocessor options table.
00284       PREPROCESSOR_OPTIONS = 12,
00285 
00286       /// \brief Record code for the module name.
00287       MODULE_NAME = 13,
00288 
00289       /// \brief Record code for the module map file that was used to build this
00290       /// AST file.
00291       MODULE_MAP_FILE = 14,
00292 
00293       /// \brief Record code for the signature that identifiers this AST file.
00294       SIGNATURE = 15
00295     };
00296 
00297     /// \brief Record types that occur within the input-files block
00298     /// inside the control block.
00299     enum InputFileRecordTypes {
00300       /// \brief An input file.
00301       INPUT_FILE = 1
00302     };
00303 
00304     /// \brief Record types that occur within the AST block itself.
00305     enum ASTRecordTypes {
00306       /// \brief Record code for the offsets of each type.
00307       ///
00308       /// The TYPE_OFFSET constant describes the record that occurs
00309       /// within the AST block. The record itself is an array of offsets that
00310       /// point into the declarations and types block (identified by 
00311       /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
00312       /// of a type. For a given type ID @c T, the lower three bits of
00313       /// @c T are its qualifiers (const, volatile, restrict), as in
00314       /// the QualType class. The upper bits, after being shifted and
00315       /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
00316       /// TYPE_OFFSET block to determine the offset of that type's
00317       /// corresponding record within the DECLTYPES_BLOCK_ID block.
00318       TYPE_OFFSET = 1,
00319 
00320       /// \brief Record code for the offsets of each decl.
00321       ///
00322       /// The DECL_OFFSET constant describes the record that occurs
00323       /// within the block identified by DECL_OFFSETS_BLOCK_ID within
00324       /// the AST block. The record itself is an array of offsets that
00325       /// point into the declarations and types block (identified by
00326       /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
00327       /// record, after subtracting one to account for the use of
00328       /// declaration ID 0 for a NULL declaration pointer. Index 0 is
00329       /// reserved for the translation unit declaration.
00330       DECL_OFFSET = 2,
00331 
00332       /// \brief Record code for the table of offsets of each
00333       /// identifier ID.
00334       ///
00335       /// The offset table contains offsets into the blob stored in
00336       /// the IDENTIFIER_TABLE record. Each offset points to the
00337       /// NULL-terminated string that corresponds to that identifier.
00338       IDENTIFIER_OFFSET = 3,
00339 
00340       /// \brief This is so that older clang versions, before the introduction
00341       /// of the control block, can read and reject the newer PCH format.
00342       /// *DON"T CHANGE THIS NUMBER*.
00343       METADATA_OLD_FORMAT = 4,
00344 
00345       /// \brief Record code for the identifier table.
00346       ///
00347       /// The identifier table is a simple blob that contains
00348       /// NULL-terminated strings for all of the identifiers
00349       /// referenced by the AST file. The IDENTIFIER_OFFSET table
00350       /// contains the mapping from identifier IDs to the characters
00351       /// in this blob. Note that the starting offsets of all of the
00352       /// identifiers are odd, so that, when the identifier offset
00353       /// table is loaded in, we can use the low bit to distinguish
00354       /// between offsets (for unresolved identifier IDs) and
00355       /// IdentifierInfo pointers (for already-resolved identifier
00356       /// IDs).
00357       IDENTIFIER_TABLE = 5,
00358 
00359       /// \brief Record code for the array of eagerly deserialized decls.
00360       ///
00361       /// The AST file contains a list of all of the declarations that should be
00362       /// eagerly deserialized present within the parsed headers, stored as an
00363       /// array of declaration IDs. These declarations will be
00364       /// reported to the AST consumer after the AST file has been
00365       /// read, since their presence can affect the semantics of the
00366       /// program (e.g., for code generation).
00367       EAGERLY_DESERIALIZED_DECLS = 6,
00368 
00369       /// \brief Record code for the set of non-builtin, special
00370       /// types.
00371       ///
00372       /// This record contains the type IDs for the various type nodes
00373       /// that are constructed during semantic analysis (e.g.,
00374       /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
00375       /// offsets into this record.
00376       SPECIAL_TYPES = 7,
00377 
00378       /// \brief Record code for the extra statistics we gather while
00379       /// generating an AST file.
00380       STATISTICS = 8,
00381 
00382       /// \brief Record code for the array of tentative definitions.
00383       TENTATIVE_DEFINITIONS = 9,
00384 
00385       /// \brief Record code for the array of locally-scoped extern "C"
00386       /// declarations.
00387       LOCALLY_SCOPED_EXTERN_C_DECLS = 10,
00388 
00389       /// \brief Record code for the table of offsets into the
00390       /// Objective-C method pool.
00391       SELECTOR_OFFSETS = 11,
00392 
00393       /// \brief Record code for the Objective-C method pool,
00394       METHOD_POOL = 12,
00395 
00396       /// \brief The value of the next __COUNTER__ to dispense.
00397       /// [PP_COUNTER_VALUE, Val]
00398       PP_COUNTER_VALUE = 13,
00399 
00400       /// \brief Record code for the table of offsets into the block
00401       /// of source-location information.
00402       SOURCE_LOCATION_OFFSETS = 14,
00403 
00404       /// \brief Record code for the set of source location entries
00405       /// that need to be preloaded by the AST reader.
00406       ///
00407       /// This set contains the source location entry for the
00408       /// predefines buffer and for any file entries that need to be
00409       /// preloaded.
00410       SOURCE_LOCATION_PRELOADS = 15,
00411 
00412       /// \brief Record code for the set of ext_vector type names.
00413       EXT_VECTOR_DECLS = 16,
00414       
00415       /// \brief Record code for the array of unused file scoped decls.
00416       UNUSED_FILESCOPED_DECLS = 17,
00417       
00418       /// \brief Record code for the table of offsets to entries in the
00419       /// preprocessing record.
00420       PPD_ENTITIES_OFFSETS = 18,
00421 
00422       /// \brief Record code for the array of VTable uses.
00423       VTABLE_USES = 19,
00424 
00425       /// \brief Record code for the array of dynamic classes.
00426       DYNAMIC_CLASSES = 20,
00427 
00428       /// \brief Record code for referenced selector pool.
00429       REFERENCED_SELECTOR_POOL = 21,
00430 
00431       /// \brief Record code for an update to the TU's lexically contained
00432       /// declarations.
00433       TU_UPDATE_LEXICAL = 22,
00434       
00435       /// \brief Record code for the array describing the locations (in the
00436       /// LOCAL_REDECLARATIONS record) of the redeclaration chains, indexed by
00437       /// the first known ID.
00438       LOCAL_REDECLARATIONS_MAP = 23,
00439 
00440       /// \brief Record code for declarations that Sema keeps references of.
00441       SEMA_DECL_REFS = 24,
00442 
00443       /// \brief Record code for weak undeclared identifiers.
00444       WEAK_UNDECLARED_IDENTIFIERS = 25,
00445 
00446       /// \brief Record code for pending implicit instantiations.
00447       PENDING_IMPLICIT_INSTANTIATIONS = 26,
00448 
00449       /// \brief Record code for a decl replacement block.
00450       ///
00451       /// If a declaration is modified after having been deserialized, and then
00452       /// written to a dependent AST file, its ID and offset must be added to
00453       /// the replacement block.
00454       DECL_REPLACEMENTS = 27,
00455 
00456       /// \brief Record code for an update to a decl context's lookup table.
00457       ///
00458       /// In practice, this should only be used for the TU and namespaces.
00459       UPDATE_VISIBLE = 28,
00460 
00461       /// \brief Record for offsets of DECL_UPDATES records for declarations
00462       /// that were modified after being deserialized and need updates.
00463       DECL_UPDATE_OFFSETS = 29,
00464 
00465       /// \brief Record of updates for a declaration that was modified after
00466       /// being deserialized.
00467       DECL_UPDATES = 30,
00468       
00469       /// \brief Record code for the table of offsets to CXXBaseSpecifier
00470       /// sets.
00471       CXX_BASE_SPECIFIER_OFFSETS = 31,
00472 
00473       /// \brief Record code for \#pragma diagnostic mappings.
00474       DIAG_PRAGMA_MAPPINGS = 32,
00475 
00476       /// \brief Record code for special CUDA declarations.
00477       CUDA_SPECIAL_DECL_REFS = 33,
00478       
00479       /// \brief Record code for header search information.
00480       HEADER_SEARCH_TABLE = 34,
00481 
00482       /// \brief Record code for floating point \#pragma options.
00483       FP_PRAGMA_OPTIONS = 35,
00484 
00485       /// \brief Record code for enabled OpenCL extensions.
00486       OPENCL_EXTENSIONS = 36,
00487 
00488       /// \brief The list of delegating constructor declarations.
00489       DELEGATING_CTORS = 37,
00490 
00491       /// \brief Record code for the set of known namespaces, which are used
00492       /// for typo correction.
00493       KNOWN_NAMESPACES = 38,
00494 
00495       /// \brief Record code for the remapping information used to relate
00496       /// loaded modules to the various offsets and IDs(e.g., source location 
00497       /// offests, declaration and type IDs) that are used in that module to
00498       /// refer to other modules.
00499       MODULE_OFFSET_MAP = 39,
00500 
00501       /// \brief Record code for the source manager line table information,
00502       /// which stores information about \#line directives.
00503       SOURCE_MANAGER_LINE_TABLE = 40,
00504 
00505       /// \brief Record code for map of Objective-C class definition IDs to the 
00506       /// ObjC categories in a module that are attached to that class.
00507       OBJC_CATEGORIES_MAP = 41,
00508 
00509       /// \brief Record code for a file sorted array of DeclIDs in a module.
00510       FILE_SORTED_DECLS = 42,
00511       
00512       /// \brief Record code for an array of all of the (sub)modules that were
00513       /// imported by the AST file.
00514       IMPORTED_MODULES = 43,
00515       
00516       /// \brief Record code for the set of merged declarations in an AST file.
00517       MERGED_DECLARATIONS = 44,
00518       
00519       /// \brief Record code for the array of redeclaration chains.
00520       ///
00521       /// This array can only be interpreted properly using the local 
00522       /// redeclarations map.
00523       LOCAL_REDECLARATIONS = 45,
00524       
00525       /// \brief Record code for the array of Objective-C categories (including
00526       /// extensions).
00527       ///
00528       /// This array can only be interpreted properly using the Objective-C
00529       /// categories map.
00530       OBJC_CATEGORIES = 46,
00531 
00532       /// \brief Record code for the table of offsets of each macro ID.
00533       ///
00534       /// The offset table contains offsets into the blob stored in
00535       /// the preprocessor block. Each offset points to the corresponding
00536       /// macro definition.
00537       MACRO_OFFSET = 47,
00538 
00539       /// \brief Mapping table from the identifier ID to the offset of the
00540       /// macro directive history for the identifier.
00541       MACRO_TABLE = 48,
00542 
00543       /// \brief Record code for undefined but used functions and variables that
00544       /// need a definition in this TU.
00545       UNDEFINED_BUT_USED = 49,
00546 
00547       /// \brief Record code for late parsed template functions.
00548       LATE_PARSED_TEMPLATE = 50,
00549 
00550       /// \brief Record code for \#pragma optimize options.
00551       OPTIMIZE_PRAGMA_OPTIONS = 51,
00552 
00553       /// \brief Record code for potentially unused local typedef names.
00554       UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES = 52,
00555     };
00556 
00557     /// \brief Record types used within a source manager block.
00558     enum SourceManagerRecordTypes {
00559       /// \brief Describes a source location entry (SLocEntry) for a
00560       /// file.
00561       SM_SLOC_FILE_ENTRY = 1,
00562       /// \brief Describes a source location entry (SLocEntry) for a
00563       /// buffer.
00564       SM_SLOC_BUFFER_ENTRY = 2,
00565       /// \brief Describes a blob that contains the data for a buffer
00566       /// entry. This kind of record always directly follows a
00567       /// SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an
00568       /// overridden buffer.
00569       SM_SLOC_BUFFER_BLOB = 3,
00570       /// \brief Describes a source location entry (SLocEntry) for a
00571       /// macro expansion.
00572       SM_SLOC_EXPANSION_ENTRY = 4
00573     };
00574 
00575     /// \brief Record types used within a preprocessor block.
00576     enum PreprocessorRecordTypes {
00577       // The macros in the PP section are a PP_MACRO_* instance followed by a
00578       // list of PP_TOKEN instances for each token in the definition.
00579 
00580       /// \brief An object-like macro definition.
00581       /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
00582       PP_MACRO_OBJECT_LIKE = 1,
00583 
00584       /// \brief A function-like macro definition.
00585       /// [PP_MACRO_FUNCTION_LIKE, <ObjectLikeStuff>, IsC99Varargs,
00586       /// IsGNUVarars, NumArgs, ArgIdentInfoID* ]
00587       PP_MACRO_FUNCTION_LIKE = 2,
00588 
00589       /// \brief Describes one token.
00590       /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
00591       PP_TOKEN = 3,
00592 
00593       /// \brief The macro directives history for a particular identifier.
00594       PP_MACRO_DIRECTIVE_HISTORY = 4
00595     };
00596 
00597     /// \brief Record types used within a preprocessor detail block.
00598     enum PreprocessorDetailRecordTypes {
00599       /// \brief Describes a macro expansion within the preprocessing record.
00600       PPD_MACRO_EXPANSION = 0,
00601       
00602       /// \brief Describes a macro definition within the preprocessing record.
00603       PPD_MACRO_DEFINITION = 1,
00604       
00605       /// \brief Describes an inclusion directive within the preprocessing
00606       /// record.
00607       PPD_INCLUSION_DIRECTIVE = 2
00608     };
00609     
00610     /// \brief Record types used within a submodule description block.
00611     enum SubmoduleRecordTypes {
00612       /// \brief Metadata for submodules as a whole.
00613       SUBMODULE_METADATA = 0,
00614       /// \brief Defines the major attributes of a submodule, including its
00615       /// name and parent.
00616       SUBMODULE_DEFINITION = 1,
00617       /// \brief Specifies the umbrella header used to create this module,
00618       /// if any.
00619       SUBMODULE_UMBRELLA_HEADER = 2,
00620       /// \brief Specifies a header that falls into this (sub)module.
00621       SUBMODULE_HEADER = 3,
00622       /// \brief Specifies a top-level header that falls into this (sub)module.
00623       SUBMODULE_TOPHEADER = 4,
00624       /// \brief Specifies an umbrella directory.
00625       SUBMODULE_UMBRELLA_DIR = 5,
00626       /// \brief Specifies the submodules that are imported by this 
00627       /// submodule.
00628       SUBMODULE_IMPORTS = 6,
00629       /// \brief Specifies the submodules that are re-exported from this 
00630       /// submodule.
00631       SUBMODULE_EXPORTS = 7,
00632       /// \brief Specifies a required feature.
00633       SUBMODULE_REQUIRES = 8,
00634       /// \brief Specifies a header that has been explicitly excluded
00635       /// from this submodule.
00636       SUBMODULE_EXCLUDED_HEADER = 9,
00637       /// \brief Specifies a library or framework to link against.
00638       SUBMODULE_LINK_LIBRARY = 10,
00639       /// \brief Specifies a configuration macro for this module.
00640       SUBMODULE_CONFIG_MACRO = 11,
00641       /// \brief Specifies a conflict with another module.
00642       SUBMODULE_CONFLICT = 12,
00643       /// \brief Specifies a header that is private to this submodule.
00644       SUBMODULE_PRIVATE_HEADER = 13,
00645       /// \brief Specifies a header that is part of the module but must be
00646       /// textually included.
00647       SUBMODULE_TEXTUAL_HEADER = 14,
00648       /// \brief Specifies a header that is private to this submodule but
00649       /// must be textually included.
00650       SUBMODULE_PRIVATE_TEXTUAL_HEADER = 15,
00651     };
00652 
00653     /// \brief Record types used within a comments block.
00654     enum CommentRecordTypes {
00655       COMMENTS_RAW_COMMENT = 0
00656     };
00657 
00658     /// \defgroup ASTAST AST file AST constants
00659     ///
00660     /// The constants in this group describe various components of the
00661     /// abstract syntax tree within an AST file.
00662     ///
00663     /// @{
00664 
00665     /// \brief Predefined type IDs.
00666     ///
00667     /// These type IDs correspond to predefined types in the AST
00668     /// context, such as built-in types (int) and special place-holder
00669     /// types (the <overload> and <dependent> type markers). Such
00670     /// types are never actually serialized, since they will be built
00671     /// by the AST context when it is created.
00672     enum PredefinedTypeIDs {
00673       /// \brief The NULL type.
00674       PREDEF_TYPE_NULL_ID       = 0,
00675       /// \brief The void type.
00676       PREDEF_TYPE_VOID_ID       = 1,
00677       /// \brief The 'bool' or '_Bool' type.
00678       PREDEF_TYPE_BOOL_ID       = 2,
00679       /// \brief The 'char' type, when it is unsigned.
00680       PREDEF_TYPE_CHAR_U_ID     = 3,
00681       /// \brief The 'unsigned char' type.
00682       PREDEF_TYPE_UCHAR_ID      = 4,
00683       /// \brief The 'unsigned short' type.
00684       PREDEF_TYPE_USHORT_ID     = 5,
00685       /// \brief The 'unsigned int' type.
00686       PREDEF_TYPE_UINT_ID       = 6,
00687       /// \brief The 'unsigned long' type.
00688       PREDEF_TYPE_ULONG_ID      = 7,
00689       /// \brief The 'unsigned long long' type.
00690       PREDEF_TYPE_ULONGLONG_ID  = 8,
00691       /// \brief The 'char' type, when it is signed.
00692       PREDEF_TYPE_CHAR_S_ID     = 9,
00693       /// \brief The 'signed char' type.
00694       PREDEF_TYPE_SCHAR_ID      = 10,
00695       /// \brief The C++ 'wchar_t' type.
00696       PREDEF_TYPE_WCHAR_ID      = 11,
00697       /// \brief The (signed) 'short' type.
00698       PREDEF_TYPE_SHORT_ID      = 12,
00699       /// \brief The (signed) 'int' type.
00700       PREDEF_TYPE_INT_ID        = 13,
00701       /// \brief The (signed) 'long' type.
00702       PREDEF_TYPE_LONG_ID       = 14,
00703       /// \brief The (signed) 'long long' type.
00704       PREDEF_TYPE_LONGLONG_ID   = 15,
00705       /// \brief The 'float' type.
00706       PREDEF_TYPE_FLOAT_ID      = 16,
00707       /// \brief The 'double' type.
00708       PREDEF_TYPE_DOUBLE_ID     = 17,
00709       /// \brief The 'long double' type.
00710       PREDEF_TYPE_LONGDOUBLE_ID = 18,
00711       /// \brief The placeholder type for overloaded function sets.
00712       PREDEF_TYPE_OVERLOAD_ID   = 19,
00713       /// \brief The placeholder type for dependent types.
00714       PREDEF_TYPE_DEPENDENT_ID  = 20,
00715       /// \brief The '__uint128_t' type.
00716       PREDEF_TYPE_UINT128_ID    = 21,
00717       /// \brief The '__int128_t' type.
00718       PREDEF_TYPE_INT128_ID     = 22,
00719       /// \brief The type of 'nullptr'.
00720       PREDEF_TYPE_NULLPTR_ID    = 23,
00721       /// \brief The C++ 'char16_t' type.
00722       PREDEF_TYPE_CHAR16_ID     = 24,
00723       /// \brief The C++ 'char32_t' type.
00724       PREDEF_TYPE_CHAR32_ID     = 25,
00725       /// \brief The ObjC 'id' type.
00726       PREDEF_TYPE_OBJC_ID       = 26,
00727       /// \brief The ObjC 'Class' type.
00728       PREDEF_TYPE_OBJC_CLASS    = 27,
00729       /// \brief The ObjC 'SEL' type.
00730       PREDEF_TYPE_OBJC_SEL      = 28,
00731       /// \brief The 'unknown any' placeholder type.
00732       PREDEF_TYPE_UNKNOWN_ANY   = 29,
00733       /// \brief The placeholder type for bound member functions.
00734       PREDEF_TYPE_BOUND_MEMBER  = 30,
00735       /// \brief The "auto" deduction type.
00736       PREDEF_TYPE_AUTO_DEDUCT   = 31,
00737       /// \brief The "auto &&" deduction type.
00738       PREDEF_TYPE_AUTO_RREF_DEDUCT = 32,
00739       /// \brief The OpenCL 'half' / ARM NEON __fp16 type.
00740       PREDEF_TYPE_HALF_ID       = 33,
00741       /// \brief ARC's unbridged-cast placeholder type.
00742       PREDEF_TYPE_ARC_UNBRIDGED_CAST = 34,
00743       /// \brief The pseudo-object placeholder type.
00744       PREDEF_TYPE_PSEUDO_OBJECT = 35,
00745       /// \brief The __va_list_tag placeholder type.
00746       PREDEF_TYPE_VA_LIST_TAG = 36,
00747       /// \brief The placeholder type for builtin functions.
00748       PREDEF_TYPE_BUILTIN_FN = 37,
00749       /// \brief OpenCL 1d image type.
00750       PREDEF_TYPE_IMAGE1D_ID    = 38,
00751       /// \brief OpenCL 1d image array type.
00752       PREDEF_TYPE_IMAGE1D_ARR_ID = 39,
00753       /// \brief OpenCL 1d image buffer type.
00754       PREDEF_TYPE_IMAGE1D_BUFF_ID = 40,
00755       /// \brief OpenCL 2d image type.
00756       PREDEF_TYPE_IMAGE2D_ID    = 41,
00757       /// \brief OpenCL 2d image array type.
00758       PREDEF_TYPE_IMAGE2D_ARR_ID = 42,
00759       /// \brief OpenCL 3d image type.
00760       PREDEF_TYPE_IMAGE3D_ID    = 43,
00761       /// \brief OpenCL event type.
00762       PREDEF_TYPE_EVENT_ID      = 44,
00763       /// \brief OpenCL sampler type.
00764       PREDEF_TYPE_SAMPLER_ID    = 45
00765     };
00766 
00767     /// \brief The number of predefined type IDs that are reserved for
00768     /// the PREDEF_TYPE_* constants.
00769     ///
00770     /// Type IDs for non-predefined types will start at
00771     /// NUM_PREDEF_TYPE_IDs.
00772     const unsigned NUM_PREDEF_TYPE_IDS = 100;
00773 
00774     /// \brief Record codes for each kind of type.
00775     ///
00776     /// These constants describe the type records that can occur within a
00777     /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
00778     /// constant describes a record for a specific type class in the
00779     /// AST.
00780     enum TypeCode {
00781       /// \brief An ExtQualType record.
00782       TYPE_EXT_QUAL                 = 1,
00783       /// \brief A ComplexType record.
00784       TYPE_COMPLEX                  = 3,
00785       /// \brief A PointerType record.
00786       TYPE_POINTER                  = 4,
00787       /// \brief A BlockPointerType record.
00788       TYPE_BLOCK_POINTER            = 5,
00789       /// \brief An LValueReferenceType record.
00790       TYPE_LVALUE_REFERENCE         = 6,
00791       /// \brief An RValueReferenceType record.
00792       TYPE_RVALUE_REFERENCE         = 7,
00793       /// \brief A MemberPointerType record.
00794       TYPE_MEMBER_POINTER           = 8,
00795       /// \brief A ConstantArrayType record.
00796       TYPE_CONSTANT_ARRAY           = 9,
00797       /// \brief An IncompleteArrayType record.
00798       TYPE_INCOMPLETE_ARRAY         = 10,
00799       /// \brief A VariableArrayType record.
00800       TYPE_VARIABLE_ARRAY           = 11,
00801       /// \brief A VectorType record.
00802       TYPE_VECTOR                   = 12,
00803       /// \brief An ExtVectorType record.
00804       TYPE_EXT_VECTOR               = 13,
00805       /// \brief A FunctionNoProtoType record.
00806       TYPE_FUNCTION_NO_PROTO        = 14,
00807       /// \brief A FunctionProtoType record.
00808       TYPE_FUNCTION_PROTO           = 15,
00809       /// \brief A TypedefType record.
00810       TYPE_TYPEDEF                  = 16,
00811       /// \brief A TypeOfExprType record.
00812       TYPE_TYPEOF_EXPR              = 17,
00813       /// \brief A TypeOfType record.
00814       TYPE_TYPEOF                   = 18,
00815       /// \brief A RecordType record.
00816       TYPE_RECORD                   = 19,
00817       /// \brief An EnumType record.
00818       TYPE_ENUM                     = 20,
00819       /// \brief An ObjCInterfaceType record.
00820       TYPE_OBJC_INTERFACE           = 21,
00821       /// \brief An ObjCObjectPointerType record.
00822       TYPE_OBJC_OBJECT_POINTER      = 22,
00823       /// \brief a DecltypeType record.
00824       TYPE_DECLTYPE                 = 23,
00825       /// \brief An ElaboratedType record.
00826       TYPE_ELABORATED               = 24,
00827       /// \brief A SubstTemplateTypeParmType record.
00828       TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
00829       /// \brief An UnresolvedUsingType record.
00830       TYPE_UNRESOLVED_USING         = 26,
00831       /// \brief An InjectedClassNameType record.
00832       TYPE_INJECTED_CLASS_NAME      = 27,
00833       /// \brief An ObjCObjectType record.
00834       TYPE_OBJC_OBJECT              = 28,
00835       /// \brief An TemplateTypeParmType record.
00836       TYPE_TEMPLATE_TYPE_PARM       = 29,
00837       /// \brief An TemplateSpecializationType record.
00838       TYPE_TEMPLATE_SPECIALIZATION  = 30,
00839       /// \brief A DependentNameType record.
00840       TYPE_DEPENDENT_NAME           = 31,
00841       /// \brief A DependentTemplateSpecializationType record.
00842       TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
00843       /// \brief A DependentSizedArrayType record.
00844       TYPE_DEPENDENT_SIZED_ARRAY    = 33,
00845       /// \brief A ParenType record.
00846       TYPE_PAREN                    = 34,
00847       /// \brief A PackExpansionType record.
00848       TYPE_PACK_EXPANSION           = 35,
00849       /// \brief An AttributedType record.
00850       TYPE_ATTRIBUTED               = 36,
00851       /// \brief A SubstTemplateTypeParmPackType record.
00852       TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
00853       /// \brief A AutoType record.
00854       TYPE_AUTO                  = 38,
00855       /// \brief A UnaryTransformType record.
00856       TYPE_UNARY_TRANSFORM       = 39,
00857       /// \brief An AtomicType record.
00858       TYPE_ATOMIC                = 40,
00859       /// \brief A DecayedType record.
00860       TYPE_DECAYED               = 41,
00861       /// \brief An AdjustedType record.
00862       TYPE_ADJUSTED              = 42
00863     };
00864 
00865     /// \brief The type IDs for special types constructed by semantic
00866     /// analysis.
00867     ///
00868     /// The constants in this enumeration are indices into the
00869     /// SPECIAL_TYPES record.
00870     enum SpecialTypeIDs {
00871       /// \brief CFConstantString type
00872       SPECIAL_TYPE_CF_CONSTANT_STRING          = 0,
00873       /// \brief C FILE typedef type
00874       SPECIAL_TYPE_FILE                        = 1,
00875       /// \brief C jmp_buf typedef type
00876       SPECIAL_TYPE_JMP_BUF                     = 2,
00877       /// \brief C sigjmp_buf typedef type
00878       SPECIAL_TYPE_SIGJMP_BUF                  = 3,
00879       /// \brief Objective-C "id" redefinition type
00880       SPECIAL_TYPE_OBJC_ID_REDEFINITION        = 4,
00881       /// \brief Objective-C "Class" redefinition type
00882       SPECIAL_TYPE_OBJC_CLASS_REDEFINITION     = 5,
00883       /// \brief Objective-C "SEL" redefinition type
00884       SPECIAL_TYPE_OBJC_SEL_REDEFINITION       = 6,
00885       /// \brief C ucontext_t typedef type
00886       SPECIAL_TYPE_UCONTEXT_T                  = 7
00887     };
00888     
00889     /// \brief The number of special type IDs.
00890     const unsigned NumSpecialTypeIDs = 8;
00891 
00892     /// \brief Predefined declaration IDs.
00893     ///
00894     /// These declaration IDs correspond to predefined declarations in the AST
00895     /// context, such as the NULL declaration ID. Such declarations are never
00896     /// actually serialized, since they will be built by the AST context when 
00897     /// it is created.
00898     enum PredefinedDeclIDs {
00899       /// \brief The NULL declaration.
00900       PREDEF_DECL_NULL_ID       = 0,
00901       
00902       /// \brief The translation unit.
00903       PREDEF_DECL_TRANSLATION_UNIT_ID = 1,
00904       
00905       /// \brief The Objective-C 'id' type.
00906       PREDEF_DECL_OBJC_ID_ID = 2,
00907       
00908       /// \brief The Objective-C 'SEL' type.
00909       PREDEF_DECL_OBJC_SEL_ID = 3,
00910       
00911       /// \brief The Objective-C 'Class' type.
00912       PREDEF_DECL_OBJC_CLASS_ID = 4,
00913             
00914       /// \brief The Objective-C 'Protocol' type.
00915       PREDEF_DECL_OBJC_PROTOCOL_ID = 5,
00916       
00917       /// \brief The signed 128-bit integer type.
00918       PREDEF_DECL_INT_128_ID = 6,
00919 
00920       /// \brief The unsigned 128-bit integer type.
00921       PREDEF_DECL_UNSIGNED_INT_128_ID = 7,
00922       
00923       /// \brief The internal 'instancetype' typedef.
00924       PREDEF_DECL_OBJC_INSTANCETYPE_ID = 8,
00925 
00926       /// \brief The internal '__builtin_va_list' typedef.
00927       PREDEF_DECL_BUILTIN_VA_LIST_ID = 9
00928     };
00929 
00930     /// \brief The number of declaration IDs that are predefined.
00931     ///
00932     /// For more information about predefined declarations, see the
00933     /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants.
00934     const unsigned int NUM_PREDEF_DECL_IDS = 10;
00935     
00936     /// \brief Record codes for each kind of declaration.
00937     ///
00938     /// These constants describe the declaration records that can occur within
00939     /// a declarations block (identified by DECLS_BLOCK_ID). Each
00940     /// constant describes a record for a specific declaration class
00941     /// in the AST.
00942     enum DeclCode {
00943       /// \brief A TypedefDecl record.
00944       DECL_TYPEDEF = 51,
00945       /// \brief A TypeAliasDecl record.
00946       DECL_TYPEALIAS,
00947       /// \brief An EnumDecl record.
00948       DECL_ENUM,
00949       /// \brief A RecordDecl record.
00950       DECL_RECORD,
00951       /// \brief An EnumConstantDecl record.
00952       DECL_ENUM_CONSTANT,
00953       /// \brief A FunctionDecl record.
00954       DECL_FUNCTION,
00955       /// \brief A ObjCMethodDecl record.
00956       DECL_OBJC_METHOD,
00957       /// \brief A ObjCInterfaceDecl record.
00958       DECL_OBJC_INTERFACE,
00959       /// \brief A ObjCProtocolDecl record.
00960       DECL_OBJC_PROTOCOL,
00961       /// \brief A ObjCIvarDecl record.
00962       DECL_OBJC_IVAR,
00963       /// \brief A ObjCAtDefsFieldDecl record.
00964       DECL_OBJC_AT_DEFS_FIELD,
00965       /// \brief A ObjCCategoryDecl record.
00966       DECL_OBJC_CATEGORY,
00967       /// \brief A ObjCCategoryImplDecl record.
00968       DECL_OBJC_CATEGORY_IMPL,
00969       /// \brief A ObjCImplementationDecl record.
00970       DECL_OBJC_IMPLEMENTATION,
00971       /// \brief A ObjCCompatibleAliasDecl record.
00972       DECL_OBJC_COMPATIBLE_ALIAS,
00973       /// \brief A ObjCPropertyDecl record.
00974       DECL_OBJC_PROPERTY,
00975       /// \brief A ObjCPropertyImplDecl record.
00976       DECL_OBJC_PROPERTY_IMPL,
00977       /// \brief A FieldDecl record.
00978       DECL_FIELD,
00979       /// \brief A MSPropertyDecl record.
00980       DECL_MS_PROPERTY,
00981       /// \brief A VarDecl record.
00982       DECL_VAR,
00983       /// \brief An ImplicitParamDecl record.
00984       DECL_IMPLICIT_PARAM,
00985       /// \brief A ParmVarDecl record.
00986       DECL_PARM_VAR,
00987       /// \brief A FileScopeAsmDecl record.
00988       DECL_FILE_SCOPE_ASM,
00989       /// \brief A BlockDecl record.
00990       DECL_BLOCK,
00991       /// \brief A CapturedDecl record.
00992       DECL_CAPTURED,
00993       /// \brief A record that stores the set of declarations that are
00994       /// lexically stored within a given DeclContext.
00995       ///
00996       /// The record itself is a blob that is an array of declaration IDs,
00997       /// in the order in which those declarations were added to the
00998       /// declaration context. This data is used when iterating over
00999       /// the contents of a DeclContext, e.g., via
01000       /// DeclContext::decls_begin() and DeclContext::decls_end().
01001       DECL_CONTEXT_LEXICAL,
01002       /// \brief A record that stores the set of declarations that are
01003       /// visible from a given DeclContext.
01004       ///
01005       /// The record itself stores a set of mappings, each of which
01006       /// associates a declaration name with one or more declaration
01007       /// IDs. This data is used when performing qualified name lookup
01008       /// into a DeclContext via DeclContext::lookup.
01009       DECL_CONTEXT_VISIBLE,
01010       /// \brief A LabelDecl record.
01011       DECL_LABEL,
01012       /// \brief A NamespaceDecl record.
01013       DECL_NAMESPACE,
01014       /// \brief A NamespaceAliasDecl record.
01015       DECL_NAMESPACE_ALIAS,
01016       /// \brief A UsingDecl record.
01017       DECL_USING,
01018       /// \brief A UsingShadowDecl record.
01019       DECL_USING_SHADOW,
01020       /// \brief A UsingDirecitveDecl record.
01021       DECL_USING_DIRECTIVE,
01022       /// \brief An UnresolvedUsingValueDecl record.
01023       DECL_UNRESOLVED_USING_VALUE,
01024       /// \brief An UnresolvedUsingTypenameDecl record.
01025       DECL_UNRESOLVED_USING_TYPENAME,
01026       /// \brief A LinkageSpecDecl record.
01027       DECL_LINKAGE_SPEC,
01028       /// \brief A CXXRecordDecl record.
01029       DECL_CXX_RECORD,
01030       /// \brief A CXXMethodDecl record.
01031       DECL_CXX_METHOD,
01032       /// \brief A CXXConstructorDecl record.
01033       DECL_CXX_CONSTRUCTOR,
01034       /// \brief A CXXDestructorDecl record.
01035       DECL_CXX_DESTRUCTOR,
01036       /// \brief A CXXConversionDecl record.
01037       DECL_CXX_CONVERSION,
01038       /// \brief An AccessSpecDecl record.
01039       DECL_ACCESS_SPEC,
01040 
01041       /// \brief A FriendDecl record.
01042       DECL_FRIEND,
01043       /// \brief A FriendTemplateDecl record.
01044       DECL_FRIEND_TEMPLATE,
01045       /// \brief A ClassTemplateDecl record.
01046       DECL_CLASS_TEMPLATE,
01047       /// \brief A ClassTemplateSpecializationDecl record.
01048       DECL_CLASS_TEMPLATE_SPECIALIZATION,
01049       /// \brief A ClassTemplatePartialSpecializationDecl record.
01050       DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
01051       /// \brief A VarTemplateDecl record.
01052       DECL_VAR_TEMPLATE,
01053       /// \brief A VarTemplateSpecializationDecl record.
01054       DECL_VAR_TEMPLATE_SPECIALIZATION,
01055       /// \brief A VarTemplatePartialSpecializationDecl record.
01056       DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION,
01057       /// \brief A FunctionTemplateDecl record.
01058       DECL_FUNCTION_TEMPLATE,
01059       /// \brief A TemplateTypeParmDecl record.
01060       DECL_TEMPLATE_TYPE_PARM,
01061       /// \brief A NonTypeTemplateParmDecl record.
01062       DECL_NON_TYPE_TEMPLATE_PARM,
01063       /// \brief A TemplateTemplateParmDecl record.
01064       DECL_TEMPLATE_TEMPLATE_PARM,
01065       /// \brief A TypeAliasTemplateDecl record.
01066       DECL_TYPE_ALIAS_TEMPLATE,
01067       /// \brief A StaticAssertDecl record.
01068       DECL_STATIC_ASSERT,
01069       /// \brief A record containing CXXBaseSpecifiers.
01070       DECL_CXX_BASE_SPECIFIERS,
01071       /// \brief A IndirectFieldDecl record.
01072       DECL_INDIRECTFIELD,
01073       /// \brief A NonTypeTemplateParmDecl record that stores an expanded
01074       /// non-type template parameter pack.
01075       DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK,
01076       /// \brief A TemplateTemplateParmDecl record that stores an expanded
01077       /// template template parameter pack.
01078       DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK,
01079       /// \brief A ClassScopeFunctionSpecializationDecl record a class scope
01080       /// function specialization. (Microsoft extension).
01081       DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION,
01082       /// \brief An ImportDecl recording a module import.
01083       DECL_IMPORT,
01084       /// \brief An OMPThreadPrivateDecl record.
01085       DECL_OMP_THREADPRIVATE,
01086       /// \brief An EmptyDecl record.
01087       DECL_EMPTY
01088     };
01089 
01090     /// \brief Record codes for each kind of statement or expression.
01091     ///
01092     /// These constants describe the records that describe statements
01093     /// or expressions. These records  occur within type and declarations
01094     /// block, so they begin with record values of 100.  Each constant 
01095     /// describes a record for a specific statement or expression class in the
01096     /// AST.
01097     enum StmtCode {
01098       /// \brief A marker record that indicates that we are at the end
01099       /// of an expression.
01100       STMT_STOP = 100,
01101       /// \brief A NULL expression.
01102       STMT_NULL_PTR,
01103       /// \brief A reference to a previously [de]serialized Stmt record.
01104       STMT_REF_PTR,
01105       /// \brief A NullStmt record.
01106       STMT_NULL,
01107       /// \brief A CompoundStmt record.
01108       STMT_COMPOUND,
01109       /// \brief A CaseStmt record.
01110       STMT_CASE,
01111       /// \brief A DefaultStmt record.
01112       STMT_DEFAULT,
01113       /// \brief A LabelStmt record.
01114       STMT_LABEL,
01115       /// \brief An AttributedStmt record.
01116       STMT_ATTRIBUTED,
01117       /// \brief An IfStmt record.
01118       STMT_IF,
01119       /// \brief A SwitchStmt record.
01120       STMT_SWITCH,
01121       /// \brief A WhileStmt record.
01122       STMT_WHILE,
01123       /// \brief A DoStmt record.
01124       STMT_DO,
01125       /// \brief A ForStmt record.
01126       STMT_FOR,
01127       /// \brief A GotoStmt record.
01128       STMT_GOTO,
01129       /// \brief An IndirectGotoStmt record.
01130       STMT_INDIRECT_GOTO,
01131       /// \brief A ContinueStmt record.
01132       STMT_CONTINUE,
01133       /// \brief A BreakStmt record.
01134       STMT_BREAK,
01135       /// \brief A ReturnStmt record.
01136       STMT_RETURN,
01137       /// \brief A DeclStmt record.
01138       STMT_DECL,
01139       /// \brief A CapturedStmt record.
01140       STMT_CAPTURED,
01141       /// \brief A GCC-style AsmStmt record.
01142       STMT_GCCASM,
01143       /// \brief A MS-style AsmStmt record.
01144       STMT_MSASM,
01145       /// \brief A PredefinedExpr record.
01146       EXPR_PREDEFINED,
01147       /// \brief A DeclRefExpr record.
01148       EXPR_DECL_REF,
01149       /// \brief An IntegerLiteral record.
01150       EXPR_INTEGER_LITERAL,
01151       /// \brief A FloatingLiteral record.
01152       EXPR_FLOATING_LITERAL,
01153       /// \brief An ImaginaryLiteral record.
01154       EXPR_IMAGINARY_LITERAL,
01155       /// \brief A StringLiteral record.
01156       EXPR_STRING_LITERAL,
01157       /// \brief A CharacterLiteral record.
01158       EXPR_CHARACTER_LITERAL,
01159       /// \brief A ParenExpr record.
01160       EXPR_PAREN,
01161       /// \brief A ParenListExpr record.
01162       EXPR_PAREN_LIST,
01163       /// \brief A UnaryOperator record.
01164       EXPR_UNARY_OPERATOR,
01165       /// \brief An OffsetOfExpr record.
01166       EXPR_OFFSETOF,
01167       /// \brief A SizefAlignOfExpr record.
01168       EXPR_SIZEOF_ALIGN_OF,
01169       /// \brief An ArraySubscriptExpr record.
01170       EXPR_ARRAY_SUBSCRIPT,
01171       /// \brief A CallExpr record.
01172       EXPR_CALL,
01173       /// \brief A MemberExpr record.
01174       EXPR_MEMBER,
01175       /// \brief A BinaryOperator record.
01176       EXPR_BINARY_OPERATOR,
01177       /// \brief A CompoundAssignOperator record.
01178       EXPR_COMPOUND_ASSIGN_OPERATOR,
01179       /// \brief A ConditionOperator record.
01180       EXPR_CONDITIONAL_OPERATOR,
01181       /// \brief An ImplicitCastExpr record.
01182       EXPR_IMPLICIT_CAST,
01183       /// \brief A CStyleCastExpr record.
01184       EXPR_CSTYLE_CAST,
01185       /// \brief A CompoundLiteralExpr record.
01186       EXPR_COMPOUND_LITERAL,
01187       /// \brief An ExtVectorElementExpr record.
01188       EXPR_EXT_VECTOR_ELEMENT,
01189       /// \brief An InitListExpr record.
01190       EXPR_INIT_LIST,
01191       /// \brief A DesignatedInitExpr record.
01192       EXPR_DESIGNATED_INIT,
01193       /// \brief An ImplicitValueInitExpr record.
01194       EXPR_IMPLICIT_VALUE_INIT,
01195       /// \brief A VAArgExpr record.
01196       EXPR_VA_ARG,
01197       /// \brief An AddrLabelExpr record.
01198       EXPR_ADDR_LABEL,
01199       /// \brief A StmtExpr record.
01200       EXPR_STMT,
01201       /// \brief A ChooseExpr record.
01202       EXPR_CHOOSE,
01203       /// \brief A GNUNullExpr record.
01204       EXPR_GNU_NULL,
01205       /// \brief A ShuffleVectorExpr record.
01206       EXPR_SHUFFLE_VECTOR,
01207       /// \brief A ConvertVectorExpr record.
01208       EXPR_CONVERT_VECTOR,
01209       /// \brief BlockExpr
01210       EXPR_BLOCK,
01211       /// \brief A GenericSelectionExpr record.
01212       EXPR_GENERIC_SELECTION,
01213       /// \brief A PseudoObjectExpr record.
01214       EXPR_PSEUDO_OBJECT,
01215       /// \brief An AtomicExpr record.
01216       EXPR_ATOMIC,
01217 
01218       // Objective-C
01219 
01220       /// \brief An ObjCStringLiteral record.
01221       EXPR_OBJC_STRING_LITERAL,
01222 
01223       EXPR_OBJC_BOXED_EXPRESSION,
01224       EXPR_OBJC_ARRAY_LITERAL,
01225       EXPR_OBJC_DICTIONARY_LITERAL,
01226 
01227     
01228       /// \brief An ObjCEncodeExpr record.
01229       EXPR_OBJC_ENCODE,
01230       /// \brief An ObjCSelectorExpr record.
01231       EXPR_OBJC_SELECTOR_EXPR,
01232       /// \brief An ObjCProtocolExpr record.
01233       EXPR_OBJC_PROTOCOL_EXPR,
01234       /// \brief An ObjCIvarRefExpr record.
01235       EXPR_OBJC_IVAR_REF_EXPR,
01236       /// \brief An ObjCPropertyRefExpr record.
01237       EXPR_OBJC_PROPERTY_REF_EXPR,
01238       /// \brief An ObjCSubscriptRefExpr record.
01239       EXPR_OBJC_SUBSCRIPT_REF_EXPR,
01240       /// \brief UNUSED
01241       EXPR_OBJC_KVC_REF_EXPR,
01242       /// \brief An ObjCMessageExpr record.
01243       EXPR_OBJC_MESSAGE_EXPR,
01244       /// \brief An ObjCIsa Expr record.
01245       EXPR_OBJC_ISA,
01246       /// \brief An ObjCIndirectCopyRestoreExpr record.
01247       EXPR_OBJC_INDIRECT_COPY_RESTORE,
01248 
01249       /// \brief An ObjCForCollectionStmt record.
01250       STMT_OBJC_FOR_COLLECTION,
01251       /// \brief An ObjCAtCatchStmt record.
01252       STMT_OBJC_CATCH,
01253       /// \brief An ObjCAtFinallyStmt record.
01254       STMT_OBJC_FINALLY,
01255       /// \brief An ObjCAtTryStmt record.
01256       STMT_OBJC_AT_TRY,
01257       /// \brief An ObjCAtSynchronizedStmt record.
01258       STMT_OBJC_AT_SYNCHRONIZED,
01259       /// \brief An ObjCAtThrowStmt record.
01260       STMT_OBJC_AT_THROW,
01261       /// \brief An ObjCAutoreleasePoolStmt record.
01262       STMT_OBJC_AUTORELEASE_POOL,
01263       /// \brief A ObjCBoolLiteralExpr record.
01264       EXPR_OBJC_BOOL_LITERAL,
01265 
01266       // C++
01267       
01268       /// \brief A CXXCatchStmt record.
01269       STMT_CXX_CATCH,
01270       /// \brief A CXXTryStmt record.
01271       STMT_CXX_TRY,
01272       /// \brief A CXXForRangeStmt record.
01273       STMT_CXX_FOR_RANGE,
01274 
01275       /// \brief A CXXOperatorCallExpr record.
01276       EXPR_CXX_OPERATOR_CALL,
01277       /// \brief A CXXMemberCallExpr record.
01278       EXPR_CXX_MEMBER_CALL,
01279       /// \brief A CXXConstructExpr record.
01280       EXPR_CXX_CONSTRUCT,
01281       /// \brief A CXXTemporaryObjectExpr record.
01282       EXPR_CXX_TEMPORARY_OBJECT,
01283       /// \brief A CXXStaticCastExpr record.
01284       EXPR_CXX_STATIC_CAST,
01285       /// \brief A CXXDynamicCastExpr record.
01286       EXPR_CXX_DYNAMIC_CAST,
01287       /// \brief A CXXReinterpretCastExpr record.
01288       EXPR_CXX_REINTERPRET_CAST,
01289       /// \brief A CXXConstCastExpr record.
01290       EXPR_CXX_CONST_CAST,
01291       /// \brief A CXXFunctionalCastExpr record.
01292       EXPR_CXX_FUNCTIONAL_CAST,
01293       /// \brief A UserDefinedLiteral record.
01294       EXPR_USER_DEFINED_LITERAL,
01295       /// \brief A CXXStdInitializerListExpr record.
01296       EXPR_CXX_STD_INITIALIZER_LIST,
01297       /// \brief A CXXBoolLiteralExpr record.
01298       EXPR_CXX_BOOL_LITERAL,
01299       EXPR_CXX_NULL_PTR_LITERAL,  // CXXNullPtrLiteralExpr
01300       EXPR_CXX_TYPEID_EXPR,       // CXXTypeidExpr (of expr).
01301       EXPR_CXX_TYPEID_TYPE,       // CXXTypeidExpr (of type).
01302       EXPR_CXX_THIS,              // CXXThisExpr
01303       EXPR_CXX_THROW,             // CXXThrowExpr
01304       EXPR_CXX_DEFAULT_ARG,       // CXXDefaultArgExpr
01305       EXPR_CXX_DEFAULT_INIT,      // CXXDefaultInitExpr
01306       EXPR_CXX_BIND_TEMPORARY,    // CXXBindTemporaryExpr
01307 
01308       EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
01309       EXPR_CXX_NEW,               // CXXNewExpr
01310       EXPR_CXX_DELETE,            // CXXDeleteExpr
01311       EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
01312       
01313       EXPR_EXPR_WITH_CLEANUPS,    // ExprWithCleanups
01314       
01315       EXPR_CXX_DEPENDENT_SCOPE_MEMBER,   // CXXDependentScopeMemberExpr
01316       EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
01317       EXPR_CXX_UNRESOLVED_CONSTRUCT,     // CXXUnresolvedConstructExpr
01318       EXPR_CXX_UNRESOLVED_MEMBER,        // UnresolvedMemberExpr
01319       EXPR_CXX_UNRESOLVED_LOOKUP,        // UnresolvedLookupExpr
01320 
01321       EXPR_CXX_EXPRESSION_TRAIT,  // ExpressionTraitExpr
01322       EXPR_CXX_NOEXCEPT,          // CXXNoexceptExpr
01323 
01324       EXPR_OPAQUE_VALUE,          // OpaqueValueExpr
01325       EXPR_BINARY_CONDITIONAL_OPERATOR,  // BinaryConditionalOperator
01326       EXPR_TYPE_TRAIT,            // TypeTraitExpr
01327       EXPR_ARRAY_TYPE_TRAIT,      // ArrayTypeTraitIntExpr
01328       
01329       EXPR_PACK_EXPANSION,        // PackExpansionExpr
01330       EXPR_SIZEOF_PACK,           // SizeOfPackExpr
01331       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr
01332       EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
01333       EXPR_FUNCTION_PARM_PACK,    // FunctionParmPackExpr
01334       EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr
01335       EXPR_CXX_FOLD,              // CXXFoldExpr
01336 
01337       // CUDA
01338       EXPR_CUDA_KERNEL_CALL,       // CUDAKernelCallExpr      
01339 
01340       // OpenCL
01341       EXPR_ASTYPE,                 // AsTypeExpr
01342 
01343       // Microsoft
01344       EXPR_CXX_PROPERTY_REF_EXPR, // MSPropertyRefExpr
01345       EXPR_CXX_UUIDOF_EXPR,       // CXXUuidofExpr (of expr).
01346       EXPR_CXX_UUIDOF_TYPE,       // CXXUuidofExpr (of type).
01347       STMT_SEH_LEAVE,             // SEHLeaveStmt
01348       STMT_SEH_EXCEPT,            // SEHExceptStmt
01349       STMT_SEH_FINALLY,           // SEHFinallyStmt
01350       STMT_SEH_TRY,               // SEHTryStmt
01351 
01352       // OpenMP directives
01353       STMT_OMP_PARALLEL_DIRECTIVE,
01354       STMT_OMP_SIMD_DIRECTIVE,
01355       STMT_OMP_FOR_DIRECTIVE,
01356       STMT_OMP_FOR_SIMD_DIRECTIVE,
01357       STMT_OMP_SECTIONS_DIRECTIVE,
01358       STMT_OMP_SECTION_DIRECTIVE,
01359       STMT_OMP_SINGLE_DIRECTIVE,
01360       STMT_OMP_MASTER_DIRECTIVE,
01361       STMT_OMP_CRITICAL_DIRECTIVE,
01362       STMT_OMP_PARALLEL_FOR_DIRECTIVE,
01363       STMT_OMP_PARALLEL_FOR_SIMD_DIRECTIVE,
01364       STMT_OMP_PARALLEL_SECTIONS_DIRECTIVE,
01365       STMT_OMP_TASK_DIRECTIVE,
01366       STMT_OMP_TASKYIELD_DIRECTIVE,
01367       STMT_OMP_BARRIER_DIRECTIVE,
01368       STMT_OMP_TASKWAIT_DIRECTIVE,
01369       STMT_OMP_FLUSH_DIRECTIVE,
01370       STMT_OMP_ORDERED_DIRECTIVE,
01371       STMT_OMP_ATOMIC_DIRECTIVE,
01372       STMT_OMP_TARGET_DIRECTIVE,
01373       STMT_OMP_TEAMS_DIRECTIVE,
01374 
01375       // ARC
01376       EXPR_OBJC_BRIDGED_CAST,     // ObjCBridgedCastExpr
01377       
01378       STMT_MS_DEPENDENT_EXISTS,   // MSDependentExistsStmt
01379       EXPR_LAMBDA                 // LambdaExpr
01380     };
01381 
01382     /// \brief The kinds of designators that can occur in a
01383     /// DesignatedInitExpr.
01384     enum DesignatorTypes {
01385       /// \brief Field designator where only the field name is known.
01386       DESIG_FIELD_NAME  = 0,
01387       /// \brief Field designator where the field has been resolved to
01388       /// a declaration.
01389       DESIG_FIELD_DECL  = 1,
01390       /// \brief Array designator.
01391       DESIG_ARRAY       = 2,
01392       /// \brief GNU array range designator.
01393       DESIG_ARRAY_RANGE = 3
01394     };
01395 
01396     /// \brief The different kinds of data that can occur in a
01397     /// CtorInitializer.
01398     enum CtorInitializerType {
01399       CTOR_INITIALIZER_BASE,
01400       CTOR_INITIALIZER_DELEGATING,
01401       CTOR_INITIALIZER_MEMBER,
01402       CTOR_INITIALIZER_INDIRECT_MEMBER
01403     };
01404 
01405     /// \brief Describes the redeclarations of a declaration.
01406     struct LocalRedeclarationsInfo {
01407       DeclID FirstID;      // The ID of the first declaration
01408       unsigned Offset;     // Offset into the array of redeclaration chains.
01409       
01410       friend bool operator<(const LocalRedeclarationsInfo &X,
01411                             const LocalRedeclarationsInfo &Y) {
01412         return X.FirstID < Y.FirstID;
01413       }
01414       
01415       friend bool operator>(const LocalRedeclarationsInfo &X,
01416                             const LocalRedeclarationsInfo &Y) {
01417         return X.FirstID > Y.FirstID;
01418       }
01419       
01420       friend bool operator<=(const LocalRedeclarationsInfo &X,
01421                              const LocalRedeclarationsInfo &Y) {
01422         return X.FirstID <= Y.FirstID;
01423       }
01424       
01425       friend bool operator>=(const LocalRedeclarationsInfo &X,
01426                              const LocalRedeclarationsInfo &Y) {
01427         return X.FirstID >= Y.FirstID;
01428       }
01429     };
01430 
01431     /// \brief Describes the categories of an Objective-C class.
01432     struct ObjCCategoriesInfo {
01433       DeclID DefinitionID; // The ID of the definition
01434       unsigned Offset;     // Offset into the array of category lists.
01435       
01436       friend bool operator<(const ObjCCategoriesInfo &X,
01437                             const ObjCCategoriesInfo &Y) {
01438         return X.DefinitionID < Y.DefinitionID;
01439       }
01440       
01441       friend bool operator>(const ObjCCategoriesInfo &X,
01442                             const ObjCCategoriesInfo &Y) {
01443         return X.DefinitionID > Y.DefinitionID;
01444       }
01445       
01446       friend bool operator<=(const ObjCCategoriesInfo &X,
01447                              const ObjCCategoriesInfo &Y) {
01448         return X.DefinitionID <= Y.DefinitionID;
01449       }
01450       
01451       friend bool operator>=(const ObjCCategoriesInfo &X,
01452                              const ObjCCategoriesInfo &Y) {
01453         return X.DefinitionID >= Y.DefinitionID;
01454       }
01455     };
01456 
01457     /// @}
01458   }
01459 } // end namespace clang
01460 
01461 #endif