1 //===- ASTBitCodes.h - Enum values for the PCH bitcode format ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header defines Bitcode enum values for Clang serialized AST files.
12 // The enum values defined in this file should be considered permanent. If
13 // new features are added, they should have values added at the end of the
16 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_CLANG_FRONTEND_PCHBITCODES_H
18 #define LLVM_CLANG_FRONTEND_PCHBITCODES_H
20 #include "clang/AST/Type.h"
21 #include "llvm/Bitcode/BitCodes.h"
22 #include "llvm/Support/DataTypes.h"
23 #include "llvm/ADT/DenseMap.h"
26 namespace serialization {
27 /// \brief AST file major version number supported by this version of
30 /// Whenever the AST file format changes in a way that makes it
31 /// incompatible with previous versions (such that a reader
32 /// designed for the previous version could not support reading
33 /// the new version), this number should be increased.
35 /// Version 4 of AST files also requires that the version control branch and
36 /// revision match exactly, since there is no backward compatibility of
37 /// AST files at this time.
38 const unsigned VERSION_MAJOR = 4;
40 /// \brief AST file minor version number supported by this version of
43 /// Whenever the AST format changes in a way that is still
44 /// compatible with previous versions (such that a reader designed
45 /// for the previous version could still support reading the new
46 /// version by ignoring new kinds of subblocks), this number
47 /// should be increased.
48 const unsigned VERSION_MINOR = 0;
50 /// \brief An ID number that refers to an identifier in an AST file.
52 /// The ID numbers of identifiers are consecutive (in order of discovery)
53 /// and start at 1. 0 is reserved for NULL.
54 typedef uint32_t IdentifierID;
56 /// \brief An ID number that refers to a declaration in an AST file.
58 /// The ID numbers of declarations are consecutive (in order of
59 /// discovery), with values below NUM_PREDEF_DECL_IDS being reserved.
60 /// At the start of a chain of precompiled headers, declaration ID 1 is
61 /// used for the translation unit declaration.
62 typedef uint32_t DeclID;
64 /// \brief a Decl::Kind/DeclID pair.
65 typedef std::pair<uint32_t, DeclID> KindDeclIDPair;
67 // FIXME: Turn these into classes so we can have some type safety when
68 // we go from local ID to global and vice-versa.
69 typedef DeclID LocalDeclID;
70 typedef DeclID GlobalDeclID;
72 /// \brief An ID number that refers to a type in an AST file.
74 /// The ID of a type is partitioned into two parts: the lower
75 /// three bits are used to store the const/volatile/restrict
76 /// qualifiers (as with QualType) and the upper bits provide a
77 /// type index. The type index values are partitioned into two
78 /// sets. The values below NUM_PREDEF_TYPE_IDs are predefined type
79 /// IDs (based on the PREDEF_TYPE_*_ID constants), with 0 as a
80 /// placeholder for "no type". Values from NUM_PREDEF_TYPE_IDs are
81 /// other types that have serialized representations.
82 typedef uint32_t TypeID;
84 /// \brief A type index; the type ID with the qualifier bits removed.
88 TypeIdx() : Idx(0) { }
89 explicit TypeIdx(uint32_t index) : Idx(index) { }
91 uint32_t getIndex() const { return Idx; }
92 TypeID asTypeID(unsigned FastQuals) const {
93 if (Idx == uint32_t(-1))
96 return (Idx << Qualifiers::FastWidth) | FastQuals;
98 static TypeIdx fromTypeID(TypeID ID) {
102 return TypeIdx(ID >> Qualifiers::FastWidth);
106 /// A structure for putting "fast"-unqualified QualTypes into a
107 /// DenseMap. This uses the standard pointer hash function.
108 struct UnsafeQualTypeDenseMapInfo {
109 static inline bool isEqual(QualType A, QualType B) { return A == B; }
110 static inline QualType getEmptyKey() {
111 return QualType::getFromOpaquePtr((void*) 1);
113 static inline QualType getTombstoneKey() {
114 return QualType::getFromOpaquePtr((void*) 2);
116 static inline unsigned getHashValue(QualType T) {
117 assert(!T.getLocalFastQualifiers() &&
118 "hash invalid for types with fast quals");
119 uintptr_t v = reinterpret_cast<uintptr_t>(T.getAsOpaquePtr());
120 return (unsigned(v) >> 4) ^ (unsigned(v) >> 9);
124 /// \brief An ID number that refers to an identifier in an AST file.
125 typedef uint32_t IdentID;
127 /// \brief The number of predefined identifier IDs.
128 const unsigned int NUM_PREDEF_IDENT_IDS = 1;
130 /// \brief An ID number that refers to a macro in an AST file.
131 typedef uint32_t MacroID;
133 /// \brief The number of predefined macro IDs.
134 const unsigned int NUM_PREDEF_MACRO_IDS = 1;
136 /// \brief An ID number that refers to an ObjC selector in an AST file.
137 typedef uint32_t SelectorID;
139 /// \brief The number of predefined selector IDs.
140 const unsigned int NUM_PREDEF_SELECTOR_IDS = 1;
142 /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an
144 typedef uint32_t CXXBaseSpecifiersID;
146 /// \brief An ID number that refers to an entity in the detailed
147 /// preprocessing record.
148 typedef uint32_t PreprocessedEntityID;
150 /// \brief An ID number that refers to a submodule in a module file.
151 typedef uint32_t SubmoduleID;
153 /// \brief The number of predefined submodule IDs.
154 const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1;
156 /// \brief Source range/offset of a preprocessed entity.
157 struct PPEntityOffset {
158 /// \brief Raw source location of beginning of range.
160 /// \brief Raw source location of end of range.
162 /// \brief Offset in the AST file.
165 PPEntityOffset(SourceRange R, uint32_t BitOffset)
166 : Begin(R.getBegin().getRawEncoding()),
167 End(R.getEnd().getRawEncoding()),
168 BitOffset(BitOffset) { }
171 /// \brief Source range/offset of a preprocessed entity.
173 /// \brief Raw source location.
175 /// \brief Offset in the AST file.
178 DeclOffset() : Loc(0), BitOffset(0) { }
179 DeclOffset(SourceLocation Loc, uint32_t BitOffset)
180 : Loc(Loc.getRawEncoding()),
181 BitOffset(BitOffset) { }
182 void setLocation(SourceLocation L) {
183 Loc = L.getRawEncoding();
187 /// \brief The number of predefined preprocessed entity IDs.
188 const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1;
190 /// \brief Describes the various kinds of blocks that occur within
193 /// \brief The AST block, which acts as a container around the
195 AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
197 /// \brief The block containing information about the source
199 SOURCE_MANAGER_BLOCK_ID,
201 /// \brief The block containing information about the
203 PREPROCESSOR_BLOCK_ID,
205 /// \brief The block containing the definitions of all of the
206 /// types and decls used within the AST file.
209 /// \brief The block containing DECL_UPDATES records.
210 DECL_UPDATES_BLOCK_ID,
212 /// \brief The block containing the detailed preprocessing record.
213 PREPROCESSOR_DETAIL_BLOCK_ID,
215 /// \brief The block containing the submodule structure.
218 /// \brief The block containing comments.
221 /// \brief The control block, which contains all of the
222 /// information that needs to be validated prior to committing
223 /// to loading the AST file.
226 /// \brief The block of input files, which were used as inputs
227 /// to create this AST file.
229 /// This block is part of the control block.
233 /// \brief Record types that occur within the control block.
234 enum ControlRecordTypes {
235 /// \brief AST file metadata, including the AST file version number
236 /// and information about the compiler used to build this AST file.
239 /// \brief Record code for the list of other AST files imported by
243 /// \brief Record code for the language options table.
245 /// The record with this code contains the contents of the
246 /// LangOptions structure. We serialize the entire contents of
247 /// the structure, and let the reader decide which options are
248 /// actually important to check.
249 LANGUAGE_OPTIONS = 3,
251 /// \brief Record code for the target options table.
254 /// \brief Record code for the original file that was used to
255 /// generate the AST file, including both its file ID and its
259 /// \brief The directory that the PCH was originally created in.
260 ORIGINAL_PCH_DIR = 6,
262 /// \brief Offsets into the input-files block where input files
264 INPUT_FILE_OFFSETS = 7,
266 /// \brief Record code for the diagnostic options table.
267 DIAGNOSTIC_OPTIONS = 8,
269 /// \brief Record code for the filesystem options table.
270 FILE_SYSTEM_OPTIONS = 9,
272 /// \brief Record code for the headers search options table.
273 HEADER_SEARCH_OPTIONS = 10,
275 /// \brief Record code for the preprocessor options table.
276 PREPROCESSOR_OPTIONS = 11
279 /// \brief Record types that occur within the input-files block
280 /// inside the control block.
281 enum InputFileRecordTypes {
282 /// \brief An input file.
286 /// \brief Record types that occur within the AST block itself.
287 enum ASTRecordTypes {
288 /// \brief Record code for the offsets of each type.
290 /// The TYPE_OFFSET constant describes the record that occurs
291 /// within the AST block. The record itself is an array of offsets that
292 /// point into the declarations and types block (identified by
293 /// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
294 /// of a type. For a given type ID @c T, the lower three bits of
295 /// @c T are its qualifiers (const, volatile, restrict), as in
296 /// the QualType class. The upper bits, after being shifted and
297 /// subtracting NUM_PREDEF_TYPE_IDS, are used to index into the
298 /// TYPE_OFFSET block to determine the offset of that type's
299 /// corresponding record within the DECLTYPES_BLOCK_ID block.
302 /// \brief Record code for the offsets of each decl.
304 /// The DECL_OFFSET constant describes the record that occurs
305 /// within the block identified by DECL_OFFSETS_BLOCK_ID within
306 /// the AST block. The record itself is an array of offsets that
307 /// point into the declarations and types block (identified by
308 /// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
309 /// record, after subtracting one to account for the use of
310 /// declaration ID 0 for a NULL declaration pointer. Index 0 is
311 /// reserved for the translation unit declaration.
314 /// \brief Record code for the table of offsets of each
317 /// The offset table contains offsets into the blob stored in
318 /// the IDENTIFIER_TABLE record. Each offset points to the
319 /// NULL-terminated string that corresponds to that identifier.
320 IDENTIFIER_OFFSET = 3,
322 /// \brief Record code for the identifier table.
324 /// The identifier table is a simple blob that contains
325 /// NULL-terminated strings for all of the identifiers
326 /// referenced by the AST file. The IDENTIFIER_OFFSET table
327 /// contains the mapping from identifier IDs to the characters
328 /// in this blob. Note that the starting offsets of all of the
329 /// identifiers are odd, so that, when the identifier offset
330 /// table is loaded in, we can use the low bit to distinguish
331 /// between offsets (for unresolved identifier IDs) and
332 /// IdentifierInfo pointers (for already-resolved identifier
334 IDENTIFIER_TABLE = 4,
336 /// \brief Record code for the array of external definitions.
338 /// The AST file contains a list of all of the unnamed external
339 /// definitions present within the parsed headers, stored as an
340 /// array of declaration IDs. These external definitions will be
341 /// reported to the AST consumer after the AST file has been
342 /// read, since their presence can affect the semantics of the
343 /// program (e.g., for code generation).
344 EXTERNAL_DEFINITIONS = 5,
346 /// \brief Record code for the set of non-builtin, special
349 /// This record contains the type IDs for the various type nodes
350 /// that are constructed during semantic analysis (e.g.,
351 /// __builtin_va_list). The SPECIAL_TYPE_* constants provide
352 /// offsets into this record.
355 /// \brief Record code for the extra statistics we gather while
356 /// generating an AST file.
359 /// \brief Record code for the array of tentative definitions.
360 TENTATIVE_DEFINITIONS = 8,
362 /// \brief Record code for the array of locally-scoped external
364 LOCALLY_SCOPED_EXTERNAL_DECLS = 9,
366 /// \brief Record code for the table of offsets into the
367 /// Objective-C method pool.
368 SELECTOR_OFFSETS = 10,
370 /// \brief Record code for the Objective-C method pool,
373 /// \brief The value of the next __COUNTER__ to dispense.
374 /// [PP_COUNTER_VALUE, Val]
375 PP_COUNTER_VALUE = 12,
377 /// \brief Record code for the table of offsets into the block
378 /// of source-location information.
379 SOURCE_LOCATION_OFFSETS = 13,
381 /// \brief Record code for the set of source location entries
382 /// that need to be preloaded by the AST reader.
384 /// This set contains the source location entry for the
385 /// predefines buffer and for any file entries that need to be
387 SOURCE_LOCATION_PRELOADS = 14,
389 /// \brief Record code for the set of ext_vector type names.
390 EXT_VECTOR_DECLS = 16,
392 /// \brief Record code for the array of unused file scoped decls.
393 UNUSED_FILESCOPED_DECLS = 17,
395 /// \brief Record code for the table of offsets to entries in the
396 /// preprocessing record.
397 PPD_ENTITIES_OFFSETS = 18,
399 /// \brief Record code for the array of VTable uses.
402 /// \brief Record code for the array of dynamic classes.
403 DYNAMIC_CLASSES = 20,
405 /// \brief Record code for referenced selector pool.
406 REFERENCED_SELECTOR_POOL = 21,
408 /// \brief Record code for an update to the TU's lexically contained
410 TU_UPDATE_LEXICAL = 22,
412 /// \brief Record code for the array describing the locations (in the
413 /// LOCAL_REDECLARATIONS record) of the redeclaration chains, indexed by
414 /// the first known ID.
415 LOCAL_REDECLARATIONS_MAP = 23,
417 /// \brief Record code for declarations that Sema keeps references of.
420 /// \brief Record code for weak undeclared identifiers.
421 WEAK_UNDECLARED_IDENTIFIERS = 25,
423 /// \brief Record code for pending implicit instantiations.
424 PENDING_IMPLICIT_INSTANTIATIONS = 26,
426 /// \brief Record code for a decl replacement block.
428 /// If a declaration is modified after having been deserialized, and then
429 /// written to a dependent AST file, its ID and offset must be added to
430 /// the replacement block.
431 DECL_REPLACEMENTS = 27,
433 /// \brief Record code for an update to a decl context's lookup table.
435 /// In practice, this should only be used for the TU and namespaces.
438 /// \brief Record for offsets of DECL_UPDATES records for declarations
439 /// that were modified after being deserialized and need updates.
440 DECL_UPDATE_OFFSETS = 29,
442 /// \brief Record of updates for a declaration that was modified after
443 /// being deserialized.
446 /// \brief Record code for the table of offsets to CXXBaseSpecifier
448 CXX_BASE_SPECIFIER_OFFSETS = 31,
450 /// \brief Record code for \#pragma diagnostic mappings.
451 DIAG_PRAGMA_MAPPINGS = 32,
453 /// \brief Record code for special CUDA declarations.
454 CUDA_SPECIAL_DECL_REFS = 33,
456 /// \brief Record code for header search information.
457 HEADER_SEARCH_TABLE = 34,
459 /// \brief Record code for floating point \#pragma options.
460 FP_PRAGMA_OPTIONS = 35,
462 /// \brief Record code for enabled OpenCL extensions.
463 OPENCL_EXTENSIONS = 36,
465 /// \brief The list of delegating constructor declarations.
466 DELEGATING_CTORS = 37,
468 /// \brief Record code for the set of known namespaces, which are used
469 /// for typo correction.
470 KNOWN_NAMESPACES = 38,
472 /// \brief Record code for the remapping information used to relate
473 /// loaded modules to the various offsets and IDs(e.g., source location
474 /// offests, declaration and type IDs) that are used in that module to
475 /// refer to other modules.
476 MODULE_OFFSET_MAP = 39,
478 /// \brief Record code for the source manager line table information,
479 /// which stores information about \#line directives.
480 SOURCE_MANAGER_LINE_TABLE = 40,
482 /// \brief Record code for map of Objective-C class definition IDs to the
483 /// ObjC categories in a module that are attached to that class.
484 OBJC_CATEGORIES_MAP = 41,
486 /// \brief Record code for a file sorted array of DeclIDs in a module.
487 FILE_SORTED_DECLS = 42,
489 /// \brief Record code for an array of all of the (sub)modules that were
490 /// imported by the AST file.
491 IMPORTED_MODULES = 43,
493 /// \brief Record code for the set of merged declarations in an AST file.
494 MERGED_DECLARATIONS = 44,
496 /// \brief Record code for the array of redeclaration chains.
498 /// This array can only be interpreted properly using the local
499 /// redeclarations map.
500 LOCAL_REDECLARATIONS = 45,
502 /// \brief Record code for the array of Objective-C categories (including
505 /// This array can only be interpreted properly using the Objective-C
507 OBJC_CATEGORIES = 46,
509 /// \brief Record code for the table of offsets of each macro ID.
511 /// The offset table contains offsets into the blob stored in
512 /// the preprocessor block. Each offset points to the corresponding
513 /// macro definition.
516 /// \brief Record of updates for a macro that was modified after
517 /// being deserialized.
521 /// \brief Record types used within a source manager block.
522 enum SourceManagerRecordTypes {
523 /// \brief Describes a source location entry (SLocEntry) for a
525 SM_SLOC_FILE_ENTRY = 1,
526 /// \brief Describes a source location entry (SLocEntry) for a
528 SM_SLOC_BUFFER_ENTRY = 2,
529 /// \brief Describes a blob that contains the data for a buffer
530 /// entry. This kind of record always directly follows a
531 /// SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an
532 /// overridden buffer.
533 SM_SLOC_BUFFER_BLOB = 3,
534 /// \brief Describes a source location entry (SLocEntry) for a
536 SM_SLOC_EXPANSION_ENTRY = 4
539 /// \brief Record types used within a preprocessor block.
540 enum PreprocessorRecordTypes {
541 // The macros in the PP section are a PP_MACRO_* instance followed by a
542 // list of PP_TOKEN instances for each token in the definition.
544 /// \brief An object-like macro definition.
545 /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed]
546 PP_MACRO_OBJECT_LIKE = 1,
548 /// \brief A function-like macro definition.
549 /// [PP_MACRO_FUNCTION_LIKE, \<ObjectLikeStuff>, IsC99Varargs,
550 /// IsGNUVarars, NumArgs, ArgIdentInfoID* ]
551 PP_MACRO_FUNCTION_LIKE = 2,
553 /// \brief Describes one token.
554 /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags]
558 /// \brief Record types used within a preprocessor detail block.
559 enum PreprocessorDetailRecordTypes {
560 /// \brief Describes a macro expansion within the preprocessing record.
561 PPD_MACRO_EXPANSION = 0,
563 /// \brief Describes a macro definition within the preprocessing record.
564 PPD_MACRO_DEFINITION = 1,
566 /// \brief Describes an inclusion directive within the preprocessing
568 PPD_INCLUSION_DIRECTIVE = 2
571 /// \brief Record types used within a submodule description block.
572 enum SubmoduleRecordTypes {
573 /// \brief Metadata for submodules as a whole.
574 SUBMODULE_METADATA = 0,
575 /// \brief Defines the major attributes of a submodule, including its
577 SUBMODULE_DEFINITION = 1,
578 /// \brief Specifies the umbrella header used to create this module,
580 SUBMODULE_UMBRELLA_HEADER = 2,
581 /// \brief Specifies a header that falls into this (sub)module.
582 SUBMODULE_HEADER = 3,
583 /// \brief Specifies a top-level header that falls into this (sub)module.
584 SUBMODULE_TOPHEADER = 4,
585 /// \brief Specifies an umbrella directory.
586 SUBMODULE_UMBRELLA_DIR = 5,
587 /// \brief Specifies the submodules that are imported by this
589 SUBMODULE_IMPORTS = 6,
590 /// \brief Specifies the submodules that are re-exported from this
592 SUBMODULE_EXPORTS = 7,
593 /// \brief Specifies a required feature.
594 SUBMODULE_REQUIRES = 8,
595 /// \brief Specifies a header that has been explicitly excluded
596 /// from this submodule.
597 SUBMODULE_EXCLUDED_HEADER = 9
600 /// \brief Record types used within a comments block.
601 enum CommentRecordTypes {
602 COMMENTS_RAW_COMMENT = 0
605 /// \defgroup ASTAST AST file AST constants
607 /// The constants in this group describe various components of the
608 /// abstract syntax tree within an AST file.
612 /// \brief Predefined type IDs.
614 /// These type IDs correspond to predefined types in the AST
615 /// context, such as built-in types (int) and special place-holder
616 /// types (the \<overload> and \<dependent> type markers). Such
617 /// types are never actually serialized, since they will be built
618 /// by the AST context when it is created.
619 enum PredefinedTypeIDs {
620 /// \brief The NULL type.
621 PREDEF_TYPE_NULL_ID = 0,
622 /// \brief The void type.
623 PREDEF_TYPE_VOID_ID = 1,
624 /// \brief The 'bool' or '_Bool' type.
625 PREDEF_TYPE_BOOL_ID = 2,
626 /// \brief The 'char' type, when it is unsigned.
627 PREDEF_TYPE_CHAR_U_ID = 3,
628 /// \brief The 'unsigned char' type.
629 PREDEF_TYPE_UCHAR_ID = 4,
630 /// \brief The 'unsigned short' type.
631 PREDEF_TYPE_USHORT_ID = 5,
632 /// \brief The 'unsigned int' type.
633 PREDEF_TYPE_UINT_ID = 6,
634 /// \brief The 'unsigned long' type.
635 PREDEF_TYPE_ULONG_ID = 7,
636 /// \brief The 'unsigned long long' type.
637 PREDEF_TYPE_ULONGLONG_ID = 8,
638 /// \brief The 'char' type, when it is signed.
639 PREDEF_TYPE_CHAR_S_ID = 9,
640 /// \brief The 'signed char' type.
641 PREDEF_TYPE_SCHAR_ID = 10,
642 /// \brief The C++ 'wchar_t' type.
643 PREDEF_TYPE_WCHAR_ID = 11,
644 /// \brief The (signed) 'short' type.
645 PREDEF_TYPE_SHORT_ID = 12,
646 /// \brief The (signed) 'int' type.
647 PREDEF_TYPE_INT_ID = 13,
648 /// \brief The (signed) 'long' type.
649 PREDEF_TYPE_LONG_ID = 14,
650 /// \brief The (signed) 'long long' type.
651 PREDEF_TYPE_LONGLONG_ID = 15,
652 /// \brief The 'float' type.
653 PREDEF_TYPE_FLOAT_ID = 16,
654 /// \brief The 'double' type.
655 PREDEF_TYPE_DOUBLE_ID = 17,
656 /// \brief The 'long double' type.
657 PREDEF_TYPE_LONGDOUBLE_ID = 18,
658 /// \brief The placeholder type for overloaded function sets.
659 PREDEF_TYPE_OVERLOAD_ID = 19,
660 /// \brief The placeholder type for dependent types.
661 PREDEF_TYPE_DEPENDENT_ID = 20,
662 /// \brief The '__uint128_t' type.
663 PREDEF_TYPE_UINT128_ID = 21,
664 /// \brief The '__int128_t' type.
665 PREDEF_TYPE_INT128_ID = 22,
666 /// \brief The type of 'nullptr'.
667 PREDEF_TYPE_NULLPTR_ID = 23,
668 /// \brief The C++ 'char16_t' type.
669 PREDEF_TYPE_CHAR16_ID = 24,
670 /// \brief The C++ 'char32_t' type.
671 PREDEF_TYPE_CHAR32_ID = 25,
672 /// \brief The ObjC 'id' type.
673 PREDEF_TYPE_OBJC_ID = 26,
674 /// \brief The ObjC 'Class' type.
675 PREDEF_TYPE_OBJC_CLASS = 27,
676 /// \brief The ObjC 'SEL' type.
677 PREDEF_TYPE_OBJC_SEL = 28,
678 /// \brief The 'unknown any' placeholder type.
679 PREDEF_TYPE_UNKNOWN_ANY = 29,
680 /// \brief The placeholder type for bound member functions.
681 PREDEF_TYPE_BOUND_MEMBER = 30,
682 /// \brief The "auto" deduction type.
683 PREDEF_TYPE_AUTO_DEDUCT = 31,
684 /// \brief The "auto &&" deduction type.
685 PREDEF_TYPE_AUTO_RREF_DEDUCT = 32,
686 /// \brief The OpenCL 'half' / ARM NEON __fp16 type.
687 PREDEF_TYPE_HALF_ID = 33,
688 /// \brief ARC's unbridged-cast placeholder type.
689 PREDEF_TYPE_ARC_UNBRIDGED_CAST = 34,
690 /// \brief The pseudo-object placeholder type.
691 PREDEF_TYPE_PSEUDO_OBJECT = 35,
692 /// \brief The __va_list_tag placeholder type.
693 PREDEF_TYPE_VA_LIST_TAG = 36,
694 /// \brief The placeholder type for builtin functions.
695 PREDEF_TYPE_BUILTIN_FN = 37
698 /// \brief The number of predefined type IDs that are reserved for
699 /// the PREDEF_TYPE_* constants.
701 /// Type IDs for non-predefined types will start at
702 /// NUM_PREDEF_TYPE_IDs.
703 const unsigned NUM_PREDEF_TYPE_IDS = 100;
705 /// \brief The number of allowed abbreviations in bits
706 const unsigned NUM_ALLOWED_ABBREVS_SIZE = 4;
708 /// \brief Record codes for each kind of type.
710 /// These constants describe the type records that can occur within a
711 /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
712 /// constant describes a record for a specific type class in the
715 /// \brief An ExtQualType record.
717 /// \brief A ComplexType record.
719 /// \brief A PointerType record.
721 /// \brief A BlockPointerType record.
722 TYPE_BLOCK_POINTER = 5,
723 /// \brief An LValueReferenceType record.
724 TYPE_LVALUE_REFERENCE = 6,
725 /// \brief An RValueReferenceType record.
726 TYPE_RVALUE_REFERENCE = 7,
727 /// \brief A MemberPointerType record.
728 TYPE_MEMBER_POINTER = 8,
729 /// \brief A ConstantArrayType record.
730 TYPE_CONSTANT_ARRAY = 9,
731 /// \brief An IncompleteArrayType record.
732 TYPE_INCOMPLETE_ARRAY = 10,
733 /// \brief A VariableArrayType record.
734 TYPE_VARIABLE_ARRAY = 11,
735 /// \brief A VectorType record.
737 /// \brief An ExtVectorType record.
738 TYPE_EXT_VECTOR = 13,
739 /// \brief A FunctionNoProtoType record.
740 TYPE_FUNCTION_NO_PROTO = 14,
741 /// \brief A FunctionProtoType record.
742 TYPE_FUNCTION_PROTO = 15,
743 /// \brief A TypedefType record.
745 /// \brief A TypeOfExprType record.
746 TYPE_TYPEOF_EXPR = 17,
747 /// \brief A TypeOfType record.
749 /// \brief A RecordType record.
751 /// \brief An EnumType record.
753 /// \brief An ObjCInterfaceType record.
754 TYPE_OBJC_INTERFACE = 21,
755 /// \brief An ObjCObjectPointerType record.
756 TYPE_OBJC_OBJECT_POINTER = 22,
757 /// \brief a DecltypeType record.
759 /// \brief An ElaboratedType record.
760 TYPE_ELABORATED = 24,
761 /// \brief A SubstTemplateTypeParmType record.
762 TYPE_SUBST_TEMPLATE_TYPE_PARM = 25,
763 /// \brief An UnresolvedUsingType record.
764 TYPE_UNRESOLVED_USING = 26,
765 /// \brief An InjectedClassNameType record.
766 TYPE_INJECTED_CLASS_NAME = 27,
767 /// \brief An ObjCObjectType record.
768 TYPE_OBJC_OBJECT = 28,
769 /// \brief An TemplateTypeParmType record.
770 TYPE_TEMPLATE_TYPE_PARM = 29,
771 /// \brief An TemplateSpecializationType record.
772 TYPE_TEMPLATE_SPECIALIZATION = 30,
773 /// \brief A DependentNameType record.
774 TYPE_DEPENDENT_NAME = 31,
775 /// \brief A DependentTemplateSpecializationType record.
776 TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32,
777 /// \brief A DependentSizedArrayType record.
778 TYPE_DEPENDENT_SIZED_ARRAY = 33,
779 /// \brief A ParenType record.
781 /// \brief A PackExpansionType record.
782 TYPE_PACK_EXPANSION = 35,
783 /// \brief An AttributedType record.
784 TYPE_ATTRIBUTED = 36,
785 /// \brief A SubstTemplateTypeParmPackType record.
786 TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37,
787 /// \brief A AutoType record.
789 /// \brief A UnaryTransformType record.
790 TYPE_UNARY_TRANSFORM = 39,
791 /// \brief An AtomicType record.
795 /// \brief The type IDs for special types constructed by semantic
798 /// The constants in this enumeration are indices into the
799 /// SPECIAL_TYPES record.
800 enum SpecialTypeIDs {
801 /// \brief CFConstantString type
802 SPECIAL_TYPE_CF_CONSTANT_STRING = 0,
803 /// \brief C FILE typedef type
804 SPECIAL_TYPE_FILE = 1,
805 /// \brief C jmp_buf typedef type
806 SPECIAL_TYPE_JMP_BUF = 2,
807 /// \brief C sigjmp_buf typedef type
808 SPECIAL_TYPE_SIGJMP_BUF = 3,
809 /// \brief Objective-C "id" redefinition type
810 SPECIAL_TYPE_OBJC_ID_REDEFINITION = 4,
811 /// \brief Objective-C "Class" redefinition type
812 SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 5,
813 /// \brief Objective-C "SEL" redefinition type
814 SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 6,
815 /// \brief C ucontext_t typedef type
816 SPECIAL_TYPE_UCONTEXT_T = 7
819 /// \brief The number of special type IDs.
820 const unsigned NumSpecialTypeIDs = 8;
822 /// \brief Predefined declaration IDs.
824 /// These declaration IDs correspond to predefined declarations in the AST
825 /// context, such as the NULL declaration ID. Such declarations are never
826 /// actually serialized, since they will be built by the AST context when
828 enum PredefinedDeclIDs {
829 /// \brief The NULL declaration.
830 PREDEF_DECL_NULL_ID = 0,
832 /// \brief The translation unit.
833 PREDEF_DECL_TRANSLATION_UNIT_ID = 1,
835 /// \brief The Objective-C 'id' type.
836 PREDEF_DECL_OBJC_ID_ID = 2,
838 /// \brief The Objective-C 'SEL' type.
839 PREDEF_DECL_OBJC_SEL_ID = 3,
841 /// \brief The Objective-C 'Class' type.
842 PREDEF_DECL_OBJC_CLASS_ID = 4,
844 /// \brief The Objective-C 'Protocol' type.
845 PREDEF_DECL_OBJC_PROTOCOL_ID = 5,
847 /// \brief The signed 128-bit integer type.
848 PREDEF_DECL_INT_128_ID = 6,
850 /// \brief The unsigned 128-bit integer type.
851 PREDEF_DECL_UNSIGNED_INT_128_ID = 7,
853 /// \brief The internal 'instancetype' typedef.
854 PREDEF_DECL_OBJC_INSTANCETYPE_ID = 8,
856 /// \brief The internal '__builtin_va_list' typedef.
857 PREDEF_DECL_BUILTIN_VA_LIST_ID = 9
860 /// \brief The number of declaration IDs that are predefined.
862 /// For more information about predefined declarations, see the
863 /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants.
864 const unsigned int NUM_PREDEF_DECL_IDS = 10;
866 /// \brief Record codes for each kind of declaration.
868 /// These constants describe the declaration records that can occur within
869 /// a declarations block (identified by DECLS_BLOCK_ID). Each
870 /// constant describes a record for a specific declaration class
873 /// \brief A TypedefDecl record.
875 /// \brief A TypeAliasDecl record.
877 /// \brief An EnumDecl record.
879 /// \brief A RecordDecl record.
881 /// \brief An EnumConstantDecl record.
883 /// \brief A FunctionDecl record.
885 /// \brief A ObjCMethodDecl record.
887 /// \brief A ObjCInterfaceDecl record.
889 /// \brief A ObjCProtocolDecl record.
891 /// \brief A ObjCIvarDecl record.
893 /// \brief A ObjCAtDefsFieldDecl record.
894 DECL_OBJC_AT_DEFS_FIELD,
895 /// \brief A ObjCCategoryDecl record.
897 /// \brief A ObjCCategoryImplDecl record.
898 DECL_OBJC_CATEGORY_IMPL,
899 /// \brief A ObjCImplementationDecl record.
900 DECL_OBJC_IMPLEMENTATION,
901 /// \brief A ObjCCompatibleAliasDecl record.
902 DECL_OBJC_COMPATIBLE_ALIAS,
903 /// \brief A ObjCPropertyDecl record.
905 /// \brief A ObjCPropertyImplDecl record.
906 DECL_OBJC_PROPERTY_IMPL,
907 /// \brief A FieldDecl record.
909 /// \brief A VarDecl record.
911 /// \brief An ImplicitParamDecl record.
913 /// \brief A ParmVarDecl record.
915 /// \brief A FileScopeAsmDecl record.
917 /// \brief A BlockDecl record.
919 /// \brief A record that stores the set of declarations that are
920 /// lexically stored within a given DeclContext.
922 /// The record itself is a blob that is an array of declaration IDs,
923 /// in the order in which those declarations were added to the
924 /// declaration context. This data is used when iterating over
925 /// the contents of a DeclContext, e.g., via
926 /// DeclContext::decls_begin() and DeclContext::decls_end().
927 DECL_CONTEXT_LEXICAL,
928 /// \brief A record that stores the set of declarations that are
929 /// visible from a given DeclContext.
931 /// The record itself stores a set of mappings, each of which
932 /// associates a declaration name with one or more declaration
933 /// IDs. This data is used when performing qualified name lookup
934 /// into a DeclContext via DeclContext::lookup.
935 DECL_CONTEXT_VISIBLE,
936 /// \brief A LabelDecl record.
938 /// \brief A NamespaceDecl record.
940 /// \brief A NamespaceAliasDecl record.
941 DECL_NAMESPACE_ALIAS,
942 /// \brief A UsingDecl record.
944 /// \brief A UsingShadowDecl record.
946 /// \brief A UsingDirecitveDecl record.
947 DECL_USING_DIRECTIVE,
948 /// \brief An UnresolvedUsingValueDecl record.
949 DECL_UNRESOLVED_USING_VALUE,
950 /// \brief An UnresolvedUsingTypenameDecl record.
951 DECL_UNRESOLVED_USING_TYPENAME,
952 /// \brief A LinkageSpecDecl record.
954 /// \brief A CXXRecordDecl record.
956 /// \brief A CXXMethodDecl record.
958 /// \brief A CXXConstructorDecl record.
959 DECL_CXX_CONSTRUCTOR,
960 /// \brief A CXXDestructorDecl record.
962 /// \brief A CXXConversionDecl record.
964 /// \brief An AccessSpecDecl record.
967 /// \brief A FriendDecl record.
969 /// \brief A FriendTemplateDecl record.
970 DECL_FRIEND_TEMPLATE,
971 /// \brief A ClassTemplateDecl record.
973 /// \brief A ClassTemplateSpecializationDecl record.
974 DECL_CLASS_TEMPLATE_SPECIALIZATION,
975 /// \brief A ClassTemplatePartialSpecializationDecl record.
976 DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION,
977 /// \brief A FunctionTemplateDecl record.
978 DECL_FUNCTION_TEMPLATE,
979 /// \brief A TemplateTypeParmDecl record.
980 DECL_TEMPLATE_TYPE_PARM,
981 /// \brief A NonTypeTemplateParmDecl record.
982 DECL_NON_TYPE_TEMPLATE_PARM,
983 /// \brief A TemplateTemplateParmDecl record.
984 DECL_TEMPLATE_TEMPLATE_PARM,
985 /// \brief A TypeAliasTemplateDecl record.
986 DECL_TYPE_ALIAS_TEMPLATE,
987 /// \brief A StaticAssertDecl record.
989 /// \brief A record containing CXXBaseSpecifiers.
990 DECL_CXX_BASE_SPECIFIERS,
991 /// \brief A IndirectFieldDecl record.
993 /// \brief A NonTypeTemplateParmDecl record that stores an expanded
994 /// non-type template parameter pack.
995 DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK,
996 /// \brief A TemplateTemplateParmDecl record that stores an expanded
997 /// template template parameter pack.
998 DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK,
999 /// \brief A ClassScopeFunctionSpecializationDecl record a class scope
1000 /// function specialization. (Microsoft extension).
1001 DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION,
1002 /// \brief An ImportDecl recording a module import.
1006 /// \brief Record codes for each kind of statement or expression.
1008 /// These constants describe the records that describe statements
1009 /// or expressions. These records occur within type and declarations
1010 /// block, so they begin with record values of 100. Each constant
1011 /// describes a record for a specific statement or expression class in the
1014 /// \brief A marker record that indicates that we are at the end
1015 /// of an expression.
1017 /// \brief A NULL expression.
1019 /// \brief A reference to a previously [de]serialized Stmt record.
1021 /// \brief A NullStmt record.
1023 /// \brief A CompoundStmt record.
1025 /// \brief A CaseStmt record.
1027 /// \brief A DefaultStmt record.
1029 /// \brief A LabelStmt record.
1031 /// \brief An AttributedStmt record.
1033 /// \brief An IfStmt record.
1035 /// \brief A SwitchStmt record.
1037 /// \brief A WhileStmt record.
1039 /// \brief A DoStmt record.
1041 /// \brief A ForStmt record.
1043 /// \brief A GotoStmt record.
1045 /// \brief An IndirectGotoStmt record.
1047 /// \brief A ContinueStmt record.
1049 /// \brief A BreakStmt record.
1051 /// \brief A ReturnStmt record.
1053 /// \brief A DeclStmt record.
1055 /// \brief A GCC-style AsmStmt record.
1057 /// \brief A MS-style AsmStmt record.
1059 /// \brief A PredefinedExpr record.
1061 /// \brief A DeclRefExpr record.
1063 /// \brief An IntegerLiteral record.
1064 EXPR_INTEGER_LITERAL,
1065 /// \brief A FloatingLiteral record.
1066 EXPR_FLOATING_LITERAL,
1067 /// \brief An ImaginaryLiteral record.
1068 EXPR_IMAGINARY_LITERAL,
1069 /// \brief A StringLiteral record.
1070 EXPR_STRING_LITERAL,
1071 /// \brief A CharacterLiteral record.
1072 EXPR_CHARACTER_LITERAL,
1073 /// \brief A ParenExpr record.
1075 /// \brief A ParenListExpr record.
1077 /// \brief A UnaryOperator record.
1078 EXPR_UNARY_OPERATOR,
1079 /// \brief An OffsetOfExpr record.
1081 /// \brief A SizefAlignOfExpr record.
1082 EXPR_SIZEOF_ALIGN_OF,
1083 /// \brief An ArraySubscriptExpr record.
1084 EXPR_ARRAY_SUBSCRIPT,
1085 /// \brief A CallExpr record.
1087 /// \brief A MemberExpr record.
1089 /// \brief A BinaryOperator record.
1090 EXPR_BINARY_OPERATOR,
1091 /// \brief A CompoundAssignOperator record.
1092 EXPR_COMPOUND_ASSIGN_OPERATOR,
1093 /// \brief A ConditionOperator record.
1094 EXPR_CONDITIONAL_OPERATOR,
1095 /// \brief An ImplicitCastExpr record.
1097 /// \brief A CStyleCastExpr record.
1099 /// \brief A CompoundLiteralExpr record.
1100 EXPR_COMPOUND_LITERAL,
1101 /// \brief An ExtVectorElementExpr record.
1102 EXPR_EXT_VECTOR_ELEMENT,
1103 /// \brief An InitListExpr record.
1105 /// \brief A DesignatedInitExpr record.
1106 EXPR_DESIGNATED_INIT,
1107 /// \brief An ImplicitValueInitExpr record.
1108 EXPR_IMPLICIT_VALUE_INIT,
1109 /// \brief A VAArgExpr record.
1111 /// \brief An AddrLabelExpr record.
1113 /// \brief A StmtExpr record.
1115 /// \brief A ChooseExpr record.
1117 /// \brief A GNUNullExpr record.
1119 /// \brief A ShuffleVectorExpr record.
1120 EXPR_SHUFFLE_VECTOR,
1121 /// \brief BlockExpr
1123 /// \brief A GenericSelectionExpr record.
1124 EXPR_GENERIC_SELECTION,
1125 /// \brief A PseudoObjectExpr record.
1127 /// \brief An AtomicExpr record.
1132 /// \brief An ObjCStringLiteral record.
1133 EXPR_OBJC_STRING_LITERAL,
1135 EXPR_OBJC_BOXED_EXPRESSION,
1136 EXPR_OBJC_ARRAY_LITERAL,
1137 EXPR_OBJC_DICTIONARY_LITERAL,
1140 /// \brief An ObjCEncodeExpr record.
1142 /// \brief An ObjCSelectorExpr record.
1143 EXPR_OBJC_SELECTOR_EXPR,
1144 /// \brief An ObjCProtocolExpr record.
1145 EXPR_OBJC_PROTOCOL_EXPR,
1146 /// \brief An ObjCIvarRefExpr record.
1147 EXPR_OBJC_IVAR_REF_EXPR,
1148 /// \brief An ObjCPropertyRefExpr record.
1149 EXPR_OBJC_PROPERTY_REF_EXPR,
1150 /// \brief An ObjCSubscriptRefExpr record.
1151 EXPR_OBJC_SUBSCRIPT_REF_EXPR,
1153 EXPR_OBJC_KVC_REF_EXPR,
1154 /// \brief An ObjCMessageExpr record.
1155 EXPR_OBJC_MESSAGE_EXPR,
1156 /// \brief An ObjCIsa Expr record.
1158 /// \brief An ObjCIndirectCopyRestoreExpr record.
1159 EXPR_OBJC_INDIRECT_COPY_RESTORE,
1161 /// \brief An ObjCForCollectionStmt record.
1162 STMT_OBJC_FOR_COLLECTION,
1163 /// \brief An ObjCAtCatchStmt record.
1165 /// \brief An ObjCAtFinallyStmt record.
1167 /// \brief An ObjCAtTryStmt record.
1169 /// \brief An ObjCAtSynchronizedStmt record.
1170 STMT_OBJC_AT_SYNCHRONIZED,
1171 /// \brief An ObjCAtThrowStmt record.
1173 /// \brief An ObjCAutoreleasePoolStmt record.
1174 STMT_OBJC_AUTORELEASE_POOL,
1175 /// \brief A ObjCBoolLiteralExpr record.
1176 EXPR_OBJC_BOOL_LITERAL,
1180 /// \brief A CXXCatchStmt record.
1182 /// \brief A CXXTryStmt record.
1184 /// \brief A CXXForRangeStmt record.
1187 /// \brief A CXXOperatorCallExpr record.
1188 EXPR_CXX_OPERATOR_CALL,
1189 /// \brief A CXXMemberCallExpr record.
1190 EXPR_CXX_MEMBER_CALL,
1191 /// \brief A CXXConstructExpr record.
1193 /// \brief A CXXTemporaryObjectExpr record.
1194 EXPR_CXX_TEMPORARY_OBJECT,
1195 /// \brief A CXXStaticCastExpr record.
1196 EXPR_CXX_STATIC_CAST,
1197 /// \brief A CXXDynamicCastExpr record.
1198 EXPR_CXX_DYNAMIC_CAST,
1199 /// \brief A CXXReinterpretCastExpr record.
1200 EXPR_CXX_REINTERPRET_CAST,
1201 /// \brief A CXXConstCastExpr record.
1202 EXPR_CXX_CONST_CAST,
1203 /// \brief A CXXFunctionalCastExpr record.
1204 EXPR_CXX_FUNCTIONAL_CAST,
1205 /// \brief A UserDefinedLiteral record.
1206 EXPR_USER_DEFINED_LITERAL,
1207 /// \brief A CXXBoolLiteralExpr record.
1208 EXPR_CXX_BOOL_LITERAL,
1209 EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr
1210 EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr).
1211 EXPR_CXX_TYPEID_TYPE, // CXXTypeidExpr (of type).
1212 EXPR_CXX_THIS, // CXXThisExpr
1213 EXPR_CXX_THROW, // CXXThrowExpr
1214 EXPR_CXX_DEFAULT_ARG, // CXXDefaultArgExpr
1215 EXPR_CXX_BIND_TEMPORARY, // CXXBindTemporaryExpr
1217 EXPR_CXX_SCALAR_VALUE_INIT, // CXXScalarValueInitExpr
1218 EXPR_CXX_NEW, // CXXNewExpr
1219 EXPR_CXX_DELETE, // CXXDeleteExpr
1220 EXPR_CXX_PSEUDO_DESTRUCTOR, // CXXPseudoDestructorExpr
1222 EXPR_EXPR_WITH_CLEANUPS, // ExprWithCleanups
1224 EXPR_CXX_DEPENDENT_SCOPE_MEMBER, // CXXDependentScopeMemberExpr
1225 EXPR_CXX_DEPENDENT_SCOPE_DECL_REF, // DependentScopeDeclRefExpr
1226 EXPR_CXX_UNRESOLVED_CONSTRUCT, // CXXUnresolvedConstructExpr
1227 EXPR_CXX_UNRESOLVED_MEMBER, // UnresolvedMemberExpr
1228 EXPR_CXX_UNRESOLVED_LOOKUP, // UnresolvedLookupExpr
1230 EXPR_CXX_UNARY_TYPE_TRAIT, // UnaryTypeTraitExpr
1231 EXPR_CXX_EXPRESSION_TRAIT, // ExpressionTraitExpr
1232 EXPR_CXX_NOEXCEPT, // CXXNoexceptExpr
1234 EXPR_OPAQUE_VALUE, // OpaqueValueExpr
1235 EXPR_BINARY_CONDITIONAL_OPERATOR, // BinaryConditionalOperator
1236 EXPR_BINARY_TYPE_TRAIT, // BinaryTypeTraitExpr
1237 EXPR_TYPE_TRAIT, // TypeTraitExpr
1238 EXPR_ARRAY_TYPE_TRAIT, // ArrayTypeTraitIntExpr
1240 EXPR_PACK_EXPANSION, // PackExpansionExpr
1241 EXPR_SIZEOF_PACK, // SizeOfPackExpr
1242 EXPR_SUBST_NON_TYPE_TEMPLATE_PARM, // SubstNonTypeTemplateParmExpr
1243 EXPR_SUBST_NON_TYPE_TEMPLATE_PARM_PACK,// SubstNonTypeTemplateParmPackExpr
1244 EXPR_FUNCTION_PARM_PACK, // FunctionParmPackExpr
1245 EXPR_MATERIALIZE_TEMPORARY, // MaterializeTemporaryExpr
1248 EXPR_CUDA_KERNEL_CALL, // CUDAKernelCallExpr
1251 EXPR_ASTYPE, // AsTypeExpr
1254 EXPR_CXX_UUIDOF_EXPR, // CXXUuidofExpr (of expr).
1255 EXPR_CXX_UUIDOF_TYPE, // CXXUuidofExpr (of type).
1256 STMT_SEH_EXCEPT, // SEHExceptStmt
1257 STMT_SEH_FINALLY, // SEHFinallyStmt
1258 STMT_SEH_TRY, // SEHTryStmt
1261 EXPR_OBJC_BRIDGED_CAST, // ObjCBridgedCastExpr
1263 STMT_MS_DEPENDENT_EXISTS, // MSDependentExistsStmt
1264 EXPR_LAMBDA // LambdaExpr
1267 /// \brief The kinds of designators that can occur in a
1268 /// DesignatedInitExpr.
1269 enum DesignatorTypes {
1270 /// \brief Field designator where only the field name is known.
1271 DESIG_FIELD_NAME = 0,
1272 /// \brief Field designator where the field has been resolved to
1274 DESIG_FIELD_DECL = 1,
1275 /// \brief Array designator.
1277 /// \brief GNU array range designator.
1278 DESIG_ARRAY_RANGE = 3
1281 /// \brief The different kinds of data that can occur in a
1282 /// CtorInitializer.
1283 enum CtorInitializerType {
1284 CTOR_INITIALIZER_BASE,
1285 CTOR_INITIALIZER_DELEGATING,
1286 CTOR_INITIALIZER_MEMBER,
1287 CTOR_INITIALIZER_INDIRECT_MEMBER
1290 /// \brief Describes the redeclarations of a declaration.
1291 struct LocalRedeclarationsInfo {
1292 DeclID FirstID; // The ID of the first declaration
1293 unsigned Offset; // Offset into the array of redeclaration chains.
1295 friend bool operator<(const LocalRedeclarationsInfo &X,
1296 const LocalRedeclarationsInfo &Y) {
1297 return X.FirstID < Y.FirstID;
1300 friend bool operator>(const LocalRedeclarationsInfo &X,
1301 const LocalRedeclarationsInfo &Y) {
1302 return X.FirstID > Y.FirstID;
1305 friend bool operator<=(const LocalRedeclarationsInfo &X,
1306 const LocalRedeclarationsInfo &Y) {
1307 return X.FirstID <= Y.FirstID;
1310 friend bool operator>=(const LocalRedeclarationsInfo &X,
1311 const LocalRedeclarationsInfo &Y) {
1312 return X.FirstID >= Y.FirstID;
1316 /// \brief Describes the categories of an Objective-C class.
1317 struct ObjCCategoriesInfo {
1318 DeclID DefinitionID; // The ID of the definition
1319 unsigned Offset; // Offset into the array of category lists.
1321 friend bool operator<(const ObjCCategoriesInfo &X,
1322 const ObjCCategoriesInfo &Y) {
1323 return X.DefinitionID < Y.DefinitionID;
1326 friend bool operator>(const ObjCCategoriesInfo &X,
1327 const ObjCCategoriesInfo &Y) {
1328 return X.DefinitionID > Y.DefinitionID;
1331 friend bool operator<=(const ObjCCategoriesInfo &X,
1332 const ObjCCategoriesInfo &Y) {
1333 return X.DefinitionID <= Y.DefinitionID;
1336 friend bool operator>=(const ObjCCategoriesInfo &X,
1337 const ObjCCategoriesInfo &Y) {
1338 return X.DefinitionID >= Y.DefinitionID;
1344 } // end namespace clang