diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
commit | 647be32c6048e24f90f470c557e850597e5526c3 (patch) | |
tree | 2be5c01566ec82e55fd30ceedef970efd887b4a5 /include/clang/Serialization | |
parent | c8ad1ab42f269f29bcf6385446e5b728aff7e4ad (diff) |
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.
Patch produced by
for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46320
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTBitCodes.h | 928 | ||||
-rw-r--r-- | include/clang/Serialization/ASTDeserializationListener.h | 18 | ||||
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 734 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 266 | ||||
-rw-r--r-- | include/clang/Serialization/ContinuousRangeMap.h | 4 | ||||
-rw-r--r-- | include/clang/Serialization/GlobalModuleIndex.h | 60 | ||||
-rw-r--r-- | include/clang/Serialization/Module.h | 168 | ||||
-rw-r--r-- | include/clang/Serialization/ModuleManager.h | 92 |
8 files changed, 1135 insertions, 1135 deletions
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index 4dbcd573bb..4ddffe1192 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -31,7 +31,7 @@ namespace clang { namespace serialization { - /// \brief AST file major version number supported by this version of + /// AST file major version number supported by this version of /// Clang. /// /// Whenever the AST file format changes in a way that makes it @@ -44,7 +44,7 @@ namespace serialization { /// AST files at this time. const unsigned VERSION_MAJOR = 6; - /// \brief AST file minor version number supported by this version of + /// AST file minor version number supported by this version of /// Clang. /// /// Whenever the AST format changes in a way that is still @@ -54,13 +54,13 @@ namespace serialization { /// should be increased. const unsigned VERSION_MINOR = 0; - /// \brief An ID number that refers to an identifier in an AST file. + /// An ID number that refers to an identifier in an AST file. /// /// The ID numbers of identifiers are consecutive (in order of discovery) /// and start at 1. 0 is reserved for NULL. using IdentifierID = uint32_t; - /// \brief An ID number that refers to a declaration in an AST file. + /// An ID number that refers to a declaration in an AST file. /// /// The ID numbers of declarations are consecutive (in order of /// discovery), with values below NUM_PREDEF_DECL_IDS being reserved. @@ -73,7 +73,7 @@ namespace serialization { using LocalDeclID = DeclID; using GlobalDeclID = DeclID; - /// \brief An ID number that refers to a type in an AST file. + /// An ID number that refers to a type in an AST file. /// /// The ID of a type is partitioned into two parts: the lower /// three bits are used to store the const/volatile/restrict @@ -85,7 +85,7 @@ namespace serialization { /// other types that have serialized representations. using TypeID = uint32_t; - /// \brief A type index; the type ID with the qualifier bits removed. + /// A type index; the type ID with the qualifier bits removed. class TypeIdx { uint32_t Idx = 0; @@ -131,58 +131,58 @@ namespace serialization { } }; - /// \brief An ID number that refers to an identifier in an AST file. + /// An ID number that refers to an identifier in an AST file. using IdentID = uint32_t; - /// \brief The number of predefined identifier IDs. + /// The number of predefined identifier IDs. const unsigned int NUM_PREDEF_IDENT_IDS = 1; - /// \brief An ID number that refers to a macro in an AST file. + /// An ID number that refers to a macro in an AST file. using MacroID = uint32_t; - /// \brief A global ID number that refers to a macro in an AST file. + /// A global ID number that refers to a macro in an AST file. using GlobalMacroID = uint32_t; - /// \brief A local to a module ID number that refers to a macro in an + /// A local to a module ID number that refers to a macro in an /// AST file. using LocalMacroID = uint32_t; - /// \brief The number of predefined macro IDs. + /// The number of predefined macro IDs. const unsigned int NUM_PREDEF_MACRO_IDS = 1; - /// \brief An ID number that refers to an ObjC selector in an AST file. + /// An ID number that refers to an ObjC selector in an AST file. using SelectorID = uint32_t; - /// \brief The number of predefined selector IDs. + /// The number of predefined selector IDs. const unsigned int NUM_PREDEF_SELECTOR_IDS = 1; - /// \brief An ID number that refers to a set of CXXBaseSpecifiers in an + /// An ID number that refers to a set of CXXBaseSpecifiers in an /// AST file. using CXXBaseSpecifiersID = uint32_t; - /// \brief An ID number that refers to a list of CXXCtorInitializers in an + /// An ID number that refers to a list of CXXCtorInitializers in an /// AST file. using CXXCtorInitializersID = uint32_t; - /// \brief An ID number that refers to an entity in the detailed + /// An ID number that refers to an entity in the detailed /// preprocessing record. using PreprocessedEntityID = uint32_t; - /// \brief An ID number that refers to a submodule in a module file. + /// An ID number that refers to a submodule in a module file. using SubmoduleID = uint32_t; - /// \brief The number of predefined submodule IDs. + /// The number of predefined submodule IDs. const unsigned int NUM_PREDEF_SUBMODULE_IDS = 1; - /// \brief Source range/offset of a preprocessed entity. + /// Source range/offset of a preprocessed entity. struct PPEntityOffset { - /// \brief Raw source location of beginning of range. + /// Raw source location of beginning of range. unsigned Begin; - /// \brief Raw source location of end of range. + /// Raw source location of end of range. unsigned End; - /// \brief Offset in the AST file. + /// Offset in the AST file. uint32_t BitOffset; PPEntityOffset(SourceRange R, uint32_t BitOffset) @@ -198,11 +198,11 @@ namespace serialization { } }; - /// \brief Source range of a skipped preprocessor region + /// Source range of a skipped preprocessor region struct PPSkippedRange { - /// \brief Raw source location of beginning of range. + /// Raw source location of beginning of range. unsigned Begin; - /// \brief Raw source location of end of range. + /// Raw source location of end of range. unsigned End; PPSkippedRange(SourceRange R) @@ -217,12 +217,12 @@ namespace serialization { } }; - /// \brief Source range/offset of a preprocessed entity. + /// Source range/offset of a preprocessed entity. struct DeclOffset { - /// \brief Raw source location. + /// Raw source location. unsigned Loc = 0; - /// \brief Offset in the AST file. + /// Offset in the AST file. uint32_t BitOffset = 0; DeclOffset() = default; @@ -238,56 +238,56 @@ namespace serialization { } }; - /// \brief The number of predefined preprocessed entity IDs. + /// The number of predefined preprocessed entity IDs. const unsigned int NUM_PREDEF_PP_ENTITY_IDS = 1; - /// \brief Describes the various kinds of blocks that occur within + /// Describes the various kinds of blocks that occur within /// an AST file. enum BlockIDs { - /// \brief The AST block, which acts as a container around the + /// The AST block, which acts as a container around the /// full AST block. AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID, - /// \brief The block containing information about the source + /// The block containing information about the source /// manager. SOURCE_MANAGER_BLOCK_ID, - /// \brief The block containing information about the + /// The block containing information about the /// preprocessor. PREPROCESSOR_BLOCK_ID, - /// \brief The block containing the definitions of all of the + /// The block containing the definitions of all of the /// types and decls used within the AST file. DECLTYPES_BLOCK_ID, - /// \brief The block containing the detailed preprocessing record. + /// The block containing the detailed preprocessing record. PREPROCESSOR_DETAIL_BLOCK_ID, - /// \brief The block containing the submodule structure. + /// The block containing the submodule structure. SUBMODULE_BLOCK_ID, - /// \brief The block containing comments. + /// The block containing comments. COMMENTS_BLOCK_ID, - /// \brief The control block, which contains all of the + /// The control block, which contains all of the /// information that needs to be validated prior to committing /// to loading the AST file. CONTROL_BLOCK_ID, - /// \brief The block of input files, which were used as inputs + /// The block of input files, which were used as inputs /// to create this AST file. /// /// This block is part of the control block. INPUT_FILES_BLOCK_ID, - /// \brief The block of configuration options, used to check that + /// The block of configuration options, used to check that /// a module is being used in a configuration compatible with the /// configuration in which it was built. /// /// This block is part of the control block. OPTIONS_BLOCK_ID, - /// \brief A block containing a module file extension. + /// A block containing a module file extension. EXTENSION_BLOCK_ID, /// A block with unhashed content. @@ -297,47 +297,47 @@ namespace serialization { UNHASHED_CONTROL_BLOCK_ID, }; - /// \brief Record types that occur within the control block. + /// Record types that occur within the control block. enum ControlRecordTypes { - /// \brief AST file metadata, including the AST file version number + /// AST file metadata, including the AST file version number /// and information about the compiler used to build this AST file. METADATA = 1, - /// \brief Record code for the list of other AST files imported by + /// Record code for the list of other AST files imported by /// this AST file. IMPORTS, - /// \brief Record code for the original file that was used to + /// Record code for the original file that was used to /// generate the AST file, including both its file ID and its /// name. ORIGINAL_FILE, - /// \brief The directory that the PCH was originally created in. + /// The directory that the PCH was originally created in. ORIGINAL_PCH_DIR, - /// \brief Record code for file ID of the file or buffer that was used to + /// Record code for file ID of the file or buffer that was used to /// generate the AST file. ORIGINAL_FILE_ID, - /// \brief Offsets into the input-files block where input files + /// Offsets into the input-files block where input files /// reside. INPUT_FILE_OFFSETS, - /// \brief Record code for the module name. + /// Record code for the module name. MODULE_NAME, - /// \brief Record code for the module map file that was used to build this + /// Record code for the module map file that was used to build this /// AST file. MODULE_MAP_FILE, - /// \brief Record code for the module build directory. + /// Record code for the module build directory. MODULE_DIRECTORY, }; - /// \brief Record types that occur within the options block inside + /// Record types that occur within the options block inside /// the control block. enum OptionsRecordTypes { - /// \brief Record code for the language options table. + /// Record code for the language options table. /// /// The record with this code contains the contents of the /// LangOptions structure. We serialize the entire contents of @@ -345,16 +345,16 @@ namespace serialization { /// actually important to check. LANGUAGE_OPTIONS = 1, - /// \brief Record code for the target options table. + /// Record code for the target options table. TARGET_OPTIONS, - /// \brief Record code for the filesystem options table. + /// Record code for the filesystem options table. FILE_SYSTEM_OPTIONS, - /// \brief Record code for the headers search options table. + /// Record code for the headers search options table. HEADER_SEARCH_OPTIONS, - /// \brief Record code for the preprocessor options table. + /// Record code for the preprocessor options table. PREPROCESSOR_OPTIONS, }; @@ -370,7 +370,7 @@ namespace serialization { DIAG_PRAGMA_MAPPINGS, }; - /// \brief Record code for extension blocks. + /// Record code for extension blocks. enum ExtensionBlockRecordTypes { /// Metadata describing this particular extension. EXTENSION_METADATA = 1, @@ -379,16 +379,16 @@ namespace serialization { FIRST_EXTENSION_RECORD_ID = 4 }; - /// \brief Record types that occur within the input-files block + /// Record types that occur within the input-files block /// inside the control block. enum InputFileRecordTypes { - /// \brief An input file. + /// An input file. INPUT_FILE = 1 }; - /// \brief Record types that occur within the AST block itself. + /// Record types that occur within the AST block itself. enum ASTRecordTypes { - /// \brief Record code for the offsets of each type. + /// Record code for the offsets of each type. /// /// The TYPE_OFFSET constant describes the record that occurs /// within the AST block. The record itself is an array of offsets that @@ -402,7 +402,7 @@ namespace serialization { /// corresponding record within the DECLTYPES_BLOCK_ID block. TYPE_OFFSET = 1, - /// \brief Record code for the offsets of each decl. + /// Record code for the offsets of each decl. /// /// The DECL_OFFSET constant describes the record that occurs /// within the block identified by DECL_OFFSETS_BLOCK_ID within @@ -414,7 +414,7 @@ namespace serialization { /// reserved for the translation unit declaration. DECL_OFFSET = 2, - /// \brief Record code for the table of offsets of each + /// Record code for the table of offsets of each /// identifier ID. /// /// The offset table contains offsets into the blob stored in @@ -422,12 +422,12 @@ namespace serialization { /// NULL-terminated string that corresponds to that identifier. IDENTIFIER_OFFSET = 3, - /// \brief This is so that older clang versions, before the introduction + /// This is so that older clang versions, before the introduction /// of the control block, can read and reject the newer PCH format. /// *DON'T CHANGE THIS NUMBER*. METADATA_OLD_FORMAT = 4, - /// \brief Record code for the identifier table. + /// Record code for the identifier table. /// /// The identifier table is a simple blob that contains /// NULL-terminated strings for all of the identifiers @@ -441,7 +441,7 @@ namespace serialization { /// IDs). IDENTIFIER_TABLE = 5, - /// \brief Record code for the array of eagerly deserialized decls. + /// Record code for the array of eagerly deserialized decls. /// /// The AST file contains a list of all of the declarations that should be /// eagerly deserialized present within the parsed headers, stored as an @@ -451,7 +451,7 @@ namespace serialization { /// program (e.g., for code generation). EAGERLY_DESERIALIZED_DECLS = 6, - /// \brief Record code for the set of non-builtin, special + /// Record code for the set of non-builtin, special /// types. /// /// This record contains the type IDs for the various type nodes @@ -460,31 +460,31 @@ namespace serialization { /// offsets into this record. SPECIAL_TYPES = 7, - /// \brief Record code for the extra statistics we gather while + /// Record code for the extra statistics we gather while /// generating an AST file. STATISTICS = 8, - /// \brief Record code for the array of tentative definitions. + /// Record code for the array of tentative definitions. TENTATIVE_DEFINITIONS = 9, // ID 10 used to be for a list of extern "C" declarations. - /// \brief Record code for the table of offsets into the + /// Record code for the table of offsets into the /// Objective-C method pool. SELECTOR_OFFSETS = 11, - /// \brief Record code for the Objective-C method pool, + /// Record code for the Objective-C method pool, METHOD_POOL = 12, - /// \brief The value of the next __COUNTER__ to dispense. + /// The value of the next __COUNTER__ to dispense. /// [PP_COUNTER_VALUE, Val] PP_COUNTER_VALUE = 13, - /// \brief Record code for the table of offsets into the block + /// Record code for the table of offsets into the block /// of source-location information. SOURCE_LOCATION_OFFSETS = 14, - /// \brief Record code for the set of source location entries + /// Record code for the set of source location entries /// that need to be preloaded by the AST reader. /// /// This set contains the source location entry for the @@ -492,47 +492,47 @@ namespace serialization { /// preloaded. SOURCE_LOCATION_PRELOADS = 15, - /// \brief Record code for the set of ext_vector type names. + /// Record code for the set of ext_vector type names. EXT_VECTOR_DECLS = 16, - /// \brief Record code for the array of unused file scoped decls. + /// Record code for the array of unused file scoped decls. UNUSED_FILESCOPED_DECLS = 17, - /// \brief Record code for the table of offsets to entries in the + /// Record code for the table of offsets to entries in the /// preprocessing record. PPD_ENTITIES_OFFSETS = 18, - /// \brief Record code for the array of VTable uses. + /// Record code for the array of VTable uses. VTABLE_USES = 19, // ID 20 used to be for a list of dynamic classes. - /// \brief Record code for referenced selector pool. + /// Record code for referenced selector pool. REFERENCED_SELECTOR_POOL = 21, - /// \brief Record code for an update to the TU's lexically contained + /// Record code for an update to the TU's lexically contained /// declarations. TU_UPDATE_LEXICAL = 22, // ID 23 used to be for a list of local redeclarations. - /// \brief Record code for declarations that Sema keeps references of. + /// Record code for declarations that Sema keeps references of. SEMA_DECL_REFS = 24, - /// \brief Record code for weak undeclared identifiers. + /// Record code for weak undeclared identifiers. WEAK_UNDECLARED_IDENTIFIERS = 25, - /// \brief Record code for pending implicit instantiations. + /// Record code for pending implicit instantiations. PENDING_IMPLICIT_INSTANTIATIONS = 26, // ID 27 used to be for a list of replacement decls. - /// \brief Record code for an update to a decl context's lookup table. + /// Record code for an update to a decl context's lookup table. /// /// In practice, this should only be used for the TU and namespaces. UPDATE_VISIBLE = 28, - /// \brief Record for offsets of DECL_UPDATES records for declarations + /// Record for offsets of DECL_UPDATES records for declarations /// that were modified after being deserialized and need updates. DECL_UPDATE_OFFSETS = 29, @@ -543,245 +543,245 @@ namespace serialization { // ID 32 used to be the code for \#pragma diagnostic mappings. - /// \brief Record code for special CUDA declarations. + /// Record code for special CUDA declarations. CUDA_SPECIAL_DECL_REFS = 33, - /// \brief Record code for header search information. + /// Record code for header search information. HEADER_SEARCH_TABLE = 34, - /// \brief Record code for floating point \#pragma options. + /// Record code for floating point \#pragma options. FP_PRAGMA_OPTIONS = 35, - /// \brief Record code for enabled OpenCL extensions. + /// Record code for enabled OpenCL extensions. OPENCL_EXTENSIONS = 36, - /// \brief The list of delegating constructor declarations. + /// The list of delegating constructor declarations. DELEGATING_CTORS = 37, - /// \brief Record code for the set of known namespaces, which are used + /// Record code for the set of known namespaces, which are used /// for typo correction. KNOWN_NAMESPACES = 38, - /// \brief Record code for the remapping information used to relate + /// Record code for the remapping information used to relate /// loaded modules to the various offsets and IDs(e.g., source location /// offests, declaration and type IDs) that are used in that module to /// refer to other modules. MODULE_OFFSET_MAP = 39, - /// \brief Record code for the source manager line table information, + /// Record code for the source manager line table information, /// which stores information about \#line directives. SOURCE_MANAGER_LINE_TABLE = 40, - /// \brief Record code for map of Objective-C class definition IDs to the + /// Record code for map of Objective-C class definition IDs to the /// ObjC categories in a module that are attached to that class. OBJC_CATEGORIES_MAP = 41, - /// \brief Record code for a file sorted array of DeclIDs in a module. + /// Record code for a file sorted array of DeclIDs in a module. FILE_SORTED_DECLS = 42, - /// \brief Record code for an array of all of the (sub)modules that were + /// Record code for an array of all of the (sub)modules that were /// imported by the AST file. IMPORTED_MODULES = 43, // ID 44 used to be a table of merged canonical declarations. // ID 45 used to be a list of declaration IDs of local redeclarations. - /// \brief Record code for the array of Objective-C categories (including + /// Record code for the array of Objective-C categories (including /// extensions). /// /// This array can only be interpreted properly using the Objective-C /// categories map. OBJC_CATEGORIES = 46, - /// \brief Record code for the table of offsets of each macro ID. + /// Record code for the table of offsets of each macro ID. /// /// The offset table contains offsets into the blob stored in /// the preprocessor block. Each offset points to the corresponding /// macro definition. MACRO_OFFSET = 47, - /// \brief A list of "interesting" identifiers. Only used in C++ (where we + /// A list of "interesting" identifiers. Only used in C++ (where we /// don't normally do lookups into the serialized identifier table). These /// are eagerly deserialized. INTERESTING_IDENTIFIERS = 48, - /// \brief Record code for undefined but used functions and variables that + /// Record code for undefined but used functions and variables that /// need a definition in this TU. UNDEFINED_BUT_USED = 49, - /// \brief Record code for late parsed template functions. + /// Record code for late parsed template functions. LATE_PARSED_TEMPLATE = 50, - /// \brief Record code for \#pragma optimize options. + /// Record code for \#pragma optimize options. OPTIMIZE_PRAGMA_OPTIONS = 51, - /// \brief Record code for potentially unused local typedef names. + /// Record code for potentially unused local typedef names. UNUSED_LOCAL_TYPEDEF_NAME_CANDIDATES = 52, // ID 53 used to be a table of constructor initializer records. - /// \brief Delete expressions that will be analyzed later. + /// Delete expressions that will be analyzed later. DELETE_EXPRS_TO_ANALYZE = 54, - /// \brief Record code for \#pragma ms_struct options. + /// Record code for \#pragma ms_struct options. MSSTRUCT_PRAGMA_OPTIONS = 55, - /// \brief Record code for \#pragma ms_struct options. + /// Record code for \#pragma ms_struct options. POINTERS_TO_MEMBERS_PRAGMA_OPTIONS = 56, - /// \brief Number of unmatched #pragma clang cuda_force_host_device begin + /// Number of unmatched #pragma clang cuda_force_host_device begin /// directives we've seen. CUDA_PRAGMA_FORCE_HOST_DEVICE_DEPTH = 57, - /// \brief Record code for types associated with OpenCL extensions. + /// Record code for types associated with OpenCL extensions. OPENCL_EXTENSION_TYPES = 58, - /// \brief Record code for declarations associated with OpenCL extensions. + /// Record code for declarations associated with OpenCL extensions. OPENCL_EXTENSION_DECLS = 59, MODULAR_CODEGEN_DECLS = 60, - /// \brief Record code for \#pragma pack options. + /// Record code for \#pragma pack options. PACK_PRAGMA_OPTIONS = 61, - /// \brief The stack of open #ifs/#ifdefs recorded in a preamble. + /// The stack of open #ifs/#ifdefs recorded in a preamble. PP_CONDITIONAL_STACK = 62, - /// \brief A table of skipped ranges within the preprocessing record. + /// A table of skipped ranges within the preprocessing record. PPD_SKIPPED_RANGES = 63 }; - /// \brief Record types used within a source manager block. + /// Record types used within a source manager block. enum SourceManagerRecordTypes { - /// \brief Describes a source location entry (SLocEntry) for a + /// Describes a source location entry (SLocEntry) for a /// file. SM_SLOC_FILE_ENTRY = 1, - /// \brief Describes a source location entry (SLocEntry) for a + /// Describes a source location entry (SLocEntry) for a /// buffer. SM_SLOC_BUFFER_ENTRY = 2, - /// \brief Describes a blob that contains the data for a buffer + /// Describes a blob that contains the data for a buffer /// entry. This kind of record always directly follows a /// SM_SLOC_BUFFER_ENTRY record or a SM_SLOC_FILE_ENTRY with an /// overridden buffer. SM_SLOC_BUFFER_BLOB = 3, - /// \brief Describes a zlib-compressed blob that contains the data for + /// Describes a zlib-compressed blob that contains the data for /// a buffer entry. SM_SLOC_BUFFER_BLOB_COMPRESSED = 4, - /// \brief Describes a source location entry (SLocEntry) for a + /// Describes a source location entry (SLocEntry) for a /// macro expansion. SM_SLOC_EXPANSION_ENTRY = 5 }; - /// \brief Record types used within a preprocessor block. + /// Record types used within a preprocessor block. enum PreprocessorRecordTypes { // The macros in the PP section are a PP_MACRO_* instance followed by a // list of PP_TOKEN instances for each token in the definition. - /// \brief An object-like macro definition. + /// An object-like macro definition. /// [PP_MACRO_OBJECT_LIKE, IdentInfoID, SLoc, IsUsed] PP_MACRO_OBJECT_LIKE = 1, - /// \brief A function-like macro definition. + /// A function-like macro definition. /// [PP_MACRO_FUNCTION_LIKE, \<ObjectLikeStuff>, IsC99Varargs, /// IsGNUVarars, NumArgs, ArgIdentInfoID* ] PP_MACRO_FUNCTION_LIKE = 2, - /// \brief Describes one token. + /// Describes one token. /// [PP_TOKEN, SLoc, Length, IdentInfoID, Kind, Flags] PP_TOKEN = 3, - /// \brief The macro directives history for a particular identifier. + /// The macro directives history for a particular identifier. PP_MACRO_DIRECTIVE_HISTORY = 4, - /// \brief A macro directive exported by a module. + /// A macro directive exported by a module. /// [PP_MODULE_MACRO, SubmoduleID, MacroID, (Overridden SubmoduleID)*] PP_MODULE_MACRO = 5, }; - /// \brief Record types used within a preprocessor detail block. + /// Record types used within a preprocessor detail block. enum PreprocessorDetailRecordTypes { - /// \brief Describes a macro expansion within the preprocessing record. + /// Describes a macro expansion within the preprocessing record. PPD_MACRO_EXPANSION = 0, - /// \brief Describes a macro definition within the preprocessing record. + /// Describes a macro definition within the preprocessing record. PPD_MACRO_DEFINITION = 1, - /// \brief Describes an inclusion directive within the preprocessing + /// Describes an inclusion directive within the preprocessing /// record. PPD_INCLUSION_DIRECTIVE = 2 }; - /// \brief Record types used within a submodule description block. + /// Record types used within a submodule description block. enum SubmoduleRecordTypes { - /// \brief Metadata for submodules as a whole. + /// Metadata for submodules as a whole. SUBMODULE_METADATA = 0, - /// \brief Defines the major attributes of a submodule, including its + /// Defines the major attributes of a submodule, including its /// name and parent. SUBMODULE_DEFINITION = 1, - /// \brief Specifies the umbrella header used to create this module, + /// Specifies the umbrella header used to create this module, /// if any. SUBMODULE_UMBRELLA_HEADER = 2, - /// \brief Specifies a header that falls into this (sub)module. + /// Specifies a header that falls into this (sub)module. SUBMODULE_HEADER = 3, - /// \brief Specifies a top-level header that falls into this (sub)module. + /// Specifies a top-level header that falls into this (sub)module. SUBMODULE_TOPHEADER = 4, - /// \brief Specifies an umbrella directory. + /// Specifies an umbrella directory. SUBMODULE_UMBRELLA_DIR = 5, - /// \brief Specifies the submodules that are imported by this + /// Specifies the submodules that are imported by this /// submodule. SUBMODULE_IMPORTS = 6, - /// \brief Specifies the submodules that are re-exported from this + /// Specifies the submodules that are re-exported from this /// submodule. SUBMODULE_EXPORTS = 7, - /// \brief Specifies a required feature. + /// Specifies a required feature. SUBMODULE_REQUIRES = 8, - /// \brief Specifies a header that has been explicitly excluded + /// Specifies a header that has been explicitly excluded /// from this submodule. SUBMODULE_EXCLUDED_HEADER = 9, - /// \brief Specifies a library or framework to link against. + /// Specifies a library or framework to link against. SUBMODULE_LINK_LIBRARY = 10, - /// \brief Specifies a configuration macro for this module. + /// Specifies a configuration macro for this module. SUBMODULE_CONFIG_MACRO = 11, - /// \brief Specifies a conflict with another module. + /// Specifies a conflict with another module. SUBMODULE_CONFLICT = 12, - /// \brief Specifies a header that is private to this submodule. + /// Specifies a header that is private to this submodule. SUBMODULE_PRIVATE_HEADER = 13, - /// \brief Specifies a header that is part of the module but must be + /// Specifies a header that is part of the module but must be /// textually included. SUBMODULE_TEXTUAL_HEADER = 14, - /// \brief Specifies a header that is private to this submodule but + /// Specifies a header that is private to this submodule but /// must be textually included. SUBMODULE_PRIVATE_TEXTUAL_HEADER = 15, - /// \brief Specifies some declarations with initializers that must be + /// Specifies some declarations with initializers that must be /// emitted to initialize the module. SUBMODULE_INITIALIZERS = 16, - /// \brief Specifies the name of the module that will eventually + /// Specifies the name of the module that will eventually /// re-export the entities in this module. SUBMODULE_EXPORT_AS = 17, }; - /// \brief Record types used within a comments block. + /// Record types used within a comments block. enum CommentRecordTypes { COMMENTS_RAW_COMMENT = 0 }; @@ -793,7 +793,7 @@ namespace serialization { /// /// @{ - /// \brief Predefined type IDs. + /// Predefined type IDs. /// /// These type IDs correspond to predefined types in the AST /// context, such as built-in types (int) and special place-holder @@ -801,499 +801,499 @@ namespace serialization { /// types are never actually serialized, since they will be built /// by the AST context when it is created. enum PredefinedTypeIDs { - /// \brief The NULL type. + /// The NULL type. PREDEF_TYPE_NULL_ID = 0, - /// \brief The void type. + /// The void type. PREDEF_TYPE_VOID_ID = 1, - /// \brief The 'bool' or '_Bool' type. + /// The 'bool' or '_Bool' type. PREDEF_TYPE_BOOL_ID = 2, - /// \brief The 'char' type, when it is unsigned. + /// The 'char' type, when it is unsigned. PREDEF_TYPE_CHAR_U_ID = 3, - /// \brief The 'unsigned char' type. + /// The 'unsigned char' type. PREDEF_TYPE_UCHAR_ID = 4, - /// \brief The 'unsigned short' type. + /// The 'unsigned short' type. PREDEF_TYPE_USHORT_ID = 5, - /// \brief The 'unsigned int' type. + /// The 'unsigned int' type. PREDEF_TYPE_UINT_ID = 6, - /// \brief The 'unsigned long' type. + /// The 'unsigned long' type. PREDEF_TYPE_ULONG_ID = 7, - /// \brief The 'unsigned long long' type. + /// The 'unsigned long long' type. PREDEF_TYPE_ULONGLONG_ID = 8, - /// \brief The 'char' type, when it is signed. + /// The 'char' type, when it is signed. PREDEF_TYPE_CHAR_S_ID = 9, - /// \brief The 'signed char' type. + /// The 'signed char' type. PREDEF_TYPE_SCHAR_ID = 10, - /// \brief The C++ 'wchar_t' type. + /// The C++ 'wchar_t' type. PREDEF_TYPE_WCHAR_ID = 11, - /// \brief The (signed) 'short' type. + /// The (signed) 'short' type. PREDEF_TYPE_SHORT_ID = 12, - /// \brief The (signed) 'int' type. + /// The (signed) 'int' type. PREDEF_TYPE_INT_ID = 13, - /// \brief The (signed) 'long' type. + /// The (signed) 'long' type. PREDEF_TYPE_LONG_ID = 14, - /// \brief The (signed) 'long long' type. + /// The (signed) 'long long' type. PREDEF_TYPE_LONGLONG_ID = 15, - /// \brief The 'float' type. + /// The 'float' type. PREDEF_TYPE_FLOAT_ID = 16, - /// \brief The 'double' type. + /// The 'double' type. PREDEF_TYPE_DOUBLE_ID = 17, - /// \brief The 'long double' type. + /// The 'long double' type. PREDEF_TYPE_LONGDOUBLE_ID = 18, - /// \brief The placeholder type for overloaded function sets. + /// The placeholder type for overloaded function sets. PREDEF_TYPE_OVERLOAD_ID = 19, - /// \brief The placeholder type for dependent types. + /// The placeholder type for dependent types. PREDEF_TYPE_DEPENDENT_ID = 20, - /// \brief The '__uint128_t' type. + /// The '__uint128_t' type. PREDEF_TYPE_UINT128_ID = 21, - /// \brief The '__int128_t' type. + /// The '__int128_t' type. PREDEF_TYPE_INT128_ID = 22, - /// \brief The type of 'nullptr'. + /// The type of 'nullptr'. PREDEF_TYPE_NULLPTR_ID = 23, - /// \brief The C++ 'char16_t' type. + /// The C++ 'char16_t' type. PREDEF_TYPE_CHAR16_ID = 24, - /// \brief The C++ 'char32_t' type. + /// The C++ 'char32_t' type. PREDEF_TYPE_CHAR32_ID = 25, - /// \brief The ObjC 'id' type. + /// The ObjC 'id' type. PREDEF_TYPE_OBJC_ID = 26, - /// \brief The ObjC 'Class' type. + /// The ObjC 'Class' type. PREDEF_TYPE_OBJC_CLASS = 27, - /// \brief The ObjC 'SEL' type. + /// The ObjC 'SEL' type. PREDEF_TYPE_OBJC_SEL = 28, - /// \brief The 'unknown any' placeholder type. + /// The 'unknown any' placeholder type. PREDEF_TYPE_UNKNOWN_ANY = 29, - /// \brief The placeholder type for bound member functions. + /// The placeholder type for bound member functions. PREDEF_TYPE_BOUND_MEMBER = 30, - /// \brief The "auto" deduction type. + /// The "auto" deduction type. PREDEF_TYPE_AUTO_DEDUCT = 31, - /// \brief The "auto &&" deduction type. + /// The "auto &&" deduction type. PREDEF_TYPE_AUTO_RREF_DEDUCT = 32, - /// \brief The OpenCL 'half' / ARM NEON __fp16 type. + /// The OpenCL 'half' / ARM NEON __fp16 type. PREDEF_TYPE_HALF_ID = 33, - /// \brief ARC's unbridged-cast placeholder type. + /// ARC's unbridged-cast placeholder type. PREDEF_TYPE_ARC_UNBRIDGED_CAST = 34, - /// \brief The pseudo-object placeholder type. + /// The pseudo-object placeholder type. PREDEF_TYPE_PSEUDO_OBJECT = 35, - /// \brief The placeholder type for builtin functions. + /// The placeholder type for builtin functions. PREDEF_TYPE_BUILTIN_FN = 36, - /// \brief OpenCL event type. + /// OpenCL event type. PREDEF_TYPE_EVENT_ID = 37, - /// \brief OpenCL clk event type. + /// OpenCL clk event type. PREDEF_TYPE_CLK_EVENT_ID = 38, - /// \brief OpenCL sampler type. + /// OpenCL sampler type. PREDEF_TYPE_SAMPLER_ID = 39, - /// \brief OpenCL queue type. + /// OpenCL queue type. PREDEF_TYPE_QUEUE_ID = 40, - /// \brief OpenCL reserve_id type. + /// OpenCL reserve_id type. PREDEF_TYPE_RESERVE_ID_ID = 41, - /// \brief The placeholder type for OpenMP array section. + /// The placeholder type for OpenMP array section. PREDEF_TYPE_OMP_ARRAY_SECTION = 42, - /// \brief The '__float128' type + /// The '__float128' type PREDEF_TYPE_FLOAT128_ID = 43, - /// \brief The '_Float16' type + /// The '_Float16' type PREDEF_TYPE_FLOAT16_ID = 44, - /// \brief The C++ 'char8_t' type. + /// The C++ 'char8_t' type. PREDEF_TYPE_CHAR8_ID = 45, - /// \brief OpenCL image types with auto numeration + /// OpenCL image types with auto numeration #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ PREDEF_TYPE_##Id##_ID, #include "clang/Basic/OpenCLImageTypes.def" }; - /// \brief The number of predefined type IDs that are reserved for + /// The number of predefined type IDs that are reserved for /// the PREDEF_TYPE_* constants. /// /// Type IDs for non-predefined types will start at /// NUM_PREDEF_TYPE_IDs. const unsigned NUM_PREDEF_TYPE_IDS = 100; - /// \brief Record codes for each kind of type. + /// Record codes for each kind of type. /// /// These constants describe the type records that can occur within a /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each /// constant describes a record for a specific type class in the /// AST. Note that DeclCode values share this code space. enum TypeCode { - /// \brief An ExtQualType record. + /// An ExtQualType record. TYPE_EXT_QUAL = 1, - /// \brief A ComplexType record. + /// A ComplexType record. TYPE_COMPLEX = 3, - /// \brief A PointerType record. + /// A PointerType record. TYPE_POINTER = 4, - /// \brief A BlockPointerType record. + /// A BlockPointerType record. TYPE_BLOCK_POINTER = 5, - /// \brief An LValueReferenceType record. + /// An LValueReferenceType record. TYPE_LVALUE_REFERENCE = 6, - /// \brief An RValueReferenceType record. + /// An RValueReferenceType record. TYPE_RVALUE_REFERENCE = 7, - /// \brief A MemberPointerType record. + /// A MemberPointerType record. TYPE_MEMBER_POINTER = 8, - /// \brief A ConstantArrayType record. + /// A ConstantArrayType record. TYPE_CONSTANT_ARRAY = 9, - /// \brief An IncompleteArrayType record. + /// An IncompleteArrayType record. TYPE_INCOMPLETE_ARRAY = 10, - /// \brief A VariableArrayType record. + /// A VariableArrayType record. TYPE_VARIABLE_ARRAY = 11, - /// \brief A VectorType record. + /// A VectorType record. TYPE_VECTOR = 12, - /// \brief An ExtVectorType record. + /// An ExtVectorType record. TYPE_EXT_VECTOR = 13, - /// \brief A FunctionNoProtoType record. + /// A FunctionNoProtoType record. TYPE_FUNCTION_NO_PROTO = 14, - /// \brief A FunctionProtoType record. + /// A FunctionProtoType record. TYPE_FUNCTION_PROTO = 15, - /// \brief A TypedefType record. + /// A TypedefType record. TYPE_TYPEDEF = 16, - /// \brief A TypeOfExprType record. + /// A TypeOfExprType record. TYPE_TYPEOF_EXPR = 17, - /// \brief A TypeOfType record. + /// A TypeOfType record. TYPE_TYPEOF = 18, - /// \brief A RecordType record. + /// A RecordType record. TYPE_RECORD = 19, - /// \brief An EnumType record. + /// An EnumType record. TYPE_ENUM = 20, - /// \brief An ObjCInterfaceType record. + /// An ObjCInterfaceType record. TYPE_OBJC_INTERFACE = 21, - /// \brief An ObjCObjectPointerType record. + /// An ObjCObjectPointerType record. TYPE_OBJC_OBJECT_POINTER = 22, - /// \brief a DecltypeType record. + /// a DecltypeType record. TYPE_DECLTYPE = 23, - /// \brief An ElaboratedType record. + /// An ElaboratedType record. TYPE_ELABORATED = 24, - /// \brief A SubstTemplateTypeParmType record. + /// A SubstTemplateTypeParmType record. TYPE_SUBST_TEMPLATE_TYPE_PARM = 25, - /// \brief An UnresolvedUsingType record. + /// An UnresolvedUsingType record. TYPE_UNRESOLVED_USING = 26, - /// \brief An InjectedClassNameType record. + /// An InjectedClassNameType record. TYPE_INJECTED_CLASS_NAME = 27, - /// \brief An ObjCObjectType record. + /// An ObjCObjectType record. TYPE_OBJC_OBJECT = 28, - /// \brief An TemplateTypeParmType record. + /// An TemplateTypeParmType record. TYPE_TEMPLATE_TYPE_PARM = 29, - /// \brief An TemplateSpecializationType record. + /// An TemplateSpecializationType record. TYPE_TEMPLATE_SPECIALIZATION = 30, - /// \brief A DependentNameType record. + /// A DependentNameType record. TYPE_DEPENDENT_NAME = 31, - /// \brief A DependentTemplateSpecializationType record. + /// A DependentTemplateSpecializationType record. TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION = 32, - /// \brief A DependentSizedArrayType record. + /// A DependentSizedArrayType record. TYPE_DEPENDENT_SIZED_ARRAY = 33, - /// \brief A ParenType record. + /// A ParenType record. TYPE_PAREN = 34, - /// \brief A PackExpansionType record. + /// A PackExpansionType record. TYPE_PACK_EXPANSION = 35, - /// \brief An AttributedType record. + /// An AttributedType record. TYPE_ATTRIBUTED = 36, - /// \brief A SubstTemplateTypeParmPackType record. + /// A SubstTemplateTypeParmPackType record. TYPE_SUBST_TEMPLATE_TYPE_PARM_PACK = 37, - /// \brief A AutoType record. + /// A AutoType record. TYPE_AUTO = 38, - /// \brief A UnaryTransformType record. + /// A UnaryTransformType record. TYPE_UNARY_TRANSFORM = 39, - /// \brief An AtomicType record. + /// An AtomicType record. TYPE_ATOMIC = 40, - /// \brief A DecayedType record. + /// A DecayedType record. TYPE_DECAYED = 41, - /// \brief An AdjustedType record. + /// An AdjustedType record. TYPE_ADJUSTED = 42, - /// \brief A PipeType record. + /// A PipeType record. TYPE_PIPE = 43, - /// \brief An ObjCTypeParamType record. + /// An ObjCTypeParamType record. TYPE_OBJC_TYPE_PARAM = 44, - /// \brief A DeducedTemplateSpecializationType record. + /// A DeducedTemplateSpecializationType record. TYPE_DEDUCED_TEMPLATE_SPECIALIZATION = 45, - /// \brief A DependentSizedExtVectorType record. + /// A DependentSizedExtVectorType record. TYPE_DEPENDENT_SIZED_EXT_VECTOR = 46, - /// \brief A DependentAddressSpaceType record. + /// A DependentAddressSpaceType record. TYPE_DEPENDENT_ADDRESS_SPACE = 47 }; - /// \brief The type IDs for special types constructed by semantic + /// The type IDs for special types constructed by semantic /// analysis. /// /// The constants in this enumeration are indices into the /// SPECIAL_TYPES record. enum SpecialTypeIDs { - /// \brief CFConstantString type + /// CFConstantString type SPECIAL_TYPE_CF_CONSTANT_STRING = 0, - /// \brief C FILE typedef type + /// C FILE typedef type SPECIAL_TYPE_FILE = 1, - /// \brief C jmp_buf typedef type + /// C jmp_buf typedef type SPECIAL_TYPE_JMP_BUF = 2, - /// \brief C sigjmp_buf typedef type + /// C sigjmp_buf typedef type SPECIAL_TYPE_SIGJMP_BUF = 3, - /// \brief Objective-C "id" redefinition type + /// Objective-C "id" redefinition type SPECIAL_TYPE_OBJC_ID_REDEFINITION = 4, - /// \brief Objective-C "Class" redefinition type + /// Objective-C "Class" redefinition type SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 5, - /// \brief Objective-C "SEL" redefinition type + /// Objective-C "SEL" redefinition type SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 6, - /// \brief C ucontext_t typedef type + /// C ucontext_t typedef type SPECIAL_TYPE_UCONTEXT_T = 7 }; - /// \brief The number of special type IDs. + /// The number of special type IDs. const unsigned NumSpecialTypeIDs = 8; - /// \brief Predefined declaration IDs. + /// Predefined declaration IDs. /// /// These declaration IDs correspond to predefined declarations in the AST /// context, such as the NULL declaration ID. Such declarations are never /// actually serialized, since they will be built by the AST context when /// it is created. enum PredefinedDeclIDs { - /// \brief The NULL declaration. + /// The NULL declaration. PREDEF_DECL_NULL_ID = 0, - /// \brief The translation unit. + /// The translation unit. PREDEF_DECL_TRANSLATION_UNIT_ID = 1, - /// \brief The Objective-C 'id' type. + /// The Objective-C 'id' type. PREDEF_DECL_OBJC_ID_ID = 2, - /// \brief The Objective-C 'SEL' type. + /// The Objective-C 'SEL' type. PREDEF_DECL_OBJC_SEL_ID = 3, - /// \brief The Objective-C 'Class' type. + /// The Objective-C 'Class' type. PREDEF_DECL_OBJC_CLASS_ID = 4, - /// \brief The Objective-C 'Protocol' type. + /// The Objective-C 'Protocol' type. PREDEF_DECL_OBJC_PROTOCOL_ID = 5, - /// \brief The signed 128-bit integer type. + /// The signed 128-bit integer type. PREDEF_DECL_INT_128_ID = 6, - /// \brief The unsigned 128-bit integer type. + /// The unsigned 128-bit integer type. PREDEF_DECL_UNSIGNED_INT_128_ID = 7, - /// \brief The internal 'instancetype' typedef. + /// The internal 'instancetype' typedef. PREDEF_DECL_OBJC_INSTANCETYPE_ID = 8, - /// \brief The internal '__builtin_va_list' typedef. + /// The internal '__builtin_va_list' typedef. PREDEF_DECL_BUILTIN_VA_LIST_ID = 9, - /// \brief The internal '__va_list_tag' struct, if any. + /// The internal '__va_list_tag' struct, if any. PREDEF_DECL_VA_LIST_TAG = 10, - /// \brief The internal '__builtin_ms_va_list' typedef. + /// The internal '__builtin_ms_va_list' typedef. PREDEF_DECL_BUILTIN_MS_VA_LIST_ID = 11, - /// \brief The extern "C" context. + /// The extern "C" context. PREDEF_DECL_EXTERN_C_CONTEXT_ID = 12, - /// \brief The internal '__make_integer_seq' template. + /// The internal '__make_integer_seq' template. PREDEF_DECL_MAKE_INTEGER_SEQ_ID = 13, - /// \brief The internal '__NSConstantString' typedef. + /// The internal '__NSConstantString' typedef. PREDEF_DECL_CF_CONSTANT_STRING_ID = 14, - /// \brief The internal '__NSConstantString' tag type. + /// The internal '__NSConstantString' tag type. PREDEF_DECL_CF_CONSTANT_STRING_TAG_ID = 15, - /// \brief The internal '__type_pack_element' template. + /// The internal '__type_pack_element' template. PREDEF_DECL_TYPE_PACK_ELEMENT_ID = 16, }; - /// \brief The number of declaration IDs that are predefined. + /// The number of declaration IDs that are predefined. /// /// For more information about predefined declarations, see the /// \c PredefinedDeclIDs type and the PREDEF_DECL_*_ID constants. const unsigned int NUM_PREDEF_DECL_IDS = 17; - /// \brief Record of updates for a declaration that was modified after + /// Record of updates for a declaration that was modified after /// being deserialized. This can occur within DECLTYPES_BLOCK_ID. const unsigned int DECL_UPDATES = 49; - /// \brief Record code for a list of local redeclarations of a declaration. + /// Record code for a list of local redeclarations of a declaration. /// This can occur within DECLTYPES_BLOCK_ID. const unsigned int LOCAL_REDECLARATIONS = 50; - /// \brief Record codes for each kind of declaration. + /// Record codes for each kind of declaration. /// /// These constants describe the declaration records that can occur within /// a declarations block (identified by DECLTYPES_BLOCK_ID). Each /// constant describes a record for a specific declaration class /// in the AST. Note that TypeCode values share this code space. enum DeclCode { - /// \brief A TypedefDecl record. + /// A TypedefDecl record. DECL_TYPEDEF = 51, - /// \brief A TypeAliasDecl record. + /// A TypeAliasDecl record. DECL_TYPEALIAS, - /// \brief An EnumDecl record. + /// An EnumDecl record. DECL_ENUM, - /// \brief A RecordDecl record. + /// A RecordDecl record. DECL_RECORD, - /// \brief An EnumConstantDecl record. + /// An EnumConstantDecl record. DECL_ENUM_CONSTANT, - /// \brief A FunctionDecl record. + /// A FunctionDecl record. DECL_FUNCTION, - /// \brief A ObjCMethodDecl record. + /// A ObjCMethodDecl record. DECL_OBJC_METHOD, - /// \brief A ObjCInterfaceDecl record. + /// A ObjCInterfaceDecl record. DECL_OBJC_INTERFACE, - /// \brief A ObjCProtocolDecl record. + /// A ObjCProtocolDecl record. DECL_OBJC_PROTOCOL, - /// \brief A ObjCIvarDecl record. + /// A ObjCIvarDecl record. DECL_OBJC_IVAR, - /// \brief A ObjCAtDefsFieldDecl record. + /// A ObjCAtDefsFieldDecl record. DECL_OBJC_AT_DEFS_FIELD, - /// \brief A ObjCCategoryDecl record. + /// A ObjCCategoryDecl record. DECL_OBJC_CATEGORY, - /// \brief A ObjCCategoryImplDecl record. + /// A ObjCCategoryImplDecl record. DECL_OBJC_CATEGORY_IMPL, - /// \brief A ObjCImplementationDecl record. + /// A ObjCImplementationDecl record. DECL_OBJC_IMPLEMENTATION, - /// \brief A ObjCCompatibleAliasDecl record. + /// A ObjCCompatibleAliasDecl record. DECL_OBJC_COMPATIBLE_ALIAS, - /// \brief A ObjCPropertyDecl record. + /// A ObjCPropertyDecl record. DECL_OBJC_PROPERTY, - /// \brief A ObjCPropertyImplDecl record. + /// A ObjCPropertyImplDecl record. DECL_OBJC_PROPERTY_IMPL, - /// \brief A FieldDecl record. + /// A FieldDecl record. DECL_FIELD, - /// \brief A MSPropertyDecl record. + /// A MSPropertyDecl record. DECL_MS_PROPERTY, - /// \brief A VarDecl record. + /// A VarDecl record. DECL_VAR, - /// \brief An ImplicitParamDecl record. + /// An ImplicitParamDecl record. DECL_IMPLICIT_PARAM, - /// \brief A ParmVarDecl record. + /// A ParmVarDecl record. DECL_PARM_VAR, - /// \brief A DecompositionDecl record. + /// A DecompositionDecl record. DECL_DECOMPOSITION, - /// \brief A BindingDecl record. + /// A BindingDecl record. DECL_BINDING, - /// \brief A FileScopeAsmDecl record. + /// A FileScopeAsmDecl record. DECL_FILE_SCOPE_ASM, - /// \brief A BlockDecl record. + /// A BlockDecl record. DECL_BLOCK, - /// \brief A CapturedDecl record. + /// A CapturedDecl record. DECL_CAPTURED, - /// \brief A record that stores the set of declarations that are + /// A record that stores the set of declarations that are /// lexically stored within a given DeclContext. /// /// The record itself is a blob that is an array of declaration IDs, @@ -1303,7 +1303,7 @@ namespace serialization { /// DeclContext::decls_begin() and DeclContext::decls_end(). DECL_CONTEXT_LEXICAL, - /// \brief A record that stores the set of declarations that are + /// A record that stores the set of declarations that are /// visible from a given DeclContext. /// /// The record itself stores a set of mappings, each of which @@ -1312,155 +1312,155 @@ namespace serialization { /// into a DeclContext via DeclContext::lookup. DECL_CONTEXT_VISIBLE, - /// \brief A LabelDecl record. + /// A LabelDecl record. DECL_LABEL, - /// \brief A NamespaceDecl record. + /// A NamespaceDecl record. DECL_NAMESPACE, - /// \brief A NamespaceAliasDecl record. + /// A NamespaceAliasDecl record. DECL_NAMESPACE_ALIAS, - /// \brief A UsingDecl record. + /// A UsingDecl record. DECL_USING, - /// \brief A UsingPackDecl record. + /// A UsingPackDecl record. DECL_USING_PACK, - /// \brief A UsingShadowDecl record. + /// A UsingShadowDecl record. DECL_USING_SHADOW, - /// \brief A ConstructorUsingShadowDecl record. + /// A ConstructorUsingShadowDecl record. DECL_CONSTRUCTOR_USING_SHADOW, - /// \brief A UsingDirecitveDecl record. + /// A UsingDirecitveDecl record. DECL_USING_DIRECTIVE, - /// \brief An UnresolvedUsingValueDecl record. + /// An UnresolvedUsingValueDecl record. DECL_UNRESOLVED_USING_VALUE, - /// \brief An UnresolvedUsingTypenameDecl record. + /// An UnresolvedUsingTypenameDecl record. DECL_UNRESOLVED_USING_TYPENAME, - /// \brief A LinkageSpecDecl record. + /// A LinkageSpecDecl record. DECL_LINKAGE_SPEC, - /// \brief An ExportDecl record. + /// An ExportDecl record. DECL_EXPORT, - /// \brief A CXXRecordDecl record. + /// A CXXRecordDecl record. DECL_CXX_RECORD, - /// \brief A CXXDeductionGuideDecl record. + /// A CXXDeductionGuideDecl record. DECL_CXX_DEDUCTION_GUIDE, - /// \brief A CXXMethodDecl record. + /// A CXXMethodDecl record. DECL_CXX_METHOD, - /// \brief A CXXConstructorDecl record. + /// A CXXConstructorDecl record. DECL_CXX_CONSTRUCTOR, - /// \brief A CXXConstructorDecl record for an inherited constructor. + /// A CXXConstructorDecl record for an inherited constructor. DECL_CXX_INHERITED_CONSTRUCTOR, - /// \brief A CXXDestructorDecl record. + /// A CXXDestructorDecl record. DECL_CXX_DESTRUCTOR, - /// \brief A CXXConversionDecl record. + /// A CXXConversionDecl record. DECL_CXX_CONVERSION, - /// \brief An AccessSpecDecl record. + /// An AccessSpecDecl record. DECL_ACCESS_SPEC, - /// \brief A FriendDecl record. + /// A FriendDecl record. DECL_FRIEND, - /// \brief A FriendTemplateDecl record. + /// A FriendTemplateDecl record. DECL_FRIEND_TEMPLATE, - /// \brief A ClassTemplateDecl record. + /// A ClassTemplateDecl record. DECL_CLASS_TEMPLATE, - /// \brief A ClassTemplateSpecializationDecl record. + /// A ClassTemplateSpecializationDecl record. DECL_CLASS_TEMPLATE_SPECIALIZATION, - /// \brief A ClassTemplatePartialSpecializationDecl record. + /// A ClassTemplatePartialSpecializationDecl record. DECL_CLASS_TEMPLATE_PARTIAL_SPECIALIZATION, - /// \brief A VarTemplateDecl record. + /// A VarTemplateDecl record. DECL_VAR_TEMPLATE, - /// \brief A VarTemplateSpecializationDecl record. + /// A VarTemplateSpecializationDecl record. DECL_VAR_TEMPLATE_SPECIALIZATION, - /// \brief A VarTemplatePartialSpecializationDecl record. + /// A VarTemplatePartialSpecializationDecl record. DECL_VAR_TEMPLATE_PARTIAL_SPECIALIZATION, - /// \brief A FunctionTemplateDecl record. + /// A FunctionTemplateDecl record. DECL_FUNCTION_TEMPLATE, - /// \brief A TemplateTypeParmDecl record. + /// A TemplateTypeParmDecl record. DECL_TEMPLATE_TYPE_PARM, - /// \brief A NonTypeTemplateParmDecl record. + /// A NonTypeTemplateParmDecl record. DECL_NON_TYPE_TEMPLATE_PARM, - /// \brief A TemplateTemplateParmDecl record. + /// A TemplateTemplateParmDecl record. DECL_TEMPLATE_TEMPLATE_PARM, - /// \brief A TypeAliasTemplateDecl record. + /// A TypeAliasTemplateDecl record. DECL_TYPE_ALIAS_TEMPLATE, - /// \brief A StaticAssertDecl record. + /// A StaticAssertDecl record. DECL_STATIC_ASSERT, - /// \brief A record containing CXXBaseSpecifiers. + /// A record containing CXXBaseSpecifiers. DECL_CXX_BASE_SPECIFIERS, - /// \brief A record containing CXXCtorInitializers. + /// A record containing CXXCtorInitializers. DECL_CXX_CTOR_INITIALIZERS, - /// \brief A IndirectFieldDecl record. + /// A IndirectFieldDecl record. DECL_INDIRECTFIELD, - /// \brief A NonTypeTemplateParmDecl record that stores an expanded + /// A NonTypeTemplateParmDecl record that stores an expanded /// non-type template parameter pack. DECL_EXPANDED_NON_TYPE_TEMPLATE_PARM_PACK, - /// \brief A TemplateTemplateParmDecl record that stores an expanded + /// A TemplateTemplateParmDecl record that stores an expanded /// template template parameter pack. DECL_EXPANDED_TEMPLATE_TEMPLATE_PARM_PACK, - /// \brief A ClassScopeFunctionSpecializationDecl record a class scope + /// A ClassScopeFunctionSpecializationDecl record a class scope /// function specialization. (Microsoft extension). DECL_CLASS_SCOPE_FUNCTION_SPECIALIZATION, - /// \brief An ImportDecl recording a module import. + /// An ImportDecl recording a module import. DECL_IMPORT, - /// \brief An OMPThreadPrivateDecl record. + /// An OMPThreadPrivateDecl record. DECL_OMP_THREADPRIVATE, - /// \brief An EmptyDecl record. + /// An EmptyDecl record. DECL_EMPTY, - /// \brief An ObjCTypeParamDecl record. + /// An ObjCTypeParamDecl record. DECL_OBJC_TYPE_PARAM, - /// \brief An OMPCapturedExprDecl record. + /// An OMPCapturedExprDecl record. DECL_OMP_CAPTUREDEXPR, - /// \brief A PragmaCommentDecl record. + /// A PragmaCommentDecl record. DECL_PRAGMA_COMMENT, - /// \brief A PragmaDetectMismatchDecl record. + /// A PragmaDetectMismatchDecl record. DECL_PRAGMA_DETECT_MISMATCH, - /// \brief An OMPDeclareReductionDecl record. + /// An OMPDeclareReductionDecl record. DECL_OMP_DECLARE_REDUCTION, }; - /// \brief Record codes for each kind of statement or expression. + /// Record codes for each kind of statement or expression. /// /// These constants describe the records that describe statements /// or expressions. These records occur within type and declarations @@ -1468,310 +1468,310 @@ namespace serialization { /// describes a record for a specific statement or expression class in the /// AST. enum StmtCode { - /// \brief A marker record that indicates that we are at the end + /// A marker record that indicates that we are at the end /// of an expression. STMT_STOP = 128, - /// \brief A NULL expression. + /// A NULL expression. STMT_NULL_PTR, - /// \brief A reference to a previously [de]serialized Stmt record. + /// A reference to a previously [de]serialized Stmt record. STMT_REF_PTR, - /// \brief A NullStmt record. + /// A NullStmt record. STMT_NULL, - /// \brief A CompoundStmt record. + /// A CompoundStmt record. STMT_COMPOUND, - /// \brief A CaseStmt record. + /// A CaseStmt record. STMT_CASE, - /// \brief A DefaultStmt record. + /// A DefaultStmt record. STMT_DEFAULT, - /// \brief A LabelStmt record. + /// A LabelStmt record. STMT_LABEL, - /// \brief An AttributedStmt record. + /// An AttributedStmt record. STMT_ATTRIBUTED, - /// \brief An IfStmt record. + /// An IfStmt record. STMT_IF, - /// \brief A SwitchStmt record. + /// A SwitchStmt record. STMT_SWITCH, - /// \brief A WhileStmt record. + /// A WhileStmt record. STMT_WHILE, - /// \brief A DoStmt record. + /// A DoStmt record. STMT_DO, - /// \brief A ForStmt record. + /// A ForStmt record. STMT_FOR, - /// \brief A GotoStmt record. + /// A GotoStmt record. STMT_GOTO, - /// \brief An IndirectGotoStmt record. + /// An IndirectGotoStmt record. STMT_INDIRECT_GOTO, - /// \brief A ContinueStmt record. + /// A ContinueStmt record. STMT_CONTINUE, - /// \brief A BreakStmt record. + /// A BreakStmt record. STMT_BREAK, - /// \brief A ReturnStmt record. + /// A ReturnStmt record. STMT_RETURN, - /// \brief A DeclStmt record. + /// A DeclStmt record. STMT_DECL, - /// \brief A CapturedStmt record. + /// A CapturedStmt record. STMT_CAPTURED, - /// \brief A GCC-style AsmStmt record. + /// A GCC-style AsmStmt record. STMT_GCCASM, - /// \brief A MS-style AsmStmt record. + /// A MS-style AsmStmt record. STMT_MSASM, - /// \brief A PredefinedExpr record. + /// A PredefinedExpr record. EXPR_PREDEFINED, - /// \brief A DeclRefExpr record. + /// A DeclRefExpr record. EXPR_DECL_REF, - /// \brief An IntegerLiteral record. + /// An IntegerLiteral record. EXPR_INTEGER_LITERAL, - /// \brief A FloatingLiteral record. + /// A FloatingLiteral record. EXPR_FLOATING_LITERAL, - /// \brief An ImaginaryLiteral record. + /// An ImaginaryLiteral record. EXPR_IMAGINARY_LITERAL, - /// \brief A StringLiteral record. + /// A StringLiteral record. EXPR_STRING_LITERAL, - /// \brief A CharacterLiteral record. + /// A CharacterLiteral record. EXPR_CHARACTER_LITERAL, - /// \brief A ParenExpr record. + /// A ParenExpr record. EXPR_PAREN, - /// \brief A ParenListExpr record. + /// A ParenListExpr record. EXPR_PAREN_LIST, - /// \brief A UnaryOperator record. + /// A UnaryOperator record. EXPR_UNARY_OPERATOR, - /// \brief An OffsetOfExpr record. + /// An OffsetOfExpr record. EXPR_OFFSETOF, - /// \brief A SizefAlignOfExpr record. + /// A SizefAlignOfExpr record. EXPR_SIZEOF_ALIGN_OF, - /// \brief An ArraySubscriptExpr record. + /// An ArraySubscriptExpr record. EXPR_ARRAY_SUBSCRIPT, - /// \brief A CallExpr record. + /// A CallExpr record. EXPR_CALL, - /// \brief A MemberExpr record. + /// A MemberExpr record. EXPR_MEMBER, - /// \brief A BinaryOperator record. + /// A BinaryOperator record. EXPR_BINARY_OPERATOR, - /// \brief A CompoundAssignOperator record. + /// A CompoundAssignOperator record. EXPR_COMPOUND_ASSIGN_OPERATOR, - /// \brief A ConditionOperator record. + /// A ConditionOperator record. EXPR_CONDITIONAL_OPERATOR, - /// \brief An ImplicitCastExpr record. + /// An ImplicitCastExpr record. EXPR_IMPLICIT_CAST, - /// \brief A CStyleCastExpr record. + /// A CStyleCastExpr record. EXPR_CSTYLE_CAST, - /// \brief A CompoundLiteralExpr record. + /// A CompoundLiteralExpr record. EXPR_COMPOUND_LITERAL, - /// \brief An ExtVectorElementExpr record. + /// An ExtVectorElementExpr record. EXPR_EXT_VECTOR_ELEMENT, - /// \brief An InitListExpr record. + /// An InitListExpr record. EXPR_INIT_LIST, - /// \brief A DesignatedInitExpr record. + /// A DesignatedInitExpr record. EXPR_DESIGNATED_INIT, - /// \brief A DesignatedInitUpdateExpr record. + /// A DesignatedInitUpdateExpr record. EXPR_DESIGNATED_INIT_UPDATE, - /// \brief An NoInitExpr record. + /// An NoInitExpr record. EXPR_NO_INIT, - /// \brief An ArrayInitLoopExpr record. + /// An ArrayInitLoopExpr record. EXPR_ARRAY_INIT_LOOP, - /// \brief An ArrayInitIndexExpr record. + /// An ArrayInitIndexExpr record. EXPR_ARRAY_INIT_INDEX, - /// \brief An ImplicitValueInitExpr record. + /// An ImplicitValueInitExpr record. EXPR_IMPLICIT_VALUE_INIT, - /// \brief A VAArgExpr record. + /// A VAArgExpr record. EXPR_VA_ARG, - /// \brief An AddrLabelExpr record. + /// An AddrLabelExpr record. EXPR_ADDR_LABEL, - /// \brief A StmtExpr record. + /// A StmtExpr record. EXPR_STMT, - /// \brief A ChooseExpr record. + /// A ChooseExpr record. EXPR_CHOOSE, - /// \brief A GNUNullExpr record. + /// A GNUNullExpr record. EXPR_GNU_NULL, - /// \brief A ShuffleVectorExpr record. + /// A ShuffleVectorExpr record. EXPR_SHUFFLE_VECTOR, - /// \brief A ConvertVectorExpr record. + /// A ConvertVectorExpr record. EXPR_CONVERT_VECTOR, - /// \brief BlockExpr + /// BlockExpr EXPR_BLOCK, - /// \brief A GenericSelectionExpr record. + /// A GenericSelectionExpr record. EXPR_GENERIC_SELECTION, - /// \brief A PseudoObjectExpr record. + /// A PseudoObjectExpr record. EXPR_PSEUDO_OBJECT, - /// \brief An AtomicExpr record. + /// An AtomicExpr record. EXPR_ATOMIC, // Objective-C - /// \brief An ObjCStringLiteral record. + /// An ObjCStringLiteral record. EXPR_OBJC_STRING_LITERAL, EXPR_OBJC_BOXED_EXPRESSION, EXPR_OBJC_ARRAY_LITERAL, EXPR_OBJC_DICTIONARY_LITERAL, - /// \brief An ObjCEncodeExpr record. + /// An ObjCEncodeExpr record. EXPR_OBJC_ENCODE, - /// \brief An ObjCSelectorExpr record. + /// An ObjCSelectorExpr record. EXPR_OBJC_SELECTOR_EXPR, - /// \brief An ObjCProtocolExpr record. + /// An ObjCProtocolExpr record. EXPR_OBJC_PROTOCOL_EXPR, - /// \brief An ObjCIvarRefExpr record. + /// An ObjCIvarRefExpr record. EXPR_OBJC_IVAR_REF_EXPR, - /// \brief An ObjCPropertyRefExpr record. + /// An ObjCPropertyRefExpr record. EXPR_OBJC_PROPERTY_REF_EXPR, - /// \brief An ObjCSubscriptRefExpr record. + /// An ObjCSubscriptRefExpr record. EXPR_OBJC_SUBSCRIPT_REF_EXPR, - /// \brief UNUSED + /// UNUSED EXPR_OBJC_KVC_REF_EXPR, - /// \brief An ObjCMessageExpr record. + /// An ObjCMessageExpr record. EXPR_OBJC_MESSAGE_EXPR, - /// \brief An ObjCIsa Expr record. + /// An ObjCIsa Expr record. EXPR_OBJC_ISA, - /// \brief An ObjCIndirectCopyRestoreExpr record. + /// An ObjCIndirectCopyRestoreExpr record. EXPR_OBJC_INDIRECT_COPY_RESTORE, - /// \brief An ObjCForCollectionStmt record. + /// An ObjCForCollectionStmt record. STMT_OBJC_FOR_COLLECTION, - /// \brief An ObjCAtCatchStmt record. + /// An ObjCAtCatchStmt record. STMT_OBJC_CATCH, - /// \brief An ObjCAtFinallyStmt record. + /// An ObjCAtFinallyStmt record. STMT_OBJC_FINALLY, - /// \brief An ObjCAtTryStmt record. + /// An ObjCAtTryStmt record. STMT_OBJC_AT_TRY, - /// \brief An ObjCAtSynchronizedStmt record. + /// An ObjCAtSynchronizedStmt record. STMT_OBJC_AT_SYNCHRONIZED, - /// \brief An ObjCAtThrowStmt record. + /// An ObjCAtThrowStmt record. STMT_OBJC_AT_THROW, - /// \brief An ObjCAutoreleasePoolStmt record. + /// An ObjCAutoreleasePoolStmt record. STMT_OBJC_AUTORELEASE_POOL, - /// \brief An ObjCBoolLiteralExpr record. + /// An ObjCBoolLiteralExpr record. EXPR_OBJC_BOOL_LITERAL, - /// \brief An ObjCAvailabilityCheckExpr record. + /// An ObjCAvailabilityCheckExpr record. EXPR_OBJC_AVAILABILITY_CHECK, // C++ - /// \brief A CXXCatchStmt record. + /// A CXXCatchStmt record. STMT_CXX_CATCH, - /// \brief A CXXTryStmt record. + /// A CXXTryStmt record. STMT_CXX_TRY, - /// \brief A CXXForRangeStmt record. + /// A CXXForRangeStmt record. STMT_CXX_FOR_RANGE, - /// \brief A CXXOperatorCallExpr record. + /// A CXXOperatorCallExpr record. EXPR_CXX_OPERATOR_CALL, - /// \brief A CXXMemberCallExpr record. + /// A CXXMemberCallExpr record. EXPR_CXX_MEMBER_CALL, - /// \brief A CXXConstructExpr record. + /// A CXXConstructExpr record. EXPR_CXX_CONSTRUCT, - /// \brief A CXXInheritedCtorInitExpr record. + /// A CXXInheritedCtorInitExpr record. EXPR_CXX_INHERITED_CTOR_INIT, - /// \brief A CXXTemporaryObjectExpr record. + /// A CXXTemporaryObjectExpr record. EXPR_CXX_TEMPORARY_OBJECT, - /// \brief A CXXStaticCastExpr record. + /// A CXXStaticCastExpr record. EXPR_CXX_STATIC_CAST, - /// \brief A CXXDynamicCastExpr record. + /// A CXXDynamicCastExpr record. EXPR_CXX_DYNAMIC_CAST, - /// \brief A CXXReinterpretCastExpr record. + /// A CXXReinterpretCastExpr record. EXPR_CXX_REINTERPRET_CAST, - /// \brief A CXXConstCastExpr record. + /// A CXXConstCastExpr record. EXPR_CXX_CONST_CAST, - /// \brief A CXXFunctionalCastExpr record. + /// A CXXFunctionalCastExpr record. EXPR_CXX_FUNCTIONAL_CAST, - /// \brief A UserDefinedLiteral record. + /// A UserDefinedLiteral record. EXPR_USER_DEFINED_LITERAL, - /// \brief A CXXStdInitializerListExpr record. + /// A CXXStdInitializerListExpr record. EXPR_CXX_STD_INITIALIZER_LIST, - /// \brief A CXXBoolLiteralExpr record. + /// A CXXBoolLiteralExpr record. EXPR_CXX_BOOL_LITERAL, EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr @@ -1890,24 +1890,24 @@ namespace serialization { EXPR_DEPENDENT_COAWAIT, }; - /// \brief The kinds of designators that can occur in a + /// The kinds of designators that can occur in a /// DesignatedInitExpr. enum DesignatorTypes { - /// \brief Field designator where only the field name is known. + /// Field designator where only the field name is known. DESIG_FIELD_NAME = 0, - /// \brief Field designator where the field has been resolved to + /// Field designator where the field has been resolved to /// a declaration. DESIG_FIELD_DECL = 1, - /// \brief Array designator. + /// Array designator. DESIG_ARRAY = 2, - /// \brief GNU array range designator. + /// GNU array range designator. DESIG_ARRAY_RANGE = 3 }; - /// \brief The different kinds of data that can occur in a + /// The different kinds of data that can occur in a /// CtorInitializer. enum CtorInitializerType { CTOR_INITIALIZER_BASE, @@ -1916,7 +1916,7 @@ namespace serialization { CTOR_INITIALIZER_INDIRECT_MEMBER }; - /// \brief Describes the redeclarations of a declaration. + /// Describes the redeclarations of a declaration. struct LocalRedeclarationsInfo { // The ID of the first declaration DeclID FirstID; @@ -1945,7 +1945,7 @@ namespace serialization { } }; - /// \brief Describes the categories of an Objective-C class. + /// Describes the categories of an Objective-C class. struct ObjCCategoriesInfo { // The ID of the definition DeclID DefinitionID; @@ -1974,7 +1974,7 @@ namespace serialization { } }; - /// \brief A key used when looking up entities by \ref DeclarationName. + /// A key used when looking up entities by \ref DeclarationName. /// /// Different \ref DeclarationNames are mapped to different keys, but the /// same key can occasionally represent multiple names (for names that diff --git a/include/clang/Serialization/ASTDeserializationListener.h b/include/clang/Serialization/ASTDeserializationListener.h index c26f3e0b42..c462a90dde 100644 --- a/include/clang/Serialization/ASTDeserializationListener.h +++ b/include/clang/Serialization/ASTDeserializationListener.h @@ -32,28 +32,28 @@ class ASTDeserializationListener { public: virtual ~ASTDeserializationListener(); - /// \brief The ASTReader was initialized. + /// The ASTReader was initialized. virtual void ReaderInitialized(ASTReader *Reader) { } - /// \brief An identifier was deserialized from the AST file. + /// An identifier was deserialized from the AST file. virtual void IdentifierRead(serialization::IdentID ID, IdentifierInfo *II) { } - /// \brief A macro was read from the AST file. + /// A macro was read from the AST file. virtual void MacroRead(serialization::MacroID ID, MacroInfo *MI) { } - /// \brief A type was deserialized from the AST file. The ID here has the + /// A type was deserialized from the AST file. The ID here has the /// qualifier bits already removed, and T is guaranteed to be locally /// unqualified. virtual void TypeRead(serialization::TypeIdx Idx, QualType T) { } - /// \brief A decl was deserialized from the AST file. + /// A decl was deserialized from the AST file. virtual void DeclRead(serialization::DeclID ID, const Decl *D) { } - /// \brief A selector was read from the AST file. + /// A selector was read from the AST file. virtual void SelectorRead(serialization::SelectorID iD, Selector Sel) {} - /// \brief A macro definition was read from the AST file. + /// A macro definition was read from the AST file. virtual void MacroDefinitionRead(serialization::PreprocessedEntityID, MacroDefinitionRecord *MD) {} - /// \brief A module definition was read from the AST file. + /// A module definition was read from the AST file. virtual void ModuleRead(serialization::SubmoduleID ID, Module *Mod) {} - /// \brief A module import was read from the AST file. + /// A module import was read from the AST file. virtual void ModuleImportRead(serialization::SubmoduleID ID, SourceLocation ImportLoc) {} }; diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index ba9fc0605b..d9e9174b74 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -117,7 +117,7 @@ class TypeSourceInfo; class ValueDecl; class VarDecl; -/// \brief Abstract interface for callback invocations by the ASTReader. +/// Abstract interface for callback invocations by the ASTReader. /// /// While reading an AST file, the ASTReader will call the methods of the /// listener to pass on specific information. Some of the listener methods can @@ -127,7 +127,7 @@ class ASTReaderListener { public: virtual ~ASTReaderListener(); - /// \brief Receives the full Clang version information. + /// Receives the full Clang version information. /// /// \returns true to indicate that the version is invalid. Subclasses should /// generally defer to this implementation. @@ -138,7 +138,7 @@ public: virtual void ReadModuleName(StringRef ModuleName) {} virtual void ReadModuleMapFile(StringRef ModuleMapPath) {} - /// \brief Receives the language options. + /// Receives the language options. /// /// \returns true to indicate the options are invalid or false otherwise. virtual bool ReadLanguageOptions(const LangOptions &LangOpts, @@ -147,7 +147,7 @@ public: return false; } - /// \brief Receives the target options. + /// Receives the target options. /// /// \returns true to indicate the target options are invalid, or false /// otherwise. @@ -156,7 +156,7 @@ public: return false; } - /// \brief Receives the diagnostic options. + /// Receives the diagnostic options. /// /// \returns true to indicate the diagnostic options are invalid, or false /// otherwise. @@ -166,7 +166,7 @@ public: return false; } - /// \brief Receives the file system options. + /// Receives the file system options. /// /// \returns true to indicate the file system options are invalid, or false /// otherwise. @@ -175,7 +175,7 @@ public: return false; } - /// \brief Receives the header search options. + /// Receives the header search options. /// /// \returns true to indicate the header search options are invalid, or false /// otherwise. @@ -185,7 +185,7 @@ public: return false; } - /// \brief Receives the preprocessor options. + /// Receives the preprocessor options. /// /// \param SuggestedPredefines Can be filled in with the set of predefines /// that are suggested by the preprocessor options. Typically only used when @@ -199,7 +199,7 @@ public: return false; } - /// \brief Receives __COUNTER__ value. + /// Receives __COUNTER__ value. virtual void ReadCounter(const serialization::ModuleFile &M, unsigned Value) {} @@ -207,15 +207,15 @@ public: virtual void visitModuleFile(StringRef Filename, serialization::ModuleKind Kind) {} - /// \brief Returns true if this \c ASTReaderListener wants to receive the + /// Returns true if this \c ASTReaderListener wants to receive the /// input files of the AST file via \c visitInputFile, false otherwise. virtual bool needsInputFileVisitation() { return false; } - /// \brief Returns true if this \c ASTReaderListener wants to receive the + /// Returns true if this \c ASTReaderListener wants to receive the /// system input files of the AST file via \c visitInputFile, false otherwise. virtual bool needsSystemInputFileVisitation() { return false; } - /// \brief if \c needsInputFileVisitation returns true, this is called for + /// if \c needsInputFileVisitation returns true, this is called for /// each non-system input file of the AST File. If /// \c needsSystemInputFileVisitation is true, then it is called for all /// system input files as well. @@ -226,11 +226,11 @@ public: return true; } - /// \brief Returns true if this \c ASTReaderListener wants to receive the + /// Returns true if this \c ASTReaderListener wants to receive the /// imports of the AST file via \c visitImport, false otherwise. virtual bool needsImportVisitation() const { return false; } - /// \brief If needsImportVisitation returns \c true, this is called for each + /// If needsImportVisitation returns \c true, this is called for each /// AST file imported by this AST file. virtual void visitImport(StringRef Filename) {} @@ -239,7 +239,7 @@ public: const ModuleFileExtensionMetadata &Metadata) {} }; -/// \brief Simple wrapper class for chaining listeners. +/// Simple wrapper class for chaining listeners. class ChainedASTReaderListener : public ASTReaderListener { std::unique_ptr<ASTReaderListener> First; std::unique_ptr<ASTReaderListener> Second; @@ -283,7 +283,7 @@ public: const ModuleFileExtensionMetadata &Metadata) override; }; -/// \brief ASTReaderListener implementation to validate the information of +/// ASTReaderListener implementation to validate the information of /// the PCH file against an initialized Preprocessor. class PCHValidator : public ASTReaderListener { Preprocessor &PP; @@ -310,7 +310,7 @@ private: void Error(const char *Msg); }; -/// \brief ASTReaderListenter implementation to set SuggestedPredefines of +/// ASTReaderListenter implementation to set SuggestedPredefines of /// ASTReader which is required to use a pch file. This is the replacement /// of PCHValidator or SimplePCHValidator when using a pch file without /// validating it. @@ -332,14 +332,14 @@ namespace reader { class ASTIdentifierLookupTrait; -/// \brief The on-disk hash table(s) used for DeclContext name lookup. +/// The on-disk hash table(s) used for DeclContext name lookup. struct DeclContextLookupTable; } // namespace reader } // namespace serialization -/// \brief Reads an AST files chain containing the contents of a translation +/// Reads an AST files chain containing the contents of a translation /// unit. /// /// The ASTReader class reads bitstreams (produced by the ASTWriter @@ -360,7 +360,7 @@ class ASTReader public ExternalSLocEntrySource { public: - /// \brief Types of AST files. + /// Types of AST files. friend class ASTDeclReader; friend class ASTIdentifierIterator; friend class ASTRecordReader; @@ -375,31 +375,31 @@ public: using RecordData = SmallVector<uint64_t, 64>; using RecordDataImpl = SmallVectorImpl<uint64_t>; - /// \brief The result of reading the control block of an AST file, which + /// The result of reading the control block of an AST file, which /// can fail for various reasons. enum ASTReadResult { - /// \brief The control block was read successfully. Aside from failures, + /// The control block was read successfully. Aside from failures, /// the AST file is safe to read into the current context. Success, - /// \brief The AST file itself appears corrupted. + /// The AST file itself appears corrupted. Failure, - /// \brief The AST file was missing. + /// The AST file was missing. Missing, - /// \brief The AST file is out-of-date relative to its input files, + /// The AST file is out-of-date relative to its input files, /// and needs to be regenerated. OutOfDate, - /// \brief The AST file was written by a different version of Clang. + /// The AST file was written by a different version of Clang. VersionMismatch, - /// \brief The AST file was writtten with a different language/target + /// The AST file was writtten with a different language/target /// configuration. ConfigurationMismatch, - /// \brief The AST file has errors. + /// The AST file has errors. HadErrors }; @@ -411,10 +411,10 @@ public: using ModuleReverseIterator = ModuleManager::ModuleReverseIterator; private: - /// \brief The receiver of some callbacks invoked by ASTReader. + /// The receiver of some callbacks invoked by ASTReader. std::unique_ptr<ASTReaderListener> Listener; - /// \brief The receiver of deserialization events. + /// The receiver of deserialization events. ASTDeserializationListener *DeserializationListener = nullptr; bool OwnsDeserializationListener = false; @@ -424,26 +424,26 @@ private: const PCHContainerReader &PCHContainerRdr; DiagnosticsEngine &Diags; - /// \brief The semantic analysis object that will be processing the + /// The semantic analysis object that will be processing the /// AST files and the translation unit that uses it. Sema *SemaObj = nullptr; - /// \brief The preprocessor that will be loading the source file. + /// The preprocessor that will be loading the source file. Preprocessor &PP; - /// \brief The AST context into which we'll read the AST files. + /// The AST context into which we'll read the AST files. ASTContext *ContextObj = nullptr; - /// \brief The AST consumer. + /// The AST consumer. ASTConsumer *Consumer = nullptr; - /// \brief The module manager which manages modules and their dependencies + /// The module manager which manages modules and their dependencies ModuleManager ModuleMgr; /// The cache that manages memory buffers for PCM files. MemoryBufferCache &PCMCache; - /// \brief A dummy identifier resolver used to merge TU-scope declarations in + /// A dummy identifier resolver used to merge TU-scope declarations in /// C, for the cases where we don't have a Sema object to provide a real /// identifier resolver. IdentifierResolver DummyIdResolver; @@ -451,31 +451,31 @@ private: /// A mapping from extension block names to module file extensions. llvm::StringMap<std::shared_ptr<ModuleFileExtension>> ModuleFileExtensions; - /// \brief A timer used to track the time spent deserializing. + /// A timer used to track the time spent deserializing. std::unique_ptr<llvm::Timer> ReadTimer; - /// \brief The location where the module file will be considered as + /// The location where the module file will be considered as /// imported from. For non-module AST types it should be invalid. SourceLocation CurrentImportLoc; - /// \brief The global module index, if loaded. + /// The global module index, if loaded. std::unique_ptr<GlobalModuleIndex> GlobalIndex; - /// \brief A map of global bit offsets to the module that stores entities + /// A map of global bit offsets to the module that stores entities /// at those bit offsets. ContinuousRangeMap<uint64_t, ModuleFile*, 4> GlobalBitOffsetsMap; - /// \brief A map of negated SLocEntryIDs to the modules containing them. + /// A map of negated SLocEntryIDs to the modules containing them. ContinuousRangeMap<unsigned, ModuleFile*, 64> GlobalSLocEntryMap; using GlobalSLocOffsetMapType = ContinuousRangeMap<unsigned, ModuleFile *, 64>; - /// \brief A map of reversed (SourceManager::MaxLoadedOffset - SLocOffset) + /// A map of reversed (SourceManager::MaxLoadedOffset - SLocOffset) /// SourceLocation offsets to the modules containing them. GlobalSLocOffsetMapType GlobalSLocOffsetMap; - /// \brief Types that have already been loaded from the chain. + /// Types that have already been loaded from the chain. /// /// When the pointer at index I is non-NULL, the type with /// ID = (I + 1) << FastQual::Width has already been loaded @@ -484,12 +484,12 @@ private: using GlobalTypeMapType = ContinuousRangeMap<serialization::TypeID, ModuleFile *, 4>; - /// \brief Mapping from global type IDs to the module in which the + /// Mapping from global type IDs to the module in which the /// type resides along with the offset that should be added to the /// global type ID to produce a local ID. GlobalTypeMapType GlobalTypeMap; - /// \brief Declarations that have already been loaded from the chain. + /// Declarations that have already been loaded from the chain. /// /// When the pointer at index I is non-NULL, the declaration with ID /// = I + 1 has already been loaded. @@ -498,7 +498,7 @@ private: using GlobalDeclMapType = ContinuousRangeMap<serialization::DeclID, ModuleFile *, 4>; - /// \brief Mapping from global declaration IDs to the module in which the + /// Mapping from global declaration IDs to the module in which the /// declaration resides. GlobalDeclMapType GlobalDeclMap; @@ -507,7 +507,7 @@ private: using DeclUpdateOffsetsMap = llvm::DenseMap<serialization::DeclID, FileOffsetsTy>; - /// \brief Declarations that have modifications residing in a later file + /// Declarations that have modifications residing in a later file /// in the chain. DeclUpdateOffsetsMap DeclUpdateOffsets; @@ -523,28 +523,28 @@ private: : D(D), ID(ID), JustLoaded(JustLoaded) {} }; - /// \brief Declaration updates for already-loaded declarations that we need + /// Declaration updates for already-loaded declarations that we need /// to apply once we finish processing an import. llvm::SmallVector<PendingUpdateRecord, 16> PendingUpdateRecords; enum class PendingFakeDefinitionKind { NotFake, Fake, FakeLoaded }; - /// \brief The DefinitionData pointers that we faked up for class definitions + /// The DefinitionData pointers that we faked up for class definitions /// that we needed but hadn't loaded yet. llvm::DenseMap<void *, PendingFakeDefinitionKind> PendingFakeDefinitionData; - /// \brief Exception specification updates that have been loaded but not yet + /// Exception specification updates that have been loaded but not yet /// propagated across the relevant redeclaration chain. The map key is the /// canonical declaration (used only for deduplication) and the value is a /// declaration that has an exception specification. llvm::SmallMapVector<Decl *, FunctionDecl *, 4> PendingExceptionSpecUpdates; - /// \brief Declarations that have been imported and have typedef names for + /// Declarations that have been imported and have typedef names for /// linkage purposes. llvm::DenseMap<std::pair<DeclContext *, IdentifierInfo *>, NamedDecl *> ImportedTypedefNamesForLinkage; - /// \brief Mergeable declaration contexts that have anonymous declarations + /// Mergeable declaration contexts that have anonymous declarations /// within them, and those anonymous declarations. llvm::DenseMap<DeclContext*, llvm::SmallVector<NamedDecl*, 2>> AnonymousDeclarationsForMerging; @@ -558,21 +558,21 @@ private: : Mod(Mod), Decls(Decls) {} }; - /// \brief Map from a FileID to the file-level declarations that it contains. + /// Map from a FileID to the file-level declarations that it contains. llvm::DenseMap<FileID, FileDeclsInfo> FileDeclIDs; - /// \brief An array of lexical contents of a declaration context, as a sequence of + /// An array of lexical contents of a declaration context, as a sequence of /// Decl::Kind, DeclID pairs. using LexicalContents = ArrayRef<llvm::support::unaligned_uint32_t>; - /// \brief Map from a DeclContext to its lexical contents. + /// Map from a DeclContext to its lexical contents. llvm::DenseMap<const DeclContext*, std::pair<ModuleFile*, LexicalContents>> LexicalDecls; - /// \brief Map from the TU to its lexical contents from each module file. + /// Map from the TU to its lexical contents from each module file. std::vector<std::pair<ModuleFile*, LexicalContents>> TULexicalDecls; - /// \brief Map from a DeclContext to its lookup tables. + /// Map from a DeclContext to its lookup tables. llvm::DenseMap<const DeclContext *, serialization::reader::DeclContextLookupTable> Lookups; @@ -586,12 +586,12 @@ private: }; using DeclContextVisibleUpdates = SmallVector<PendingVisibleUpdate, 1>; - /// \brief Updates to the visible declarations of declaration contexts that + /// Updates to the visible declarations of declaration contexts that /// haven't been loaded yet. llvm::DenseMap<serialization::DeclID, DeclContextVisibleUpdates> PendingVisibleUpdates; - /// \brief The set of C++ or Objective-C classes that have forward + /// The set of C++ or Objective-C classes that have forward /// declarations that have not yet been linked to their definitions. llvm::SmallPtrSet<Decl *, 4> PendingDefinitions; @@ -600,24 +600,24 @@ private: llvm::SmallDenseMap<Decl *, unsigned, 4>, SmallVector<std::pair<Decl *, uint64_t>, 4>>; - /// \brief Functions or methods that have bodies that will be attached. + /// Functions or methods that have bodies that will be attached. PendingBodiesMap PendingBodies; - /// \brief Definitions for which we have added merged definitions but not yet + /// Definitions for which we have added merged definitions but not yet /// performed deduplication. llvm::SetVector<NamedDecl *> PendingMergedDefinitionsToDeduplicate; - /// \brief Read the record that describes the lexical contents of a DC. + /// Read the record that describes the lexical contents of a DC. bool ReadLexicalDeclContextStorage(ModuleFile &M, llvm::BitstreamCursor &Cursor, uint64_t Offset, DeclContext *DC); - /// \brief Read the record that describes the visible contents of a DC. + /// Read the record that describes the visible contents of a DC. bool ReadVisibleDeclContextStorage(ModuleFile &M, llvm::BitstreamCursor &Cursor, uint64_t Offset, serialization::DeclID ID); - /// \brief A vector containing identifiers that have already been + /// A vector containing identifiers that have already been /// loaded. /// /// If the pointer at index I is non-NULL, then it refers to the @@ -628,12 +628,12 @@ private: using GlobalIdentifierMapType = ContinuousRangeMap<serialization::IdentID, ModuleFile *, 4>; - /// \brief Mapping from global identifier IDs to the module in which the + /// Mapping from global identifier IDs to the module in which the /// identifier resides along with the offset that should be added to the /// global identifier ID to produce a local ID. GlobalIdentifierMapType GlobalIdentifierMap; - /// \brief A vector containing macros that have already been + /// A vector containing macros that have already been /// loaded. /// /// If the pointer at index I is non-NULL, then it refers to the @@ -644,7 +644,7 @@ private: using LoadedMacroInfo = std::pair<IdentifierInfo *, serialization::SubmoduleID>; - /// \brief A set of #undef directives that we have loaded; used to + /// A set of #undef directives that we have loaded; used to /// deduplicate the same #undef information coming from multiple module /// files. llvm::DenseSet<LoadedMacroInfo> LoadedUndefs; @@ -652,12 +652,12 @@ private: using GlobalMacroMapType = ContinuousRangeMap<serialization::MacroID, ModuleFile *, 4>; - /// \brief Mapping from global macro IDs to the module in which the + /// Mapping from global macro IDs to the module in which the /// macro resides along with the offset that should be added to the /// global macro ID to produce a local ID. GlobalMacroMapType GlobalMacroMap; - /// \brief A vector containing submodules that have already been loaded. + /// A vector containing submodules that have already been loaded. /// /// This vector is indexed by the Submodule ID (-1). NULL submodule entries /// indicate that the particular submodule ID has not yet been loaded. @@ -666,45 +666,45 @@ private: using GlobalSubmoduleMapType = ContinuousRangeMap<serialization::SubmoduleID, ModuleFile *, 4>; - /// \brief Mapping from global submodule IDs to the module file in which the + /// Mapping from global submodule IDs to the module file in which the /// submodule resides along with the offset that should be added to the /// global submodule ID to produce a local ID. GlobalSubmoduleMapType GlobalSubmoduleMap; - /// \brief A set of hidden declarations. + /// A set of hidden declarations. using HiddenNames = SmallVector<Decl *, 2>; using HiddenNamesMapType = llvm::DenseMap<Module *, HiddenNames>; - /// \brief A mapping from each of the hidden submodules to the deserialized + /// A mapping from each of the hidden submodules to the deserialized /// declarations in that submodule that could be made visible. HiddenNamesMapType HiddenNamesMap; - /// \brief A module import, export, or conflict that hasn't yet been resolved. + /// A module import, export, or conflict that hasn't yet been resolved. struct UnresolvedModuleRef { - /// \brief The file in which this module resides. + /// The file in which this module resides. ModuleFile *File; - /// \brief The module that is importing or exporting. + /// The module that is importing or exporting. Module *Mod; - /// \brief The kind of module reference. + /// The kind of module reference. enum { Import, Export, Conflict } Kind; - /// \brief The local ID of the module that is being exported. + /// The local ID of the module that is being exported. unsigned ID; - /// \brief Whether this is a wildcard export. + /// Whether this is a wildcard export. unsigned IsWildcard : 1; - /// \brief String data. + /// String data. StringRef String; }; - /// \brief The set of module imports and exports that still need to be + /// The set of module imports and exports that still need to be /// resolved. SmallVector<UnresolvedModuleRef, 2> UnresolvedModuleRefs; - /// \brief A vector containing selectors that have already been loaded. + /// A vector containing selectors that have already been loaded. /// /// This vector is indexed by the Selector ID (-1). NULL selector /// entries indicate that the particular selector ID has not yet @@ -714,11 +714,11 @@ private: using GlobalSelectorMapType = ContinuousRangeMap<serialization::SelectorID, ModuleFile *, 4>; - /// \brief Mapping from global selector IDs to the module in which the + /// Mapping from global selector IDs to the module in which the /// global selector ID to produce a local ID. GlobalSelectorMapType GlobalSelectorMap; - /// \brief The generation number of the last time we loaded data from the + /// The generation number of the last time we loaded data from the /// global method pool for this selector. llvm::DenseMap<Selector, unsigned> SelectorGeneration; @@ -737,14 +737,14 @@ private: using PendingMacroIDsMap = llvm::MapVector<IdentifierInfo *, SmallVector<PendingMacroInfo, 2>>; - /// \brief Mapping from identifiers that have a macro history to the global + /// Mapping from identifiers that have a macro history to the global /// IDs have not yet been deserialized to the global IDs of those macros. PendingMacroIDsMap PendingMacroIDs; using GlobalPreprocessedEntityMapType = ContinuousRangeMap<unsigned, ModuleFile *, 4>; - /// \brief Mapping from global preprocessing entity IDs to the module in + /// Mapping from global preprocessing entity IDs to the module in /// which the preprocessed entity resides along with the offset that should be /// added to the global preprocessing entity ID to produce a local ID. GlobalPreprocessedEntityMapType GlobalPreprocessedEntityMap; @@ -752,15 +752,15 @@ private: using GlobalSkippedRangeMapType = ContinuousRangeMap<unsigned, ModuleFile *, 4>; - /// \brief Mapping from global skipped range base IDs to the module in which + /// Mapping from global skipped range base IDs to the module in which /// the skipped ranges reside. GlobalSkippedRangeMapType GlobalSkippedRangeMap; /// \name CodeGen-relevant special data - /// \brief Fields containing data that is relevant to CodeGen. + /// Fields containing data that is relevant to CodeGen. //@{ - /// \brief The IDs of all declarations that fulfill the criteria of + /// The IDs of all declarations that fulfill the criteria of /// "interesting" decls. /// /// This contains the data loaded from all EAGERLY_DESERIALIZED_DECLS blocks @@ -768,21 +768,21 @@ private: /// the consumer eagerly. SmallVector<uint64_t, 16> EagerlyDeserializedDecls; - /// \brief The IDs of all tentative definitions stored in the chain. + /// The IDs of all tentative definitions stored in the chain. /// /// Sema keeps track of all tentative definitions in a TU because it has to /// complete them and pass them on to CodeGen. Thus, tentative definitions in /// the PCH chain must be eagerly deserialized. SmallVector<uint64_t, 16> TentativeDefinitions; - /// \brief The IDs of all CXXRecordDecls stored in the chain whose VTables are + /// The IDs of all CXXRecordDecls stored in the chain whose VTables are /// used. /// /// CodeGen has to emit VTables for these records, so they have to be eagerly /// deserialized. SmallVector<uint64_t, 64> VTableUses; - /// \brief A snapshot of the pending instantiations in the chain. + /// A snapshot of the pending instantiations in the chain. /// /// This record tracks the instantiations that Sema has to perform at the /// end of the TU. It consists of a pair of values for every pending @@ -793,26 +793,26 @@ private: //@} /// \name DiagnosticsEngine-relevant special data - /// \brief Fields containing data that is used for generating diagnostics + /// Fields containing data that is used for generating diagnostics //@{ - /// \brief A snapshot of Sema's unused file-scoped variable tracking, for + /// A snapshot of Sema's unused file-scoped variable tracking, for /// generating warnings. SmallVector<uint64_t, 16> UnusedFileScopedDecls; - /// \brief A list of all the delegating constructors we've seen, to diagnose + /// A list of all the delegating constructors we've seen, to diagnose /// cycles. SmallVector<uint64_t, 4> DelegatingCtorDecls; - /// \brief Method selectors used in a @selector expression. Used for + /// Method selectors used in a @selector expression. Used for /// implementation of -Wselector. SmallVector<uint64_t, 64> ReferencedSelectorsData; - /// \brief A snapshot of Sema's weak undeclared identifier tracking, for + /// A snapshot of Sema's weak undeclared identifier tracking, for /// generating warnings. SmallVector<uint64_t, 64> WeakUndeclaredIdentifiers; - /// \brief The IDs of type aliases for ext_vectors that exist in the chain. + /// The IDs of type aliases for ext_vectors that exist in the chain. /// /// Used by Sema for finding sugared names for ext_vectors in diagnostics. SmallVector<uint64_t, 4> ExtVectorDecls; @@ -820,48 +820,48 @@ private: //@} /// \name Sema-relevant special data - /// \brief Fields containing data that is used for semantic analysis + /// Fields containing data that is used for semantic analysis //@{ - /// \brief The IDs of all potentially unused typedef names in the chain. + /// The IDs of all potentially unused typedef names in the chain. /// /// Sema tracks these to emit warnings. SmallVector<uint64_t, 16> UnusedLocalTypedefNameCandidates; - /// \brief Our current depth in #pragma cuda force_host_device begin/end + /// Our current depth in #pragma cuda force_host_device begin/end /// macros. unsigned ForceCUDAHostDeviceDepth = 0; - /// \brief The IDs of the declarations Sema stores directly. + /// The IDs of the declarations Sema stores directly. /// /// Sema tracks a few important decls, such as namespace std, directly. SmallVector<uint64_t, 4> SemaDeclRefs; - /// \brief The IDs of the types ASTContext stores directly. + /// The IDs of the types ASTContext stores directly. /// /// The AST context tracks a few important types, such as va_list, directly. SmallVector<uint64_t, 16> SpecialTypes; - /// \brief The IDs of CUDA-specific declarations ASTContext stores directly. + /// The IDs of CUDA-specific declarations ASTContext stores directly. /// /// The AST context tracks a few important decls, currently cudaConfigureCall, /// directly. SmallVector<uint64_t, 2> CUDASpecialDeclRefs; - /// \brief The floating point pragma option settings. + /// The floating point pragma option settings. SmallVector<uint64_t, 1> FPPragmaOptions; - /// \brief The pragma clang optimize location (if the pragma state is "off"). + /// The pragma clang optimize location (if the pragma state is "off"). SourceLocation OptimizeOffPragmaLocation; - /// \brief The PragmaMSStructKind pragma ms_struct state if set, or -1. + /// The PragmaMSStructKind pragma ms_struct state if set, or -1. int PragmaMSStructState = -1; - /// \brief The PragmaMSPointersToMembersKind pragma pointers_to_members state. + /// The PragmaMSPointersToMembersKind pragma pointers_to_members state. int PragmaMSPointersToMembersState = -1; SourceLocation PointersToMembersPragmaLocation; - /// \brief The pragma pack state. + /// The pragma pack state. Optional<unsigned> PragmaPackCurrentValue; SourceLocation PragmaPackCurrentLocation; struct PragmaPackStackEntry { @@ -873,26 +873,26 @@ private: llvm::SmallVector<PragmaPackStackEntry, 2> PragmaPackStack; llvm::SmallVector<std::string, 2> PragmaPackStrings; - /// \brief The OpenCL extension settings. + /// The OpenCL extension settings. OpenCLOptions OpenCLExtensions; - /// \brief Extensions required by an OpenCL type. + /// Extensions required by an OpenCL type. llvm::DenseMap<const Type *, std::set<std::string>> OpenCLTypeExtMap; - /// \brief Extensions required by an OpenCL declaration. + /// Extensions required by an OpenCL declaration. llvm::DenseMap<const Decl *, std::set<std::string>> OpenCLDeclExtMap; - /// \brief A list of the namespaces we've seen. + /// A list of the namespaces we've seen. SmallVector<uint64_t, 4> KnownNamespaces; - /// \brief A list of undefined decls with internal linkage followed by the + /// A list of undefined decls with internal linkage followed by the /// SourceLocation of a matching ODR-use. SmallVector<uint64_t, 8> UndefinedButUsed; - /// \brief Delete expressions to analyze at the end of translation unit. + /// Delete expressions to analyze at the end of translation unit. SmallVector<uint64_t, 8> DelayedDeleteExprs; - // \brief A list of late parsed template function data. + // A list of late parsed template function data. SmallVector<uint64_t, 1> LateParsedTemplates; public: @@ -905,41 +905,41 @@ public: }; private: - /// \brief A list of modules that were imported by precompiled headers or + /// A list of modules that were imported by precompiled headers or /// any other non-module AST file. SmallVector<ImportedSubmodule, 2> ImportedModules; //@} - /// \brief The system include root to be used when loading the + /// The system include root to be used when loading the /// precompiled header. std::string isysroot; - /// \brief Whether to disable the normal validation performed on precompiled + /// Whether to disable the normal validation performed on precompiled /// headers when they are loaded. bool DisableValidation; - /// \brief Whether to accept an AST file with compiler errors. + /// Whether to accept an AST file with compiler errors. bool AllowASTWithCompilerErrors; - /// \brief Whether to accept an AST file that has a different configuration + /// Whether to accept an AST file that has a different configuration /// from the current compiler instance. bool AllowConfigurationMismatch; - /// \brief Whether validate system input files. + /// Whether validate system input files. bool ValidateSystemInputs; - /// \brief Whether we are allowed to use the global module index. + /// Whether we are allowed to use the global module index. bool UseGlobalIndex; - /// \brief Whether we have tried loading the global module index yet. + /// Whether we have tried loading the global module index yet. bool TriedLoadingGlobalIndex = false; - ///\brief Whether we are currently processing update records. + ///Whether we are currently processing update records. bool ProcessingUpdateRecords = false; using SwitchCaseMapTy = llvm::DenseMap<unsigned, SwitchCase *>; - /// \brief Mapping from switch-case IDs in the chain to switch-case statements + /// Mapping from switch-case IDs in the chain to switch-case statements /// /// Statements usually don't have IDs, but switch cases need them, so that the /// switch statement can refer to them. @@ -947,56 +947,56 @@ private: SwitchCaseMapTy *CurrSwitchCaseStmts; - /// \brief The number of source location entries de-serialized from + /// The number of source location entries de-serialized from /// the PCH file. unsigned NumSLocEntriesRead = 0; - /// \brief The number of source location entries in the chain. + /// The number of source location entries in the chain. unsigned TotalNumSLocEntries = 0; - /// \brief The number of statements (and expressions) de-serialized + /// The number of statements (and expressions) de-serialized /// from the chain. unsigned NumStatementsRead = 0; - /// \brief The total number of statements (and expressions) stored + /// The total number of statements (and expressions) stored /// in the chain. unsigned TotalNumStatements = 0; - /// \brief The number of macros de-serialized from the chain. + /// The number of macros de-serialized from the chain. unsigned NumMacrosRead = 0; - /// \brief The total number of macros stored in the chain. + /// The total number of macros stored in the chain. unsigned TotalNumMacros = 0; - /// \brief The number of lookups into identifier tables. + /// The number of lookups into identifier tables. unsigned NumIdentifierLookups = 0; - /// \brief The number of lookups into identifier tables that succeed. + /// The number of lookups into identifier tables that succeed. unsigned NumIdentifierLookupHits = 0; - /// \brief The number of selectors that have been read. + /// The number of selectors that have been read. unsigned NumSelectorsRead = 0; - /// \brief The number of method pool entries that have been read. + /// The number of method pool entries that have been read. unsigned NumMethodPoolEntriesRead = 0; - /// \brief The number of times we have looked up a selector in the method + /// The number of times we have looked up a selector in the method /// pool. unsigned NumMethodPoolLookups = 0; - /// \brief The number of times we have looked up a selector in the method + /// The number of times we have looked up a selector in the method /// pool and found something. unsigned NumMethodPoolHits = 0; - /// \brief The number of times we have looked up a selector in the method + /// The number of times we have looked up a selector in the method /// pool within a specific module. unsigned NumMethodPoolTableLookups = 0; - /// \brief The number of times we have looked up a selector in the method + /// The number of times we have looked up a selector in the method /// pool within a specific module and found something. unsigned NumMethodPoolTableHits = 0; - /// \brief The total number of method pool entries in the selector table. + /// The total number of method pool entries in the selector table. unsigned TotalNumMethodPoolEntries = 0; /// Number of lexical decl contexts read/total. @@ -1008,16 +1008,16 @@ private: /// Total size of modules, in bits, currently loaded uint64_t TotalModulesSizeInBits = 0; - /// \brief Number of Decl/types that are currently deserializing. + /// Number of Decl/types that are currently deserializing. unsigned NumCurrentElementsDeserializing = 0; - /// \brief Set true while we are in the process of passing deserialized + /// Set true while we are in the process of passing deserialized /// "interesting" decls to consumer inside FinishedDeserializing(). /// This is used as a guard to avoid recursively repeating the process of /// passing decls to consumer. bool PassingDeclsToConsumer = false; - /// \brief The set of identifiers that were read while the AST reader was + /// The set of identifiers that were read while the AST reader was /// (recursively) loading declarations. /// /// The declarations on the identifier chain for these identifiers will be @@ -1025,12 +1025,12 @@ private: llvm::MapVector<IdentifierInfo *, SmallVector<uint32_t, 4>> PendingIdentifierInfos; - /// \brief The set of lookup results that we have faked in order to support + /// The set of lookup results that we have faked in order to support /// merging of partially deserialized decls but that we have not yet removed. llvm::SmallMapVector<IdentifierInfo *, SmallVector<NamedDecl*, 2>, 16> PendingFakeLookupResults; - /// \brief The generation number of each identifier, which keeps track of + /// The generation number of each identifier, which keeps track of /// the last time we loaded information about this identifier. llvm::DenseMap<IdentifierInfo *, unsigned> IdentifierGeneration; @@ -1048,7 +1048,7 @@ private: bool hasPendingBody() { return DeclHasPendingBody; } }; - /// \brief Contains declarations and definitions that could be + /// Contains declarations and definitions that could be /// "interesting" to the ASTConsumer, when we get that AST consumer. /// /// "Interesting" declarations are those that have data that may @@ -1056,16 +1056,16 @@ private: /// Objective-C protocols. std::deque<InterestingDecl> PotentiallyInterestingDecls; - /// \brief The list of redeclaration chains that still need to be + /// The list of redeclaration chains that still need to be /// reconstructed, and the local offset to the corresponding list /// of redeclarations. SmallVector<std::pair<Decl *, uint64_t>, 16> PendingDeclChains; - /// \brief The list of canonical declarations whose redeclaration chains + /// The list of canonical declarations whose redeclaration chains /// need to be marked as incomplete once we're done deserializing things. SmallVector<Decl *, 16> PendingIncompleteDeclChains; - /// \brief The Decl IDs for the Sema/Lexical DeclContext of a Decl that has + /// The Decl IDs for the Sema/Lexical DeclContext of a Decl that has /// been loaded but its DeclContext was not set yet. struct PendingDeclContextInfo { Decl *D; @@ -1073,14 +1073,14 @@ private: serialization::GlobalDeclID LexicalDC; }; - /// \brief The set of Decls that have been loaded but their DeclContexts are + /// The set of Decls that have been loaded but their DeclContexts are /// not set yet. /// /// The DeclContexts for these Decls will be set once recursive loading has /// been completed. std::deque<PendingDeclContextInfo> PendingDeclContextInfos; - /// \brief The set of NamedDecls that have been loaded, but are members of a + /// The set of NamedDecls that have been loaded, but are members of a /// context that has been merged into another context where the corresponding /// declaration is either missing or has not yet been loaded. /// @@ -1091,22 +1091,22 @@ private: using DataPointers = std::pair<CXXRecordDecl *, struct CXXRecordDecl::DefinitionData *>; - /// \brief Record definitions in which we found an ODR violation. + /// Record definitions in which we found an ODR violation. llvm::SmallDenseMap<CXXRecordDecl *, llvm::SmallVector<DataPointers, 2>, 2> PendingOdrMergeFailures; - /// \brief Function definitions in which we found an ODR violation. + /// Function definitions in which we found an ODR violation. llvm::SmallDenseMap<FunctionDecl *, llvm::SmallVector<FunctionDecl *, 2>, 2> PendingFunctionOdrMergeFailures; - /// \brief DeclContexts in which we have diagnosed an ODR violation. + /// DeclContexts in which we have diagnosed an ODR violation. llvm::SmallPtrSet<DeclContext*, 2> DiagnosedOdrMergeFailures; - /// \brief The set of Objective-C categories that have been deserialized + /// The set of Objective-C categories that have been deserialized /// since the last time the declaration chains were linked. llvm::SmallPtrSet<ObjCCategoryDecl *, 16> CategoriesDeserialized; - /// \brief The set of Objective-C class definitions that have already been + /// The set of Objective-C class definitions that have already been /// loaded, for which we will need to check for categories whenever a new /// module is loaded. SmallVector<ObjCInterfaceDecl *, 16> ObjCClassesLoaded; @@ -1114,34 +1114,34 @@ private: using KeyDeclsMap = llvm::DenseMap<Decl *, SmallVector<serialization::DeclID, 2>>; - /// \brief A mapping from canonical declarations to the set of global + /// A mapping from canonical declarations to the set of global /// declaration IDs for key declaration that have been merged with that /// canonical declaration. A key declaration is a formerly-canonical /// declaration whose module did not import any other key declaration for that /// entity. These are the IDs that we use as keys when finding redecl chains. KeyDeclsMap KeyDecls; - /// \brief A mapping from DeclContexts to the semantic DeclContext that we + /// A mapping from DeclContexts to the semantic DeclContext that we /// are treating as the definition of the entity. This is used, for instance, /// when merging implicit instantiations of class templates across modules. llvm::DenseMap<DeclContext *, DeclContext *> MergedDeclContexts; - /// \brief A mapping from canonical declarations of enums to their canonical + /// A mapping from canonical declarations of enums to their canonical /// definitions. Only populated when using modules in C++. llvm::DenseMap<EnumDecl *, EnumDecl *> EnumDefinitions; - /// \brief When reading a Stmt tree, Stmt operands are placed in this stack. + /// When reading a Stmt tree, Stmt operands are placed in this stack. SmallVector<Stmt *, 16> StmtStack; - /// \brief What kind of records we are reading. + /// What kind of records we are reading. enum ReadingKind { Read_None, Read_Decl, Read_Type, Read_Stmt }; - /// \brief What kind of records we are reading. + /// What kind of records we are reading. ReadingKind ReadingKind = Read_None; - /// \brief RAII object to change the reading kind. + /// RAII object to change the reading kind. class ReadingKindTracker { ASTReader &Reader; enum ReadingKind PrevKind; @@ -1157,7 +1157,7 @@ private: ~ReadingKindTracker() { Reader.ReadingKind = PrevKind; } }; - /// \brief RAII object to mark the start of processing updates. + /// RAII object to mark the start of processing updates. class ProcessingUpdatesRAIIObj { ASTReader &Reader; bool PrevState; @@ -1174,7 +1174,7 @@ private: ~ProcessingUpdatesRAIIObj() { Reader.ProcessingUpdateRecords = PrevState; } }; - /// \brief Suggested contents of the predefines buffer, after this + /// Suggested contents of the predefines buffer, after this /// PCH file has been processed. /// /// In most cases, this string will be empty, because the predefines @@ -1186,7 +1186,7 @@ private: llvm::DenseMap<const Decl *, bool> DefinitionSource; - /// \brief Reads a statement from the specified cursor. + /// Reads a statement from the specified cursor. Stmt *ReadStmtFromStream(ModuleFile &F); struct InputFileInfo { @@ -1198,10 +1198,10 @@ private: bool TopLevelModuleMap; }; - /// \brief Reads the stored information about an input file. + /// Reads the stored information about an input file. InputFileInfo readInputFileInfo(ModuleFile &F, unsigned ID); - /// \brief Retrieve the file entry and 'overridden' bit for an input + /// Retrieve the file entry and 'overridden' bit for an input /// file in the given module file. serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); @@ -1210,7 +1210,7 @@ public: void ResolveImportedPath(ModuleFile &M, std::string &Filename); static void ResolveImportedPath(std::string &Filename, StringRef Prefix); - /// \brief Returns the first key declaration for the given declaration. This + /// Returns the first key declaration for the given declaration. This /// is one that is formerly-canonical (or still canonical) and whose module /// did not import any other key declaration of the entity. Decl *getKeyDeclaration(Decl *D) { @@ -1227,7 +1227,7 @@ public: return getKeyDeclaration(const_cast<Decl*>(D)); } - /// \brief Run a callback on each imported key declaration of \p D. + /// Run a callback on each imported key declaration of \p D. template <typename Fn> void forEachImportedKeyDecl(const Decl *D, Fn Visit) { D = D->getCanonicalDecl(); @@ -1240,7 +1240,7 @@ public: Visit(GetExistingDecl(ID)); } - /// \brief Get the loaded lookup tables for \p Primary, if any. + /// Get the loaded lookup tables for \p Primary, if any. const serialization::reader::DeclContextLookupTable * getLoadedLookupTables(DeclContext *Primary) const; @@ -1330,7 +1330,7 @@ private: Decl *ReadDeclRecord(serialization::DeclID ID); void markIncompleteDeclChain(Decl *Canon); - /// \brief Returns the most recent declaration of a declaration (which must be + /// Returns the most recent declaration of a declaration (which must be /// of a redeclarable kind) that is either local or has already been loaded /// merged into its redecl chain. Decl *getMostRecentExistingDecl(Decl *D); @@ -1345,12 +1345,12 @@ private: RecordLocation getLocalBitOffset(uint64_t GlobalOffset); uint64_t getGlobalBitOffset(ModuleFile &M, uint32_t LocalOffset); - /// \brief Returns the first preprocessed entity ID that begins or ends after + /// Returns the first preprocessed entity ID that begins or ends after /// \arg Loc. serialization::PreprocessedEntityID findPreprocessedEntity(SourceLocation Loc, bool EndsAfter) const; - /// \brief Find the next module that contains entities and return the ID + /// Find the next module that contains entities and return the ID /// of the first entry. /// /// \param SLocMapI points at a chunk of a module that contains no @@ -1360,12 +1360,12 @@ private: findNextPreprocessedEntity( GlobalSLocOffsetMapType::const_iterator SLocMapI) const; - /// \brief Returns (ModuleFile, Local index) pair for \p GlobalIndex of a + /// Returns (ModuleFile, Local index) pair for \p GlobalIndex of a /// preprocessed entity. std::pair<ModuleFile *, unsigned> getModulePreprocessedEntity(unsigned GlobalIndex); - /// \brief Returns (begin, end) pair for the preprocessed entities of a + /// Returns (begin, end) pair for the preprocessed entities of a /// particular module. llvm::iterator_range<PreprocessingRecord::iterator> getModulePreprocessedEntities(ModuleFile &Mod) const; @@ -1418,7 +1418,7 @@ private: PendingDeclContextInfos.push_back(Info); } - /// \brief Produce an error diagnostic and return true. + /// Produce an error diagnostic and return true. /// /// This routine should only be used for fatal errors that have to /// do with non-routine failures (e.g., corrupted AST file). @@ -1427,7 +1427,7 @@ private: StringRef Arg2 = StringRef()) const; public: - /// \brief Load the AST file and validate its contents against the given + /// Load the AST file and validate its contents against the given /// Preprocessor. /// /// \param PP the preprocessor associated with the context in which this @@ -1482,34 +1482,34 @@ public: FileManager &getFileManager() const { return FileMgr; } DiagnosticsEngine &getDiags() const { return Diags; } - /// \brief Flags that indicate what kind of AST loading failures the client + /// Flags that indicate what kind of AST loading failures the client /// of the AST reader can directly handle. /// /// When a client states that it can handle a particular kind of failure, /// the AST reader will not emit errors when producing that kind of failure. enum LoadFailureCapabilities { - /// \brief The client can't handle any AST loading failures. + /// The client can't handle any AST loading failures. ARR_None = 0, - /// \brief The client can handle an AST file that cannot load because it + /// The client can handle an AST file that cannot load because it /// is missing. ARR_Missing = 0x1, - /// \brief The client can handle an AST file that cannot load because it + /// The client can handle an AST file that cannot load because it /// is out-of-date relative to its input files. ARR_OutOfDate = 0x2, - /// \brief The client can handle an AST file that cannot load because it + /// The client can handle an AST file that cannot load because it /// was built with a different version of Clang. ARR_VersionMismatch = 0x4, - /// \brief The client can handle an AST file that cannot load because it's + /// The client can handle an AST file that cannot load because it's /// compiled configuration doesn't match that of the context it was /// loaded into. ARR_ConfigurationMismatch = 0x8 }; - /// \brief Load the AST file designated by the given file name. + /// Load the AST file designated by the given file name. /// /// \param FileName The name of the AST file to load. /// @@ -1530,7 +1530,7 @@ public: unsigned ClientLoadCapabilities, SmallVectorImpl<ImportedSubmodule> *Imported = nullptr); - /// \brief Make the entities in the given module and any of its (non-explicit) + /// Make the entities in the given module and any of its (non-explicit) /// submodules visible to name lookup. /// /// \param Mod The module whose names should be made visible. @@ -1543,24 +1543,24 @@ public: Module::NameVisibilityKind NameVisibility, SourceLocation ImportLoc); - /// \brief Make the names within this set of hidden names visible. + /// Make the names within this set of hidden names visible. void makeNamesVisible(const HiddenNames &Names, Module *Owner); - /// \brief Note that MergedDef is a redefinition of the canonical definition + /// Note that MergedDef is a redefinition of the canonical definition /// Def, so Def should be visible whenever MergedDef is. void mergeDefinitionVisibility(NamedDecl *Def, NamedDecl *MergedDef); - /// \brief Take the AST callbacks listener. + /// Take the AST callbacks listener. std::unique_ptr<ASTReaderListener> takeListener() { return std::move(Listener); } - /// \brief Set the AST callbacks listener. + /// Set the AST callbacks listener. void setListener(std::unique_ptr<ASTReaderListener> Listener) { this->Listener = std::move(Listener); } - /// \brief Add an AST callback listener. + /// Add an AST callback listener. /// /// Takes ownership of \p L. void addListener(std::unique_ptr<ASTReaderListener> L) { @@ -1595,72 +1595,72 @@ public: } }; - /// \brief Set the AST deserialization listener. + /// Set the AST deserialization listener. void setDeserializationListener(ASTDeserializationListener *Listener, bool TakeOwnership = false); - /// \brief Get the AST deserialization listener. + /// Get the AST deserialization listener. ASTDeserializationListener *getDeserializationListener() { return DeserializationListener; } - /// \brief Determine whether this AST reader has a global index. + /// Determine whether this AST reader has a global index. bool hasGlobalIndex() const { return (bool)GlobalIndex; } - /// \brief Return global module index. + /// Return global module index. GlobalModuleIndex *getGlobalIndex() { return GlobalIndex.get(); } - /// \brief Reset reader for a reload try. + /// Reset reader for a reload try. void resetForReload() { TriedLoadingGlobalIndex = false; } - /// \brief Attempts to load the global index. + /// Attempts to load the global index. /// /// \returns true if loading the global index has failed for any reason. bool loadGlobalIndex(); - /// \brief Determine whether we tried to load the global index, but failed, + /// Determine whether we tried to load the global index, but failed, /// e.g., because it is out-of-date or does not exist. bool isGlobalIndexUnavailable() const; - /// \brief Initializes the ASTContext + /// Initializes the ASTContext void InitializeContext(); - /// \brief Update the state of Sema after loading some additional modules. + /// Update the state of Sema after loading some additional modules. void UpdateSema(); - /// \brief Add in-memory (virtual file) buffer. + /// Add in-memory (virtual file) buffer. void addInMemoryBuffer(StringRef &FileName, std::unique_ptr<llvm::MemoryBuffer> Buffer) { ModuleMgr.addInMemoryBuffer(FileName, std::move(Buffer)); } - /// \brief Finalizes the AST reader's state before writing an AST file to + /// Finalizes the AST reader's state before writing an AST file to /// disk. /// /// This operation may undo temporary state in the AST that should not be /// emitted. void finalizeForWriting(); - /// \brief Retrieve the module manager. + /// Retrieve the module manager. ModuleManager &getModuleManager() { return ModuleMgr; } - /// \brief Retrieve the preprocessor. + /// Retrieve the preprocessor. Preprocessor &getPreprocessor() const { return PP; } - /// \brief Retrieve the name of the original source file name for the primary + /// Retrieve the name of the original source file name for the primary /// module file. StringRef getOriginalSourceFile() { return ModuleMgr.getPrimaryModule().OriginalSourceFileName; } - /// \brief Retrieve the name of the original source file name directly from + /// Retrieve the name of the original source file name directly from /// the AST file, without actually loading the AST file. static std::string getOriginalSourceFile(const std::string &ASTFileName, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags); - /// \brief Read the control block for the named AST file. + /// Read the control block for the named AST file. /// /// \returns true if an error occurred, false otherwise. static bool @@ -1670,7 +1670,7 @@ public: ASTReaderListener &Listener, bool ValidateDiagnosticOptions); - /// \brief Determine whether the given AST file is acceptable to load into a + /// Determine whether the given AST file is acceptable to load into a /// translation unit with the given language and target options. static bool isAcceptableASTFile(StringRef Filename, FileManager &FileMgr, const PCHContainerReader &PCHContainerRdr, @@ -1679,71 +1679,71 @@ public: const PreprocessorOptions &PPOpts, StringRef ExistingModuleCachePath); - /// \brief Returns the suggested contents of the predefines buffer, + /// Returns the suggested contents of the predefines buffer, /// which contains a (typically-empty) subset of the predefines /// build prior to including the precompiled header. const std::string &getSuggestedPredefines() { return SuggestedPredefines; } - /// \brief Read a preallocated preprocessed entity from the external source. + /// Read a preallocated preprocessed entity from the external source. /// /// \returns null if an error occurred that prevented the preprocessed /// entity from being loaded. PreprocessedEntity *ReadPreprocessedEntity(unsigned Index) override; - /// \brief Returns a pair of [Begin, End) indices of preallocated + /// Returns a pair of [Begin, End) indices of preallocated /// preprocessed entities that \p Range encompasses. std::pair<unsigned, unsigned> findPreprocessedEntitiesInRange(SourceRange Range) override; - /// \brief Optionally returns true or false if the preallocated preprocessed + /// Optionally returns true or false if the preallocated preprocessed /// entity with index \p Index came from file \p FID. Optional<bool> isPreprocessedEntityInFileID(unsigned Index, FileID FID) override; - /// \brief Read a preallocated skipped range from the external source. + /// Read a preallocated skipped range from the external source. SourceRange ReadSkippedRange(unsigned Index) override; - /// \brief Read the header file information for the given file entry. + /// Read the header file information for the given file entry. HeaderFileInfo GetHeaderFileInfo(const FileEntry *FE) override; void ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag); - /// \brief Returns the number of source locations found in the chain. + /// Returns the number of source locations found in the chain. unsigned getTotalNumSLocs() const { return TotalNumSLocEntries; } - /// \brief Returns the number of identifiers found in the chain. + /// Returns the number of identifiers found in the chain. unsigned getTotalNumIdentifiers() const { return static_cast<unsigned>(IdentifiersLoaded.size()); } - /// \brief Returns the number of macros found in the chain. + /// Returns the number of macros found in the chain. unsigned getTotalNumMacros() const { return static_cast<unsigned>(MacrosLoaded.size()); } - /// \brief Returns the number of types found in the chain. + /// Returns the number of types found in the chain. unsigned getTotalNumTypes() const { return static_cast<unsigned>(TypesLoaded.size()); } - /// \brief Returns the number of declarations found in the chain. + /// Returns the number of declarations found in the chain. unsigned getTotalNumDecls() const { return static_cast<unsigned>(DeclsLoaded.size()); } - /// \brief Returns the number of submodules known. + /// Returns the number of submodules known. unsigned getTotalNumSubmodules() const { return static_cast<unsigned>(SubmodulesLoaded.size()); } - /// \brief Returns the number of selectors found in the chain. + /// Returns the number of selectors found in the chain. unsigned getTotalNumSelectors() const { return static_cast<unsigned>(SelectorsLoaded.size()); } - /// \brief Returns the number of preprocessed entities known to the AST + /// Returns the number of preprocessed entities known to the AST /// reader. unsigned getTotalNumPreprocessedEntities() const { unsigned Result = 0; @@ -1752,13 +1752,13 @@ public: return Result; } - /// \brief Reads a TemplateArgumentLocInfo appropriate for the + /// Reads a TemplateArgumentLocInfo appropriate for the /// given TemplateArgument kind. TemplateArgumentLocInfo GetTemplateArgumentLocInfo(ModuleFile &F, TemplateArgument::ArgKind Kind, const RecordData &Record, unsigned &Idx); - /// \brief Reads a TemplateArgumentLoc. + /// Reads a TemplateArgumentLoc. TemplateArgumentLoc ReadTemplateArgumentLoc(ModuleFile &F, const RecordData &Record, unsigned &Idx); @@ -1767,21 +1767,21 @@ public: ReadASTTemplateArgumentListInfo(ModuleFile &F, const RecordData &Record, unsigned &Index); - /// \brief Reads a declarator info from the given record. + /// Reads a declarator info from the given record. TypeSourceInfo *GetTypeSourceInfo(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Resolve a type ID into a type, potentially building a new + /// Resolve a type ID into a type, potentially building a new /// type. QualType GetType(serialization::TypeID ID); - /// \brief Resolve a local type ID within a given AST file into a type. + /// Resolve a local type ID within a given AST file into a type. QualType getLocalType(ModuleFile &F, unsigned LocalID); - /// \brief Map a local type ID within a given AST file into a global type ID. + /// Map a local type ID within a given AST file into a global type ID. serialization::TypeID getGlobalTypeID(ModuleFile &F, unsigned LocalID) const; - /// \brief Read a type from the current position in the given record, which + /// Read a type from the current position in the given record, which /// was read from the given AST file. QualType readType(ModuleFile &F, const RecordData &Record, unsigned &Idx) { if (Idx >= Record.size()) @@ -1790,40 +1790,40 @@ public: return getLocalType(F, Record[Idx++]); } - /// \brief Map from a local declaration ID within a given module to a + /// Map from a local declaration ID within a given module to a /// global declaration ID. serialization::DeclID getGlobalDeclID(ModuleFile &F, serialization::LocalDeclID LocalID) const; - /// \brief Returns true if global DeclID \p ID originated from module \p M. + /// Returns true if global DeclID \p ID originated from module \p M. bool isDeclIDFromModule(serialization::GlobalDeclID ID, ModuleFile &M) const; - /// \brief Retrieve the module file that owns the given declaration, or NULL + /// Retrieve the module file that owns the given declaration, or NULL /// if the declaration is not from a module file. ModuleFile *getOwningModuleFile(const Decl *D); - /// \brief Get the best name we know for the module that owns the given + /// Get the best name we know for the module that owns the given /// declaration, or an empty string if the declaration is not from a module. std::string getOwningModuleNameForDiagnostic(const Decl *D); - /// \brief Returns the source location for the decl \p ID. + /// Returns the source location for the decl \p ID. SourceLocation getSourceLocationForDeclID(serialization::GlobalDeclID ID); - /// \brief Resolve a declaration ID into a declaration, potentially + /// Resolve a declaration ID into a declaration, potentially /// building a new declaration. Decl *GetDecl(serialization::DeclID ID); Decl *GetExternalDecl(uint32_t ID) override; - /// \brief Resolve a declaration ID into a declaration. Return 0 if it's not + /// Resolve a declaration ID into a declaration. Return 0 if it's not /// been loaded yet. Decl *GetExistingDecl(serialization::DeclID ID); - /// \brief Reads a declaration with the given local ID in the given module. + /// Reads a declaration with the given local ID in the given module. Decl *GetLocalDecl(ModuleFile &F, uint32_t LocalID) { return GetDecl(getGlobalDeclID(F, LocalID)); } - /// \brief Reads a declaration with the given local ID in the given module. + /// Reads a declaration with the given local ID in the given module. /// /// \returns The requested declaration, casted to the given return type. template<typename T> @@ -1831,7 +1831,7 @@ public: return cast_or_null<T>(GetLocalDecl(F, LocalID)); } - /// \brief Map a global declaration ID into the declaration ID used to + /// Map a global declaration ID into the declaration ID used to /// refer to this declaration within the given module fule. /// /// \returns the global ID of the given declaration as known in the given @@ -1840,20 +1840,20 @@ public: mapGlobalIDToModuleFileGlobalID(ModuleFile &M, serialization::DeclID GlobalID); - /// \brief Reads a declaration ID from the given position in a record in the + /// Reads a declaration ID from the given position in a record in the /// given module. /// /// \returns The declaration ID read from the record, adjusted to a global ID. serialization::DeclID ReadDeclID(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Reads a declaration from the given position in a record in the + /// Reads a declaration from the given position in a record in the /// given module. Decl *ReadDecl(ModuleFile &F, const RecordData &R, unsigned &I) { return GetDecl(ReadDeclID(F, R, I)); } - /// \brief Reads a declaration from the given position in a record in the + /// Reads a declaration from the given position in a record in the /// given module. /// /// \returns The declaration read from this location, casted to the given @@ -1863,14 +1863,14 @@ public: return cast_or_null<T>(GetDecl(ReadDeclID(F, R, I))); } - /// \brief If any redeclarations of \p D have been imported since it was + /// If any redeclarations of \p D have been imported since it was /// last checked, this digs out those redeclarations and adds them to the /// redeclaration chain for \p D. void CompleteRedeclChain(const Decl *D) override; CXXBaseSpecifier *GetExternalCXXBaseSpecifiers(uint64_t Offset) override; - /// \brief Resolve the offset of a statement into a statement. + /// Resolve the offset of a statement into a statement. /// /// This operation will read a new statement from the external /// source each time it is called, and is meant to be used via a @@ -1882,13 +1882,13 @@ public: /// and then leave the cursor pointing into the block. static bool ReadBlockAbbrevs(llvm::BitstreamCursor &Cursor, unsigned BlockID); - /// \brief Finds all the visible declarations with a given name. + /// Finds all the visible declarations with a given name. /// The current implementation of this method just loads the entire /// lookup table as unmaterialized references. bool FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) override; - /// \brief Read all of the declarations lexically stored in a + /// Read all of the declarations lexically stored in a /// declaration context. /// /// \param DC The declaration context whose declarations will be @@ -1906,47 +1906,47 @@ public: llvm::function_ref<bool(Decl::Kind)> IsKindWeWant, SmallVectorImpl<Decl *> &Decls) override; - /// \brief Get the decls that are contained in a file in the Offset/Length + /// Get the decls that are contained in a file in the Offset/Length /// range. \p Length can be 0 to indicate a point at \p Offset instead of /// a range. void FindFileRegionDecls(FileID File, unsigned Offset, unsigned Length, SmallVectorImpl<Decl *> &Decls) override; - /// \brief Notify ASTReader that we started deserialization of + /// Notify ASTReader that we started deserialization of /// a decl or type so until FinishedDeserializing is called there may be /// decls that are initializing. Must be paired with FinishedDeserializing. void StartedDeserializing() override; - /// \brief Notify ASTReader that we finished the deserialization of + /// Notify ASTReader that we finished the deserialization of /// a decl or type. Must be paired with StartedDeserializing. void FinishedDeserializing() override; - /// \brief Function that will be invoked when we begin parsing a new + /// Function that will be invoked when we begin parsing a new /// translation unit involving this external AST source. /// /// This function will provide all of the external definitions to /// the ASTConsumer. void StartTranslationUnit(ASTConsumer *Consumer) override; - /// \brief Print some statistics about AST usage. + /// Print some statistics about AST usage. void PrintStats() override; - /// \brief Dump information about the AST reader to standard error. + /// Dump information about the AST reader to standard error. void dump(); /// Return the amount of memory used by memory buffers, breaking down /// by heap-backed versus mmap'ed memory. void getMemoryBufferSizes(MemoryBufferSizes &sizes) const override; - /// \brief Initialize the semantic source with the Sema instance + /// Initialize the semantic source with the Sema instance /// being used to perform semantic analysis on the abstract syntax /// tree. void InitializeSema(Sema &S) override; - /// \brief Inform the semantic consumer that Sema is no longer available. + /// Inform the semantic consumer that Sema is no longer available. void ForgetSema() override { SemaObj = nullptr; } - /// \brief Retrieve the IdentifierInfo for the named identifier. + /// Retrieve the IdentifierInfo for the named identifier. /// /// This routine builds a new IdentifierInfo for the given identifier. If any /// declarations with this name are visible from translation unit scope, their @@ -1954,11 +1954,11 @@ public: /// chain of the identifier. IdentifierInfo *get(StringRef Name) override; - /// \brief Retrieve an iterator into the set of all identifiers + /// Retrieve an iterator into the set of all identifiers /// in all loaded AST files. IdentifierIterator *getIdentifiers() override; - /// \brief Load the contents of the global method pool for a given + /// Load the contents of the global method pool for a given /// selector. void ReadMethodPool(Selector Sel) override; @@ -1966,7 +1966,7 @@ public: /// selector if necessary. void updateOutOfDateSelector(Selector Sel) override; - /// \brief Load the set of namespaces that are known to the external source, + /// Load the set of namespaces that are known to the external source, /// which will be used during typo correction. void ReadKnownNamespaces( SmallVectorImpl<NamespaceDecl *> &Namespaces) override; @@ -2008,7 +2008,7 @@ public: llvm::MapVector<const FunctionDecl *, std::unique_ptr<LateParsedTemplate>> &LPTMap) override; - /// \brief Load a selector from disk, registering its ID if it exists. + /// Load a selector from disk, registering its ID if it exists. void LoadSelector(Selector Sel); void SetIdentifierInfo(unsigned ID, IdentifierInfo *II); @@ -2016,10 +2016,10 @@ public: const SmallVectorImpl<uint32_t> &DeclIDs, SmallVectorImpl<Decl *> *Decls = nullptr); - /// \brief Report a diagnostic. + /// Report a diagnostic. DiagnosticBuilder Diag(unsigned DiagID) const; - /// \brief Report a diagnostic. + /// Report a diagnostic. DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID) const; IdentifierInfo *DecodeIdentifierInfo(serialization::IdentifierID ID); @@ -2043,47 +2043,47 @@ public: void resolvePendingMacro(IdentifierInfo *II, const PendingMacroInfo &PMInfo); - /// \brief Retrieve the macro with the given ID. + /// Retrieve the macro with the given ID. MacroInfo *getMacro(serialization::MacroID ID); - /// \brief Retrieve the global macro ID corresponding to the given local + /// Retrieve the global macro ID corresponding to the given local /// ID within the given module file. serialization::MacroID getGlobalMacroID(ModuleFile &M, unsigned LocalID); - /// \brief Read the source location entry with index ID. + /// Read the source location entry with index ID. bool ReadSLocEntry(int ID) override; - /// \brief Retrieve the module import location and module name for the + /// Retrieve the module import location and module name for the /// given source manager entry ID. std::pair<SourceLocation, StringRef> getModuleImportLoc(int ID) override; - /// \brief Retrieve the global submodule ID given a module and its local ID + /// Retrieve the global submodule ID given a module and its local ID /// number. serialization::SubmoduleID getGlobalSubmoduleID(ModuleFile &M, unsigned LocalID); - /// \brief Retrieve the submodule that corresponds to a global submodule ID. + /// Retrieve the submodule that corresponds to a global submodule ID. /// Module *getSubmodule(serialization::SubmoduleID GlobalID); - /// \brief Retrieve the module that corresponds to the given module ID. + /// Retrieve the module that corresponds to the given module ID. /// /// Note: overrides method in ExternalASTSource Module *getModule(unsigned ID) override; - /// \brief Retrieve the module file with a given local ID within the specified + /// Retrieve the module file with a given local ID within the specified /// ModuleFile. ModuleFile *getLocalModuleFile(ModuleFile &M, unsigned ID); - /// \brief Get an ID for the given module file. + /// Get an ID for the given module file. unsigned getModuleFileID(ModuleFile *M); - /// \brief Return a descriptor for the corresponding module. + /// Return a descriptor for the corresponding module. llvm::Optional<ASTSourceDescriptor> getSourceDescriptor(unsigned ID) override; ExtKind hasExternalDefinitions(const Decl *D) override; - /// \brief Retrieve a selector from the given module with its local ID + /// Retrieve a selector from the given module with its local ID /// number. Selector getLocalSelector(ModuleFile &M, unsigned LocalID); @@ -2096,12 +2096,12 @@ public: return getLocalSelector(M, Record[Idx++]); } - /// \brief Retrieve the global selector ID that corresponds to this + /// Retrieve the global selector ID that corresponds to this /// the local selector ID in a given module. serialization::SelectorID getGlobalSelectorID(ModuleFile &F, unsigned LocalID) const; - /// \brief Read a declaration name. + /// Read a declaration name. DeclarationName ReadDeclarationName(ModuleFile &F, const RecordData &Record, unsigned &Idx); void ReadDeclarationNameLoc(ModuleFile &F, @@ -2121,54 +2121,54 @@ public: const RecordData &Record, unsigned &Idx); - /// \brief Read a template name. + /// Read a template name. TemplateName ReadTemplateName(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Read a template argument. + /// Read a template argument. TemplateArgument ReadTemplateArgument(ModuleFile &F, const RecordData &Record, unsigned &Idx, bool Canonicalize = false); - /// \brief Read a template parameter list. + /// Read a template parameter list. TemplateParameterList *ReadTemplateParameterList(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Read a template argument array. + /// Read a template argument array. void ReadTemplateArgumentList(SmallVectorImpl<TemplateArgument> &TemplArgs, ModuleFile &F, const RecordData &Record, unsigned &Idx, bool Canonicalize = false); - /// \brief Read a UnresolvedSet structure. + /// Read a UnresolvedSet structure. void ReadUnresolvedSet(ModuleFile &F, LazyASTUnresolvedSet &Set, const RecordData &Record, unsigned &Idx); - /// \brief Read a C++ base specifier. + /// Read a C++ base specifier. CXXBaseSpecifier ReadCXXBaseSpecifier(ModuleFile &F, const RecordData &Record,unsigned &Idx); - /// \brief Read a CXXCtorInitializer array. + /// Read a CXXCtorInitializer array. CXXCtorInitializer ** ReadCXXCtorInitializers(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Read the contents of a CXXCtorInitializer array. + /// Read the contents of a CXXCtorInitializer array. CXXCtorInitializer **GetExternalCXXCtorInitializers(uint64_t Offset) override; - /// \brief Read a source location from raw form and return it in its + /// Read a source location from raw form and return it in its /// originating module file's source location space. SourceLocation ReadUntranslatedSourceLocation(uint32_t Raw) const { return SourceLocation::getFromRawEncoding((Raw >> 1) | (Raw << 31)); } - /// \brief Read a source location from raw form. + /// Read a source location from raw form. SourceLocation ReadSourceLocation(ModuleFile &ModuleFile, uint32_t Raw) const { SourceLocation Loc = ReadUntranslatedSourceLocation(Raw); return TranslateSourceLocation(ModuleFile, Loc); } - /// \brief Translate a source location from another module file's source + /// Translate a source location from another module file's source /// location space into ours. SourceLocation TranslateSourceLocation(ModuleFile &ModuleFile, SourceLocation Loc) const { @@ -2181,59 +2181,59 @@ public: return Loc.getLocWithOffset(Remap); } - /// \brief Read a source location. + /// Read a source location. SourceLocation ReadSourceLocation(ModuleFile &ModuleFile, const RecordDataImpl &Record, unsigned &Idx) { return ReadSourceLocation(ModuleFile, Record[Idx++]); } - /// \brief Read a source range. + /// Read a source range. SourceRange ReadSourceRange(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Read an integral value + /// Read an integral value llvm::APInt ReadAPInt(const RecordData &Record, unsigned &Idx); - /// \brief Read a signed integral value + /// Read a signed integral value llvm::APSInt ReadAPSInt(const RecordData &Record, unsigned &Idx); - /// \brief Read a floating-point value + /// Read a floating-point value llvm::APFloat ReadAPFloat(const RecordData &Record, const llvm::fltSemantics &Sem, unsigned &Idx); - // \brief Read a string + // Read a string static std::string ReadString(const RecordData &Record, unsigned &Idx); - // \brief Skip a string + // Skip a string static void SkipString(const RecordData &Record, unsigned &Idx) { Idx += Record[Idx] + 1; } - // \brief Read a path + // Read a path std::string ReadPath(ModuleFile &F, const RecordData &Record, unsigned &Idx); - // \brief Skip a path + // Skip a path static void SkipPath(const RecordData &Record, unsigned &Idx) { SkipString(Record, Idx); } - /// \brief Read a version tuple. + /// Read a version tuple. static VersionTuple ReadVersionTuple(const RecordData &Record, unsigned &Idx); CXXTemporary *ReadCXXTemporary(ModuleFile &F, const RecordData &Record, unsigned &Idx); - /// \brief Reads attributes from the current stream position. + /// Reads attributes from the current stream position. void ReadAttributes(ASTRecordReader &Record, AttrVec &Attrs); - /// \brief Reads a statement. + /// Reads a statement. Stmt *ReadStmt(ModuleFile &F); - /// \brief Reads an expression. + /// Reads an expression. Expr *ReadExpr(ModuleFile &F); - /// \brief Reads a sub-statement operand during statement reading. + /// Reads a sub-statement operand during statement reading. Stmt *ReadSubStmt() { assert(ReadingKind == Read_Stmt && "Should be called only during statement reading!"); @@ -2243,21 +2243,21 @@ public: return StmtStack.pop_back_val(); } - /// \brief Reads a sub-expression operand during statement reading. + /// Reads a sub-expression operand during statement reading. Expr *ReadSubExpr(); - /// \brief Reads a token out of a record. + /// Reads a token out of a record. Token ReadToken(ModuleFile &M, const RecordDataImpl &Record, unsigned &Idx); - /// \brief Reads the macro record located at the given offset. + /// Reads the macro record located at the given offset. MacroInfo *ReadMacroRecord(ModuleFile &F, uint64_t Offset); - /// \brief Determine the global preprocessed entity ID that corresponds to + /// Determine the global preprocessed entity ID that corresponds to /// the given local ID within the given module. serialization::PreprocessedEntityID getGlobalPreprocessedEntityID(ModuleFile &M, unsigned LocalID) const; - /// \brief Add a macro to deserialize its macro directive history. + /// Add a macro to deserialize its macro directive history. /// /// \param II The name of the macro. /// \param M The module file. @@ -2266,56 +2266,56 @@ public: void addPendingMacro(IdentifierInfo *II, ModuleFile *M, uint64_t MacroDirectivesOffset); - /// \brief Read the set of macros defined by this external macro source. + /// Read the set of macros defined by this external macro source. void ReadDefinedMacros() override; - /// \brief Update an out-of-date identifier. + /// Update an out-of-date identifier. void updateOutOfDateIdentifier(IdentifierInfo &II) override; - /// \brief Note that this identifier is up-to-date. + /// Note that this identifier is up-to-date. void markIdentifierUpToDate(IdentifierInfo *II); - /// \brief Load all external visible decls in the given DeclContext. + /// Load all external visible decls in the given DeclContext. void completeVisibleDeclsMap(const DeclContext *DC) override; - /// \brief Retrieve the AST context that this AST reader supplements. + /// Retrieve the AST context that this AST reader supplements. ASTContext &getContext() { assert(ContextObj && "requested AST context when not loading AST"); return *ContextObj; } - // \brief Contains the IDs for declarations that were requested before we have + // Contains the IDs for declarations that were requested before we have // access to a Sema object. SmallVector<uint64_t, 16> PreloadedDeclIDs; - /// \brief Retrieve the semantic analysis object used to analyze the + /// Retrieve the semantic analysis object used to analyze the /// translation unit in which the precompiled header is being /// imported. Sema *getSema() { return SemaObj; } - /// \brief Get the identifier resolver used for name lookup / updates + /// Get the identifier resolver used for name lookup / updates /// in the translation unit scope. We have one of these even if we don't /// have a Sema object. IdentifierResolver &getIdResolver(); - /// \brief Retrieve the identifier table associated with the + /// Retrieve the identifier table associated with the /// preprocessor. IdentifierTable &getIdentifierTable(); - /// \brief Record that the given ID maps to the given switch-case + /// Record that the given ID maps to the given switch-case /// statement. void RecordSwitchCaseID(SwitchCase *SC, unsigned ID); - /// \brief Retrieve the switch-case statement with the given ID. + /// Retrieve the switch-case statement with the given ID. SwitchCase *getSwitchCaseWithID(unsigned ID); void ClearSwitchCaseIDs(); - /// \brief Cursors for comments blocks. + /// Cursors for comments blocks. SmallVector<std::pair<llvm::BitstreamCursor, serialization::ModuleFile *>, 8> CommentsCursors; - /// \brief Loads comments ranges. + /// Loads comments ranges. void ReadComments() override; /// Visit all the input files of the given module file. @@ -2333,7 +2333,7 @@ public: bool isProcessingUpdateRecords() { return ProcessingUpdateRecords; } }; -/// \brief An object for streaming information from a record. +/// An object for streaming information from a record. class ASTRecordReader { using ModuleFile = serialization::ModuleFile; @@ -2349,56 +2349,56 @@ public: /// Construct an ASTRecordReader that uses the default encoding scheme. ASTRecordReader(ASTReader &Reader, ModuleFile &F) : Reader(&Reader), F(&F) {} - /// \brief Reads a record with id AbbrevID from Cursor, resetting the + /// Reads a record with id AbbrevID from Cursor, resetting the /// internal state. unsigned readRecord(llvm::BitstreamCursor &Cursor, unsigned AbbrevID); - /// \brief Is this a module file for a module (rather than a PCH or similar). + /// Is this a module file for a module (rather than a PCH or similar). bool isModule() const { return F->isModule(); } - /// \brief Retrieve the AST context that this AST reader supplements. + /// Retrieve the AST context that this AST reader supplements. ASTContext &getContext() { return Reader->getContext(); } - /// \brief The current position in this record. + /// The current position in this record. unsigned getIdx() const { return Idx; } - /// \brief The length of this record. + /// The length of this record. size_t size() const { return Record.size(); } - /// \brief An arbitrary index in this record. + /// An arbitrary index in this record. const uint64_t &operator[](size_t N) { return Record[N]; } - /// \brief The last element in this record. + /// The last element in this record. const uint64_t &back() const { return Record.back(); } - /// \brief Returns the current value in this record, and advances to the + /// Returns the current value in this record, and advances to the /// next value. const uint64_t &readInt() { return Record[Idx++]; } - /// \brief Returns the current value in this record, without advancing. + /// Returns the current value in this record, without advancing. const uint64_t &peekInt() { return Record[Idx]; } - /// \brief Skips the specified number of values. + /// Skips the specified number of values. void skipInts(unsigned N) { Idx += N; } - /// \brief Retrieve the global submodule ID its local ID number. + /// Retrieve the global submodule ID its local ID number. serialization::SubmoduleID getGlobalSubmoduleID(unsigned LocalID) { return Reader->getGlobalSubmoduleID(*F, LocalID); } - /// \brief Retrieve the submodule that corresponds to a global submodule ID. + /// Retrieve the submodule that corresponds to a global submodule ID. Module *getSubmodule(serialization::SubmoduleID GlobalID) { return Reader->getSubmodule(GlobalID); } - /// \brief Read the record that describes the lexical contents of a DC. + /// Read the record that describes the lexical contents of a DC. bool readLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC) { return Reader->ReadLexicalDeclContextStorage(*F, F->DeclsCursor, Offset, DC); } - /// \brief Read the record that describes the visible contents of a DC. + /// Read the record that describes the visible contents of a DC. bool readVisibleDeclContextStorage(uint64_t Offset, serialization::DeclID ID) { return Reader->ReadVisibleDeclContextStorage(*F, F->DeclsCursor, Offset, @@ -2410,24 +2410,24 @@ public: return Reader->readExceptionSpec(*F, ExceptionStorage, ESI, Record, Idx); } - /// \brief Get the global offset corresponding to a local offset. + /// Get the global offset corresponding to a local offset. uint64_t getGlobalBitOffset(uint32_t LocalOffset) { return Reader->getGlobalBitOffset(*F, LocalOffset); } - /// \brief Reads a statement. + /// Reads a statement. Stmt *readStmt() { return Reader->ReadStmt(*F); } - /// \brief Reads an expression. + /// Reads an expression. Expr *readExpr() { return Reader->ReadExpr(*F); } - /// \brief Reads a sub-statement operand during statement reading. + /// Reads a sub-statement operand during statement reading. Stmt *readSubStmt() { return Reader->ReadSubStmt(); } - /// \brief Reads a sub-expression operand during statement reading. + /// Reads a sub-expression operand during statement reading. Expr *readSubExpr() { return Reader->ReadSubExpr(); } - /// \brief Reads a declaration with the given local ID in the given module. + /// Reads a declaration with the given local ID in the given module. /// /// \returns The requested declaration, casted to the given return type. template<typename T> @@ -2435,14 +2435,14 @@ public: return cast_or_null<T>(Reader->GetLocalDecl(*F, LocalID)); } - /// \brief Reads a TemplateArgumentLocInfo appropriate for the + /// Reads a TemplateArgumentLocInfo appropriate for the /// given TemplateArgument kind, advancing Idx. TemplateArgumentLocInfo getTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind) { return Reader->GetTemplateArgumentLocInfo(*F, Kind, Record, Idx); } - /// \brief Reads a TemplateArgumentLoc, advancing Idx. + /// Reads a TemplateArgumentLoc, advancing Idx. TemplateArgumentLoc readTemplateArgumentLoc() { return Reader->ReadTemplateArgumentLoc(*F, Record, Idx); @@ -2453,35 +2453,35 @@ public: return Reader->ReadASTTemplateArgumentListInfo(*F, Record, Idx); } - /// \brief Reads a declarator info from the given record, advancing Idx. + /// Reads a declarator info from the given record, advancing Idx. TypeSourceInfo *getTypeSourceInfo() { return Reader->GetTypeSourceInfo(*F, Record, Idx); } - /// \brief Map a local type ID within a given AST file to a global type ID. + /// Map a local type ID within a given AST file to a global type ID. serialization::TypeID getGlobalTypeID(unsigned LocalID) const { return Reader->getGlobalTypeID(*F, LocalID); } - /// \brief Read a type from the current position in the record. + /// Read a type from the current position in the record. QualType readType() { return Reader->readType(*F, Record, Idx); } - /// \brief Reads a declaration ID from the given position in this record. + /// Reads a declaration ID from the given position in this record. /// /// \returns The declaration ID read from the record, adjusted to a global ID. serialization::DeclID readDeclID() { return Reader->ReadDeclID(*F, Record, Idx); } - /// \brief Reads a declaration from the given position in a record in the + /// Reads a declaration from the given position in a record in the /// given module, advancing Idx. Decl *readDecl() { return Reader->ReadDecl(*F, Record, Idx); } - /// \brief Reads a declaration from the given position in the record, + /// Reads a declaration from the given position in the record, /// advancing Idx. /// /// \returns The declaration read from this location, casted to the given @@ -2495,12 +2495,12 @@ public: return Reader->GetIdentifierInfo(*F, Record, Idx); } - /// \brief Read a selector from the Record, advancing Idx. + /// Read a selector from the Record, advancing Idx. Selector readSelector() { return Reader->ReadSelector(*F, Record, Idx); } - /// \brief Read a declaration name, advancing Idx. + /// Read a declaration name, advancing Idx. DeclarationName readDeclarationName() { return Reader->ReadDeclarationName(*F, Record, Idx); } @@ -2523,39 +2523,39 @@ public: return Reader->ReadNestedNameSpecifierLoc(*F, Record, Idx); } - /// \brief Read a template name, advancing Idx. + /// Read a template name, advancing Idx. TemplateName readTemplateName() { return Reader->ReadTemplateName(*F, Record, Idx); } - /// \brief Read a template argument, advancing Idx. + /// Read a template argument, advancing Idx. TemplateArgument readTemplateArgument(bool Canonicalize = false) { return Reader->ReadTemplateArgument(*F, Record, Idx, Canonicalize); } - /// \brief Read a template parameter list, advancing Idx. + /// Read a template parameter list, advancing Idx. TemplateParameterList *readTemplateParameterList() { return Reader->ReadTemplateParameterList(*F, Record, Idx); } - /// \brief Read a template argument array, advancing Idx. + /// Read a template argument array, advancing Idx. void readTemplateArgumentList(SmallVectorImpl<TemplateArgument> &TemplArgs, bool Canonicalize = false) { return Reader->ReadTemplateArgumentList(TemplArgs, *F, Record, Idx, Canonicalize); } - /// \brief Read a UnresolvedSet structure, advancing Idx. + /// Read a UnresolvedSet structure, advancing Idx. void readUnresolvedSet(LazyASTUnresolvedSet &Set) { return Reader->ReadUnresolvedSet(*F, Set, Record, Idx); } - /// \brief Read a C++ base specifier, advancing Idx. + /// Read a C++ base specifier, advancing Idx. CXXBaseSpecifier readCXXBaseSpecifier() { return Reader->ReadCXXBaseSpecifier(*F, Record, Idx); } - /// \brief Read a CXXCtorInitializer array, advancing Idx. + /// Read a CXXCtorInitializer array, advancing Idx. CXXCtorInitializer **readCXXCtorInitializers() { return Reader->ReadCXXCtorInitializers(*F, Record, Idx); } @@ -2564,52 +2564,52 @@ public: return Reader->ReadCXXTemporary(*F, Record, Idx); } - /// \brief Read a source location, advancing Idx. + /// Read a source location, advancing Idx. SourceLocation readSourceLocation() { return Reader->ReadSourceLocation(*F, Record, Idx); } - /// \brief Read a source range, advancing Idx. + /// Read a source range, advancing Idx. SourceRange readSourceRange() { return Reader->ReadSourceRange(*F, Record, Idx); } - /// \brief Read an integral value, advancing Idx. + /// Read an integral value, advancing Idx. llvm::APInt readAPInt() { return Reader->ReadAPInt(Record, Idx); } - /// \brief Read a signed integral value, advancing Idx. + /// Read a signed integral value, advancing Idx. llvm::APSInt readAPSInt() { return Reader->ReadAPSInt(Record, Idx); } - /// \brief Read a floating-point value, advancing Idx. + /// Read a floating-point value, advancing Idx. llvm::APFloat readAPFloat(const llvm::fltSemantics &Sem) { return Reader->ReadAPFloat(Record, Sem,Idx); } - /// \brief Read a string, advancing Idx. + /// Read a string, advancing Idx. std::string readString() { return Reader->ReadString(Record, Idx); } - /// \brief Read a path, advancing Idx. + /// Read a path, advancing Idx. std::string readPath() { return Reader->ReadPath(*F, Record, Idx); } - /// \brief Read a version tuple, advancing Idx. + /// Read a version tuple, advancing Idx. VersionTuple readVersionTuple() { return ASTReader::ReadVersionTuple(Record, Idx); } - /// \brief Reads attributes from the current stream position, advancing Idx. + /// Reads attributes from the current stream position, advancing Idx. void readAttributes(AttrVec &Attrs) { return Reader->ReadAttributes(*this, Attrs); } - /// \brief Reads a token out of a record, advancing Idx. + /// Reads a token out of a record, advancing Idx. Token readToken() { return Reader->ReadToken(*F, Record, Idx); } @@ -2618,13 +2618,13 @@ public: Reader->RecordSwitchCaseID(SC, ID); } - /// \brief Retrieve the switch-case statement with the given ID. + /// Retrieve the switch-case statement with the given ID. SwitchCase *getSwitchCaseWithID(unsigned ID) { return Reader->getSwitchCaseWithID(ID); } }; -/// \brief Helper class that saves the current stream position and +/// Helper class that saves the current stream position and /// then restores it when destroyed. struct SavedStreamPosition { explicit SavedStreamPosition(llvm::BitstreamCursor &Cursor) diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 9437bf7f2c..9d4a3f9cf5 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -95,7 +95,7 @@ class Token; class TypeSourceInfo; class VersionTuple; -/// \brief Writes an AST file containing the contents of a translation unit. +/// Writes an AST file containing the contents of a translation unit. /// /// The ASTWriter class produces a bitstream containing the serialized /// representation of a given abstract syntax tree and its supporting @@ -114,7 +114,7 @@ public: using RecordDataRef = ArrayRef<uint64_t>; private: - /// \brief Map that provides the ID numbers of each type within the + /// Map that provides the ID numbers of each type within the /// output stream, plus those deserialized from a chained PCH. /// /// The ID numbers of types are consecutive (in order of discovery) @@ -126,52 +126,52 @@ private: using TypeIdxMap = llvm::DenseMap<QualType, serialization::TypeIdx, serialization::UnsafeQualTypeDenseMapInfo>; - /// \brief The bitstream writer used to emit this precompiled header. + /// The bitstream writer used to emit this precompiled header. llvm::BitstreamWriter &Stream; /// The buffer associated with the bitstream. const SmallVectorImpl<char> &Buffer; - /// \brief The PCM manager which manages memory buffers for pcm files. + /// The PCM manager which manages memory buffers for pcm files. MemoryBufferCache &PCMCache; - /// \brief The ASTContext we're writing. + /// The ASTContext we're writing. ASTContext *Context = nullptr; - /// \brief The preprocessor we're writing. + /// The preprocessor we're writing. Preprocessor *PP = nullptr; - /// \brief The reader of existing AST files, if we're chaining. + /// The reader of existing AST files, if we're chaining. ASTReader *Chain = nullptr; - /// \brief The module we're currently writing, if any. + /// The module we're currently writing, if any. Module *WritingModule = nullptr; - /// \brief The base directory for any relative paths we emit. + /// The base directory for any relative paths we emit. std::string BaseDirectory; - /// \brief Indicates whether timestamps should be written to the produced + /// Indicates whether timestamps should be written to the produced /// module file. This is the case for files implicitly written to the /// module cache, where we need the timestamps to determine if the module /// file is up to date, but not otherwise. bool IncludeTimestamps; - /// \brief Indicates when the AST writing is actively performing + /// Indicates when the AST writing is actively performing /// serialization, rather than just queueing updates. bool WritingAST = false; - /// \brief Indicates that we are done serializing the collection of decls + /// Indicates that we are done serializing the collection of decls /// and types to emit. bool DoneWritingDeclsAndTypes = false; - /// \brief Indicates that the AST contained compiler errors. + /// Indicates that the AST contained compiler errors. bool ASTHasCompilerErrors = false; - /// \brief Mapping from input file entries to the index into the + /// Mapping from input file entries to the index into the /// offset table where information about that input file is stored. llvm::DenseMap<const FileEntry *, uint32_t> InputFileIDs; - /// \brief Stores a declaration or a type to be written to the AST file. + /// Stores a declaration or a type to be written to the AST file. class DeclOrType { public: DeclOrType(Decl *D) : Stored(D), IsType(false) {} @@ -195,16 +195,16 @@ private: bool IsType; }; - /// \brief The declarations and types to emit. + /// The declarations and types to emit. std::queue<DeclOrType> DeclTypesToEmit; - /// \brief The first ID number we can use for our own declarations. + /// The first ID number we can use for our own declarations. serialization::DeclID FirstDeclID = serialization::NUM_PREDEF_DECL_IDS; - /// \brief The decl ID that will be assigned to the next new decl. + /// The decl ID that will be assigned to the next new decl. serialization::DeclID NextDeclID = FirstDeclID; - /// \brief Map that provides the ID numbers of each declaration within + /// Map that provides the ID numbers of each declaration within /// the output stream, as well as those deserialized from a chained PCH. /// /// The ID numbers of declarations are consecutive (in order of @@ -212,35 +212,35 @@ private: /// unit, while 0 is reserved for NULL. llvm::DenseMap<const Decl *, serialization::DeclID> DeclIDs; - /// \brief Offset of each declaration in the bitstream, indexed by + /// Offset of each declaration in the bitstream, indexed by /// the declaration's ID. std::vector<serialization::DeclOffset> DeclOffsets; - /// \brief Sorted (by file offset) vector of pairs of file offset/DeclID. + /// Sorted (by file offset) vector of pairs of file offset/DeclID. using LocDeclIDsTy = SmallVector<std::pair<unsigned, serialization::DeclID>, 64>; struct DeclIDInFileInfo { LocDeclIDsTy DeclIDs; - /// \brief Set when the DeclIDs vectors from all files are joined, this + /// Set when the DeclIDs vectors from all files are joined, this /// indicates the index that this particular vector has in the global one. unsigned FirstDeclIndex; }; using FileDeclIDsTy = llvm::DenseMap<FileID, DeclIDInFileInfo *>; - /// \brief Map from file SLocEntries to info about the file-level declarations + /// Map from file SLocEntries to info about the file-level declarations /// that it contains. FileDeclIDsTy FileDeclIDs; void associateDeclWithFile(const Decl *D, serialization::DeclID); - /// \brief The first ID number we can use for our own types. + /// The first ID number we can use for our own types. serialization::TypeID FirstTypeID = serialization::NUM_PREDEF_TYPE_IDS; - /// \brief The type ID that will be assigned to the next new type. + /// The type ID that will be assigned to the next new type. serialization::TypeID NextTypeID = FirstTypeID; - /// \brief Map that provides the ID numbers of each type within the + /// Map that provides the ID numbers of each type within the /// output stream, plus those deserialized from a chained PCH. /// /// The ID numbers of types are consecutive (in order of discovery) @@ -251,17 +251,17 @@ private: /// Keys in the map never have const/volatile qualifiers. TypeIdxMap TypeIdxs; - /// \brief Offset of each type in the bitstream, indexed by + /// Offset of each type in the bitstream, indexed by /// the type's ID. std::vector<uint32_t> TypeOffsets; - /// \brief The first ID number we can use for our own identifiers. + /// The first ID number we can use for our own identifiers. serialization::IdentID FirstIdentID = serialization::NUM_PREDEF_IDENT_IDS; - /// \brief The identifier ID that will be assigned to the next new identifier. + /// The identifier ID that will be assigned to the next new identifier. serialization::IdentID NextIdentID = FirstIdentID; - /// \brief Map that provides the ID numbers of each identifier in + /// Map that provides the ID numbers of each identifier in /// the output stream. /// /// The ID numbers for identifiers are consecutive (in order of @@ -269,13 +269,13 @@ private: /// IdentifierInfo. llvm::MapVector<const IdentifierInfo *, serialization::IdentID> IdentifierIDs; - /// \brief The first ID number we can use for our own macros. + /// The first ID number we can use for our own macros. serialization::MacroID FirstMacroID = serialization::NUM_PREDEF_MACRO_IDS; - /// \brief The identifier ID that will be assigned to the next new identifier. + /// The identifier ID that will be assigned to the next new identifier. serialization::MacroID NextMacroID = FirstMacroID; - /// \brief Map that provides the ID numbers of each macro. + /// Map that provides the ID numbers of each macro. llvm::DenseMap<MacroInfo *, serialization::MacroID> MacroIDs; struct MacroInfoToEmitData { @@ -284,7 +284,7 @@ private: serialization::MacroID ID; }; - /// \brief The macro infos to emit. + /// The macro infos to emit. std::vector<MacroInfoToEmitData> MacroInfosToEmit; llvm::DenseMap<const IdentifierInfo *, uint64_t> IdentMacroDirectivesOffsetMap; @@ -292,46 +292,46 @@ private: /// @name FlushStmt Caches /// @{ - /// \brief Set of parent Stmts for the currently serializing sub-stmt. + /// Set of parent Stmts for the currently serializing sub-stmt. llvm::DenseSet<Stmt *> ParentStmts; - /// \brief Offsets of sub-stmts already serialized. The offset points + /// Offsets of sub-stmts already serialized. The offset points /// just after the stmt record. llvm::DenseMap<Stmt *, uint64_t> SubStmtEntries; /// @} - /// \brief Offsets of each of the identifier IDs into the identifier + /// Offsets of each of the identifier IDs into the identifier /// table. std::vector<uint32_t> IdentifierOffsets; - /// \brief The first ID number we can use for our own submodules. + /// The first ID number we can use for our own submodules. serialization::SubmoduleID FirstSubmoduleID = serialization::NUM_PREDEF_SUBMODULE_IDS; - /// \brief The submodule ID that will be assigned to the next new submodule. + /// The submodule ID that will be assigned to the next new submodule. serialization::SubmoduleID NextSubmoduleID = FirstSubmoduleID; - /// \brief The first ID number we can use for our own selectors. + /// The first ID number we can use for our own selectors. serialization::SelectorID FirstSelectorID = serialization::NUM_PREDEF_SELECTOR_IDS; - /// \brief The selector ID that will be assigned to the next new selector. + /// The selector ID that will be assigned to the next new selector. serialization::SelectorID NextSelectorID = FirstSelectorID; - /// \brief Map that provides the ID numbers of each Selector. + /// Map that provides the ID numbers of each Selector. llvm::MapVector<Selector, serialization::SelectorID> SelectorIDs; - /// \brief Offset of each selector within the method pool/selector + /// Offset of each selector within the method pool/selector /// table, indexed by the Selector ID (-1). std::vector<uint32_t> SelectorOffsets; - /// \brief Mapping from macro definitions (as they occur in the preprocessing + /// Mapping from macro definitions (as they occur in the preprocessing /// record) to the macro IDs. llvm::DenseMap<const MacroDefinitionRecord *, serialization::PreprocessedEntityID> MacroDefinitions; - /// \brief Cache of indices of anonymous declarations within their lexical + /// Cache of indices of anonymous declarations within their lexical /// contexts. llvm::DenseMap<const Decl *, unsigned> AnonymousDeclarationNumbers; @@ -376,17 +376,17 @@ private: using UpdateRecord = SmallVector<DeclUpdate, 1>; using DeclUpdateMap = llvm::MapVector<const Decl *, UpdateRecord>; - /// \brief Mapping from declarations that came from a chained PCH to the + /// Mapping from declarations that came from a chained PCH to the /// record containing modifications to them. DeclUpdateMap DeclUpdates; using FirstLatestDeclMap = llvm::DenseMap<Decl *, Decl *>; - /// \brief Map of first declarations from a chained PCH that point to the + /// Map of first declarations from a chained PCH that point to the /// most recent declarations in another PCH. FirstLatestDeclMap FirstLatestDecls; - /// \brief Declarations encountered that might be external + /// Declarations encountered that might be external /// definitions. /// /// We keep track of external definitions and other 'interesting' declarations @@ -400,7 +400,7 @@ private: SmallVector<uint64_t, 16> EagerlyDeserializedDecls; SmallVector<uint64_t, 16> ModularCodegenDecls; - /// \brief DeclContexts that have received extensions since their serialized + /// DeclContexts that have received extensions since their serialized /// form. /// /// For namespaces, when we're chaining and encountering a namespace, we check @@ -409,52 +409,52 @@ private: /// it. llvm::SmallSetVector<const DeclContext *, 16> UpdatedDeclContexts; - /// \brief Keeps track of declarations that we must emit, even though we're + /// Keeps track of declarations that we must emit, even though we're /// not guaranteed to be able to find them by walking the AST starting at the /// translation unit. SmallVector<const Decl *, 16> DeclsToEmitEvenIfUnreferenced; - /// \brief The set of Objective-C class that have categories we + /// The set of Objective-C class that have categories we /// should serialize. llvm::SetVector<ObjCInterfaceDecl *> ObjCClassesWithCategories; - /// \brief The set of declarations that may have redeclaration chains that + /// The set of declarations that may have redeclaration chains that /// need to be serialized. llvm::SmallVector<const Decl *, 16> Redeclarations; - /// \brief A cache of the first local declaration for "interesting" + /// A cache of the first local declaration for "interesting" /// redeclaration chains. llvm::DenseMap<const Decl *, const Decl *> FirstLocalDeclCache; - /// \brief Mapping from SwitchCase statements to IDs. + /// Mapping from SwitchCase statements to IDs. llvm::DenseMap<SwitchCase *, unsigned> SwitchCaseIDs; - /// \brief The number of statements written to the AST file. + /// The number of statements written to the AST file. unsigned NumStatements = 0; - /// \brief The number of macros written to the AST file. + /// The number of macros written to the AST file. unsigned NumMacros = 0; - /// \brief The number of lexical declcontexts written to the AST + /// The number of lexical declcontexts written to the AST /// file. unsigned NumLexicalDeclContexts = 0; - /// \brief The number of visible declcontexts written to the AST + /// The number of visible declcontexts written to the AST /// file. unsigned NumVisibleDeclContexts = 0; - /// \brief A mapping from each known submodule to its ID number, which will + /// A mapping from each known submodule to its ID number, which will /// be a positive integer. llvm::DenseMap<Module *, unsigned> SubmoduleIDs; - /// \brief A list of the module file extension writers. + /// A list of the module file extension writers. std::vector<std::unique_ptr<ModuleFileExtensionWriter>> ModuleFileExtensionWriters; - /// \brief Retrieve or create a submodule ID for this module. + /// Retrieve or create a submodule ID for this module. unsigned getSubmoduleID(Module *Mod); - /// \brief Write the given subexpression to the bitstream. + /// Write the given subexpression to the bitstream. void WriteSubStmt(Stmt *S); void WriteBlockInfoBlock(); @@ -540,7 +540,7 @@ private: Module *WritingModule); public: - /// \brief Create a new precompiled header writer that outputs to + /// Create a new precompiled header writer that outputs to /// the given bitstream. ASTWriter(llvm::BitstreamWriter &Stream, SmallVectorImpl<char> &Buffer, MemoryBufferCache &PCMCache, @@ -550,12 +550,12 @@ public: const LangOptions &getLangOpts() const; - /// \brief Get a timestamp for output into the AST file. The actual timestamp + /// Get a timestamp for output into the AST file. The actual timestamp /// of the specified file may be ignored if we have been instructed to not /// include timestamps in the output file. time_t getTimestampForOutput(const FileEntry *E) const; - /// \brief Write a precompiled header for the given semantic analysis. + /// Write a precompiled header for the given semantic analysis. /// /// \param SemaRef a reference to the semantic analysis object that processed /// the AST to be written into the precompiled header. @@ -573,46 +573,46 @@ public: Module *WritingModule, StringRef isysroot, bool hasErrors = false); - /// \brief Emit a token. + /// Emit a token. void AddToken(const Token &Tok, RecordDataImpl &Record); - /// \brief Emit a source location. + /// Emit a source location. void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record); - /// \brief Emit a source range. + /// Emit a source range. void AddSourceRange(SourceRange Range, RecordDataImpl &Record); - /// \brief Emit a reference to an identifier. + /// Emit a reference to an identifier. void AddIdentifierRef(const IdentifierInfo *II, RecordDataImpl &Record); - /// \brief Get the unique number used to refer to the given selector. + /// Get the unique number used to refer to the given selector. serialization::SelectorID getSelectorRef(Selector Sel); - /// \brief Get the unique number used to refer to the given identifier. + /// Get the unique number used to refer to the given identifier. serialization::IdentID getIdentifierRef(const IdentifierInfo *II); - /// \brief Get the unique number used to refer to the given macro. + /// Get the unique number used to refer to the given macro. serialization::MacroID getMacroRef(MacroInfo *MI, const IdentifierInfo *Name); - /// \brief Determine the ID of an already-emitted macro. + /// Determine the ID of an already-emitted macro. serialization::MacroID getMacroID(MacroInfo *MI); uint64_t getMacroDirectivesOffset(const IdentifierInfo *Name); - /// \brief Emit a reference to a type. + /// Emit a reference to a type. void AddTypeRef(QualType T, RecordDataImpl &Record); - /// \brief Force a type to be emitted and get its ID. + /// Force a type to be emitted and get its ID. serialization::TypeID GetOrCreateTypeID(QualType T); - /// \brief Determine the type ID of an already-emitted type. + /// Determine the type ID of an already-emitted type. serialization::TypeID getTypeID(QualType T) const; - /// \brief Find the first local declaration of a given local redeclarable + /// Find the first local declaration of a given local redeclarable /// decl. const Decl *getFirstLocalDecl(const Decl *D); - /// \brief Is this a local declaration (that is, one that will be written to + /// Is this a local declaration (that is, one that will be written to /// our AST file)? This is the case for declarations that are neither imported /// from another AST file nor predefined. bool IsLocalDecl(const Decl *D) { @@ -623,52 +623,52 @@ public: I->second >= serialization::NUM_PREDEF_DECL_IDS); }; - /// \brief Emit a reference to a declaration. + /// Emit a reference to a declaration. void AddDeclRef(const Decl *D, RecordDataImpl &Record); - /// \brief Force a declaration to be emitted and get its ID. + /// Force a declaration to be emitted and get its ID. serialization::DeclID GetDeclRef(const Decl *D); - /// \brief Determine the declaration ID of an already-emitted + /// Determine the declaration ID of an already-emitted /// declaration. serialization::DeclID getDeclID(const Decl *D); unsigned getAnonymousDeclarationNumber(const NamedDecl *D); - /// \brief Add a string to the given record. + /// Add a string to the given record. void AddString(StringRef Str, RecordDataImpl &Record); - /// \brief Convert a path from this build process into one that is appropriate + /// Convert a path from this build process into one that is appropriate /// for emission in the module file. bool PreparePathForOutput(SmallVectorImpl<char> &Path); - /// \brief Add a path to the given record. + /// Add a path to the given record. void AddPath(StringRef Path, RecordDataImpl &Record); - /// \brief Emit the current record with the given path as a blob. + /// Emit the current record with the given path as a blob. void EmitRecordWithPath(unsigned Abbrev, RecordDataRef Record, StringRef Path); - /// \brief Add a version tuple to the given record + /// Add a version tuple to the given record void AddVersionTuple(const VersionTuple &Version, RecordDataImpl &Record); - /// \brief Retrieve or create a submodule ID for this module, or return 0 if + /// Retrieve or create a submodule ID for this module, or return 0 if /// the submodule is neither local (a submodle of the currently-written module) /// nor from an imported module. unsigned getLocalOrImportedSubmoduleID(Module *Mod); - /// \brief Note that the identifier II occurs at the given offset + /// Note that the identifier II occurs at the given offset /// within the identifier table. void SetIdentifierOffset(const IdentifierInfo *II, uint32_t Offset); - /// \brief Note that the selector Sel occurs at the given offset + /// Note that the selector Sel occurs at the given offset /// within the method pool/selector table. void SetSelectorOffset(Selector Sel, uint32_t Offset); - /// \brief Record an ID for the given switch-case statement. + /// Record an ID for the given switch-case statement. unsigned RecordSwitchCaseID(SwitchCase *S); - /// \brief Retrieve the ID for the given switch-case statement. + /// Retrieve the ID for the given switch-case statement. unsigned getSwitchCaseID(SwitchCase *S); void ClearSwitchCaseIDs(); @@ -743,21 +743,21 @@ private: const RecordDecl *Record) override; }; -/// \brief An object for streaming information to a record. +/// An object for streaming information to a record. class ASTRecordWriter { ASTWriter *Writer; ASTWriter::RecordDataImpl *Record; - /// \brief Statements that we've encountered while serializing a + /// Statements that we've encountered while serializing a /// declaration or type. SmallVector<Stmt *, 16> StmtsToEmit; - /// \brief Indices of record elements that describe offsets within the + /// Indices of record elements that describe offsets within the /// bitcode. These will be converted to offsets relative to the current /// record when emitted. SmallVector<unsigned, 8> OffsetIndices; - /// \brief Flush all of the statements and expressions that have + /// Flush all of the statements and expressions that have /// been added to the queue via AddStmt(). void FlushStmts(); void FlushSubStmts(); @@ -787,10 +787,10 @@ public: ASTRecordWriter(const ASTRecordWriter &) = delete; ASTRecordWriter &operator=(const ASTRecordWriter &) = delete; - /// \brief Extract the underlying record storage. + /// Extract the underlying record storage. ASTWriter::RecordDataImpl &getRecordData() const { return *Record; } - /// \brief Minimal vector-like interface. + /// Minimal vector-like interface. /// @{ void push_back(uint64_t N) { Record->push_back(N); } template<typename InputIterator> @@ -802,7 +802,7 @@ public: uint64_t &operator[](size_t N) { return (*Record)[N]; } /// @} - /// \brief Emit the record to the stream, followed by its substatements, and + /// Emit the record to the stream, followed by its substatements, and /// return its offset. // FIXME: Allow record producers to suggest Abbrevs. uint64_t Emit(unsigned Code, unsigned Abbrev = 0) { @@ -813,7 +813,7 @@ public: return Offset; } - /// \brief Emit the record to the stream, preceded by its substatements. + /// Emit the record to the stream, preceded by its substatements. uint64_t EmitStmt(unsigned Code, unsigned Abbrev = 0) { FlushSubStmts(); PrepareToEmit(Writer->Stream.GetCurrentBitNo()); @@ -821,14 +821,14 @@ public: return Writer->Stream.GetCurrentBitNo(); } - /// \brief Add a bit offset into the record. This will be converted into an + /// Add a bit offset into the record. This will be converted into an /// offset relative to the current record when emitted. void AddOffset(uint64_t BitOffset) { OffsetIndices.push_back(Record->size()); Record->push_back(BitOffset); } - /// \brief Add the given statement or expression to the queue of + /// Add the given statement or expression to the queue of /// statements to emit. /// /// This routine should be used when emitting types and declarations @@ -839,74 +839,74 @@ public: StmtsToEmit.push_back(S); } - /// \brief Add a definition for the given function to the queue of statements + /// Add a definition for the given function to the queue of statements /// to emit. void AddFunctionDefinition(const FunctionDecl *FD); - /// \brief Emit a source location. + /// Emit a source location. void AddSourceLocation(SourceLocation Loc) { return Writer->AddSourceLocation(Loc, *Record); } - /// \brief Emit a source range. + /// Emit a source range. void AddSourceRange(SourceRange Range) { return Writer->AddSourceRange(Range, *Record); } - /// \brief Emit an integral value. + /// Emit an integral value. void AddAPInt(const llvm::APInt &Value); - /// \brief Emit a signed integral value. + /// Emit a signed integral value. void AddAPSInt(const llvm::APSInt &Value); - /// \brief Emit a floating-point value. + /// Emit a floating-point value. void AddAPFloat(const llvm::APFloat &Value); - /// \brief Emit a reference to an identifier. + /// Emit a reference to an identifier. void AddIdentifierRef(const IdentifierInfo *II) { return Writer->AddIdentifierRef(II, *Record); } - /// \brief Emit a Selector (which is a smart pointer reference). + /// Emit a Selector (which is a smart pointer reference). void AddSelectorRef(Selector S); - /// \brief Emit a CXXTemporary. + /// Emit a CXXTemporary. void AddCXXTemporary(const CXXTemporary *Temp); - /// \brief Emit a C++ base specifier. + /// Emit a C++ base specifier. void AddCXXBaseSpecifier(const CXXBaseSpecifier &Base); - /// \brief Emit a set of C++ base specifiers. + /// Emit a set of C++ base specifiers. void AddCXXBaseSpecifiers(ArrayRef<CXXBaseSpecifier> Bases); - /// \brief Emit a reference to a type. + /// Emit a reference to a type. void AddTypeRef(QualType T) { return Writer->AddTypeRef(T, *Record); } - /// \brief Emits a reference to a declarator info. + /// Emits a reference to a declarator info. void AddTypeSourceInfo(TypeSourceInfo *TInfo); - /// \brief Emits a type with source-location information. + /// Emits a type with source-location information. void AddTypeLoc(TypeLoc TL); - /// \brief Emits a template argument location info. + /// Emits a template argument location info. void AddTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind, const TemplateArgumentLocInfo &Arg); - /// \brief Emits a template argument location. + /// Emits a template argument location. void AddTemplateArgumentLoc(const TemplateArgumentLoc &Arg); - /// \brief Emits an AST template argument list info. + /// Emits an AST template argument list info. void AddASTTemplateArgumentListInfo( const ASTTemplateArgumentListInfo *ASTTemplArgList); - /// \brief Emit a reference to a declaration. + /// Emit a reference to a declaration. void AddDeclRef(const Decl *D) { return Writer->AddDeclRef(D, *Record); } - /// \brief Emit a declaration name. + /// Emit a declaration name. void AddDeclarationName(DeclarationName Name); void AddDeclarationNameLoc(const DeclarationNameLoc &DNLoc, @@ -915,52 +915,52 @@ public: void AddQualifierInfo(const QualifierInfo &Info); - /// \brief Emit a nested name specifier. + /// Emit a nested name specifier. void AddNestedNameSpecifier(NestedNameSpecifier *NNS); - /// \brief Emit a nested name specifier with source-location information. + /// Emit a nested name specifier with source-location information. void AddNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS); - /// \brief Emit a template name. + /// Emit a template name. void AddTemplateName(TemplateName Name); - /// \brief Emit a template argument. + /// Emit a template argument. void AddTemplateArgument(const TemplateArgument &Arg); - /// \brief Emit a template parameter list. + /// Emit a template parameter list. void AddTemplateParameterList(const TemplateParameterList *TemplateParams); - /// \brief Emit a template argument list. + /// Emit a template argument list. void AddTemplateArgumentList(const TemplateArgumentList *TemplateArgs); - /// \brief Emit a UnresolvedSet structure. + /// Emit a UnresolvedSet structure. void AddUnresolvedSet(const ASTUnresolvedSet &Set); - /// \brief Emit a CXXCtorInitializer array. + /// Emit a CXXCtorInitializer array. void AddCXXCtorInitializers(ArrayRef<CXXCtorInitializer *> CtorInits); void AddCXXDefinitionData(const CXXRecordDecl *D); - /// \brief Emit a string. + /// Emit a string. void AddString(StringRef Str) { return Writer->AddString(Str, *Record); } - /// \brief Emit a path. + /// Emit a path. void AddPath(StringRef Path) { return Writer->AddPath(Path, *Record); } - /// \brief Emit a version tuple. + /// Emit a version tuple. void AddVersionTuple(const VersionTuple &Version) { return Writer->AddVersionTuple(Version, *Record); } - /// \brief Emit a list of attributes. + /// Emit a list of attributes. void AddAttributes(ArrayRef<const Attr*> Attrs); }; -/// \brief AST and semantic-analysis consumer that generates a +/// AST and semantic-analysis consumer that generates a /// precompiled header from the parsed source code. class PCHGenerator : public SemaConsumer { const Preprocessor &PP; diff --git a/include/clang/Serialization/ContinuousRangeMap.h b/include/clang/Serialization/ContinuousRangeMap.h index 3b111edc40..2f909965db 100644 --- a/include/clang/Serialization/ContinuousRangeMap.h +++ b/include/clang/Serialization/ContinuousRangeMap.h @@ -24,7 +24,7 @@ namespace clang { -/// \brief A map from continuous integer ranges to some value, with a very +/// A map from continuous integer ranges to some value, with a very /// specialized interface. /// /// CRM maps from integer ranges to values. The ranges are continuous, i.e. @@ -107,7 +107,7 @@ public: reference back() { return Rep.back(); } const_reference back() const { return Rep.back(); } - /// \brief An object that helps properly build a continuous range map + /// An object that helps properly build a continuous range map /// from a set of values. class Builder { ContinuousRangeMap &Self; diff --git a/include/clang/Serialization/GlobalModuleIndex.h b/include/clang/Serialization/GlobalModuleIndex.h index 0f14eca0fd..f48d0cf17c 100644 --- a/include/clang/Serialization/GlobalModuleIndex.h +++ b/include/clang/Serialization/GlobalModuleIndex.h @@ -47,7 +47,7 @@ using llvm::SmallVectorImpl; using llvm::StringRef; using serialization::ModuleFile; -/// \brief A global index for a set of module files, providing information about +/// A global index for a set of module files, providing information about /// the identifiers within those module files. /// /// The global index is an aid for name lookup into modules, offering a central @@ -59,64 +59,64 @@ using serialization::ModuleFile; /// imported, and can be queried to determine which modules the current /// translation could or should load to fix a problem. class GlobalModuleIndex { - /// \brief Buffer containing the index file, which is lazily accessed so long + /// Buffer containing the index file, which is lazily accessed so long /// as the global module index is live. std::unique_ptr<llvm::MemoryBuffer> Buffer; - /// \brief The hash table. + /// The hash table. /// /// This pointer actually points to a IdentifierIndexTable object, /// but that type is only accessible within the implementation of /// GlobalModuleIndex. void *IdentifierIndex; - /// \brief Information about a given module file. + /// Information about a given module file. struct ModuleInfo { ModuleInfo() : File(), Size(), ModTime() { } - /// \brief The module file, once it has been resolved. + /// The module file, once it has been resolved. ModuleFile *File; - /// \brief The module file name. + /// The module file name. std::string FileName; - /// \brief Size of the module file at the time the global index was built. + /// Size of the module file at the time the global index was built. off_t Size; - /// \brief Modification time of the module file at the time the global + /// Modification time of the module file at the time the global /// index was built. time_t ModTime; - /// \brief The module IDs on which this module directly depends. + /// The module IDs on which this module directly depends. /// FIXME: We don't really need a vector here. llvm::SmallVector<unsigned, 4> Dependencies; }; - /// \brief A mapping from module IDs to information about each module. + /// A mapping from module IDs to information about each module. /// /// This vector may have gaps, if module files have been removed or have /// been updated since the index was built. A gap is indicated by an empty /// file name. llvm::SmallVector<ModuleInfo, 16> Modules; - /// \brief Lazily-populated mapping from module files to their + /// Lazily-populated mapping from module files to their /// corresponding index into the \c Modules vector. llvm::DenseMap<ModuleFile *, unsigned> ModulesByFile; - /// \brief The set of modules that have not yet been resolved. + /// The set of modules that have not yet been resolved. /// /// The string is just the name of the module itself, which maps to the /// module ID. llvm::StringMap<unsigned> UnresolvedModules; - /// \brief The number of identifier lookups we performed. + /// The number of identifier lookups we performed. unsigned NumIdentifierLookups; - /// \brief The number of identifier lookup hits, where we recognize the + /// The number of identifier lookup hits, where we recognize the /// identifier. unsigned NumIdentifierLookupHits; - /// \brief Internal constructor. Use \c readIndex() to read an index. + /// Internal constructor. Use \c readIndex() to read an index. explicit GlobalModuleIndex(std::unique_ptr<llvm::MemoryBuffer> Buffer, llvm::BitstreamCursor Cursor); @@ -126,20 +126,20 @@ class GlobalModuleIndex { public: ~GlobalModuleIndex(); - /// \brief An error code returned when trying to read an index. + /// An error code returned when trying to read an index. enum ErrorCode { - /// \brief No error occurred. + /// No error occurred. EC_None, - /// \brief No index was found. + /// No index was found. EC_NotFound, - /// \brief Some other process is currently building the index; it is not + /// Some other process is currently building the index; it is not /// available yet. EC_Building, - /// \brief There was an unspecified I/O error reading or writing the index. + /// There was an unspecified I/O error reading or writing the index. EC_IOError }; - /// \brief Read a global index file for the given directory. + /// Read a global index file for the given directory. /// /// \param Path The path to the specific module cache where the module files /// for the intended configuration reside. @@ -149,26 +149,26 @@ public: static std::pair<GlobalModuleIndex *, ErrorCode> readIndex(StringRef Path); - /// \brief Returns an iterator for identifiers stored in the index table. + /// Returns an iterator for identifiers stored in the index table. /// /// The caller accepts ownership of the returned object. IdentifierIterator *createIdentifierIterator() const; - /// \brief Retrieve the set of modules that have up-to-date indexes. + /// Retrieve the set of modules that have up-to-date indexes. /// /// \param ModuleFiles Will be populated with the set of module files that /// have been indexed. void getKnownModules(SmallVectorImpl<ModuleFile *> &ModuleFiles); - /// \brief Retrieve the set of module files on which the given module file + /// Retrieve the set of module files on which the given module file /// directly depends. void getModuleDependencies(ModuleFile *File, SmallVectorImpl<ModuleFile *> &Dependencies); - /// \brief A set of module files in which we found a result. + /// A set of module files in which we found a result. typedef llvm::SmallPtrSet<ModuleFile *, 4> HitSet; - /// \brief Look for all of the module files with information about the given + /// Look for all of the module files with information about the given /// identifier, e.g., a global function, variable, or type with that name. /// /// \param Name The identifier to look for. @@ -179,19 +179,19 @@ public: /// \returns true if the identifier is known to the index, false otherwise. bool lookupIdentifier(StringRef Name, HitSet &Hits); - /// \brief Note that the given module file has been loaded. + /// Note that the given module file has been loaded. /// /// \returns false if the global module index has information about this /// module file, and true otherwise. bool loadedModuleFile(ModuleFile *File); - /// \brief Print statistics to standard error. + /// Print statistics to standard error. void printStats(); - /// \brief Print debugging view to standard error. + /// Print debugging view to standard error. void dump(); - /// \brief Write a global index into the given + /// Write a global index into the given /// /// \param FileMgr The file manager to use to load module files. /// \param PCHContainerRdr - The PCHContainerOperations to use for loading and diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h index d799e9fbd2..5f41f3927a 100644 --- a/include/clang/Serialization/Module.h +++ b/include/clang/Serialization/Module.h @@ -39,7 +39,7 @@ class FileEntry; namespace serialization { -/// \brief Specifies the kind of module that has been loaded. +/// Specifies the kind of module that has been loaded. enum ModuleKind { /// File is an implicitly-loaded module. MK_ImplicitModule, @@ -60,7 +60,7 @@ enum ModuleKind { MK_PrebuiltModule }; -/// \brief The input file that has been loaded from this AST file, along with +/// The input file that has been loaded from this AST file, along with /// bools indicating whether this was an overridden buffer or if it was /// out-of-date or not-found. class InputFile { @@ -98,7 +98,7 @@ public: bool isNotFound() const { return Val.getInt() == NotFound; } }; -/// \brief Information about a module that has been loaded by the ASTReader. +/// Information about a module that has been loaded by the ASTReader. /// /// Each instance of the Module class corresponds to a single AST file, which /// may be a precompiled header, precompiled preamble, a module, or an AST file @@ -113,81 +113,81 @@ public: // === General information === - /// \brief The index of this module in the list of modules. + /// The index of this module in the list of modules. unsigned Index = 0; - /// \brief The type of this module. + /// The type of this module. ModuleKind Kind; - /// \brief The file name of the module file. + /// The file name of the module file. std::string FileName; - /// \brief The name of the module. + /// The name of the module. std::string ModuleName; - /// \brief The base directory of the module. + /// The base directory of the module. std::string BaseDirectory; std::string getTimestampFilename() const { return FileName + ".timestamp"; } - /// \brief The original source file name that was used to build the + /// The original source file name that was used to build the /// primary AST file, which may have been modified for /// relocatable-pch support. std::string OriginalSourceFileName; - /// \brief The actual original source file name that was used to + /// The actual original source file name that was used to /// build this AST file. std::string ActualOriginalSourceFileName; - /// \brief The file ID for the original source file that was used to + /// The file ID for the original source file that was used to /// build this AST file. FileID OriginalSourceFileID; - /// \brief The directory that the PCH was originally created in. Used to + /// The directory that the PCH was originally created in. Used to /// allow resolving headers even after headers+PCH was moved to a new path. std::string OriginalDir; std::string ModuleMapPath; - /// \brief Whether this precompiled header is a relocatable PCH file. + /// Whether this precompiled header is a relocatable PCH file. bool RelocatablePCH = false; - /// \brief Whether timestamps are included in this module file. + /// Whether timestamps are included in this module file. bool HasTimestamps = false; - /// \brief The file entry for the module file. + /// The file entry for the module file. const FileEntry *File = nullptr; /// The signature of the module file, which may be used instead of the size /// and modification time to identify this particular file. ASTFileSignature Signature; - /// \brief Whether this module has been directly imported by the + /// Whether this module has been directly imported by the /// user. bool DirectlyImported = false; - /// \brief The generation of which this module file is a part. + /// The generation of which this module file is a part. unsigned Generation; /// The memory buffer that stores the data associated with /// this AST file, owned by the PCMCache in the ModuleManager. llvm::MemoryBuffer *Buffer; - /// \brief The size of this file, in bits. + /// The size of this file, in bits. uint64_t SizeInBits = 0; - /// \brief The global bit offset (or base) of this module + /// The global bit offset (or base) of this module uint64_t GlobalBitOffset = 0; - /// \brief The serialized bitstream data for this file. + /// The serialized bitstream data for this file. StringRef Data; - /// \brief The main bitstream cursor for the main block. + /// The main bitstream cursor for the main block. llvm::BitstreamCursor Stream; - /// \brief The source location where the module was explicitly or implicitly + /// The source location where the module was explicitly or implicitly /// imported in the local translation unit. /// /// If module A depends on and imports module B, both modules will have the @@ -198,10 +198,10 @@ public: /// made visible, just when the first submodule of that module was imported. SourceLocation DirectImportLoc; - /// \brief The source location where this module was first imported. + /// The source location where this module was first imported. SourceLocation ImportLoc; - /// \brief The first source location in this module. + /// The first source location in this module. SourceLocation FirstLoc; /// The list of extension readers that are attached to this module @@ -214,20 +214,20 @@ public: // === Input Files === - /// \brief The cursor to the start of the input-files block. + /// The cursor to the start of the input-files block. llvm::BitstreamCursor InputFilesCursor; - /// \brief Offsets for all of the input file entries in the AST file. + /// Offsets for all of the input file entries in the AST file. const llvm::support::unaligned_uint64_t *InputFileOffsets = nullptr; - /// \brief The input files that have been loaded from this AST file. + /// The input files that have been loaded from this AST file. std::vector<InputFile> InputFilesLoaded; // All user input files reside at the index range [0, NumUserInputFiles), and // system input files reside at [NumUserInputFiles, InputFilesLoaded.size()). unsigned NumUserInputFiles = 0; - /// \brief If non-zero, specifies the time when we last validated input + /// If non-zero, specifies the time when we last validated input /// files. Zero means we never validated them. /// /// The time is specified in seconds since the start of the Epoch. @@ -235,105 +235,105 @@ public: // === Source Locations === - /// \brief Cursor used to read source location entries. + /// Cursor used to read source location entries. llvm::BitstreamCursor SLocEntryCursor; - /// \brief The number of source location entries in this AST file. + /// The number of source location entries in this AST file. unsigned LocalNumSLocEntries = 0; - /// \brief The base ID in the source manager's view of this module. + /// The base ID in the source manager's view of this module. int SLocEntryBaseID = 0; - /// \brief The base offset in the source manager's view of this module. + /// The base offset in the source manager's view of this module. unsigned SLocEntryBaseOffset = 0; - /// \brief Offsets for all of the source location entries in the + /// Offsets for all of the source location entries in the /// AST file. const uint32_t *SLocEntryOffsets = nullptr; - /// \brief SLocEntries that we're going to preload. + /// SLocEntries that we're going to preload. SmallVector<uint64_t, 4> PreloadSLocEntries; - /// \brief Remapping table for source locations in this module. + /// Remapping table for source locations in this module. ContinuousRangeMap<uint32_t, int, 2> SLocRemap; // === Identifiers === - /// \brief The number of identifiers in this AST file. + /// The number of identifiers in this AST file. unsigned LocalNumIdentifiers = 0; - /// \brief Offsets into the identifier table data. + /// Offsets into the identifier table data. /// /// This array is indexed by the identifier ID (-1), and provides /// the offset into IdentifierTableData where the string data is /// stored. const uint32_t *IdentifierOffsets = nullptr; - /// \brief Base identifier ID for identifiers local to this module. + /// Base identifier ID for identifiers local to this module. serialization::IdentID BaseIdentifierID = 0; - /// \brief Remapping table for identifier IDs in this module. + /// Remapping table for identifier IDs in this module. ContinuousRangeMap<uint32_t, int, 2> IdentifierRemap; - /// \brief Actual data for the on-disk hash table of identifiers. + /// Actual data for the on-disk hash table of identifiers. /// /// This pointer points into a memory buffer, where the on-disk hash /// table for identifiers actually lives. const char *IdentifierTableData = nullptr; - /// \brief A pointer to an on-disk hash table of opaque type + /// A pointer to an on-disk hash table of opaque type /// IdentifierHashTable. void *IdentifierLookupTable = nullptr; - /// \brief Offsets of identifiers that we're going to preload within + /// Offsets of identifiers that we're going to preload within /// IdentifierTableData. std::vector<unsigned> PreloadIdentifierOffsets; // === Macros === - /// \brief The cursor to the start of the preprocessor block, which stores + /// The cursor to the start of the preprocessor block, which stores /// all of the macro definitions. llvm::BitstreamCursor MacroCursor; - /// \brief The number of macros in this AST file. + /// The number of macros in this AST file. unsigned LocalNumMacros = 0; - /// \brief Offsets of macros in the preprocessor block. + /// Offsets of macros in the preprocessor block. /// /// This array is indexed by the macro ID (-1), and provides /// the offset into the preprocessor block where macro definitions are /// stored. const uint32_t *MacroOffsets = nullptr; - /// \brief Base macro ID for macros local to this module. + /// Base macro ID for macros local to this module. serialization::MacroID BaseMacroID = 0; - /// \brief Remapping table for macro IDs in this module. + /// Remapping table for macro IDs in this module. ContinuousRangeMap<uint32_t, int, 2> MacroRemap; - /// \brief The offset of the start of the set of defined macros. + /// The offset of the start of the set of defined macros. uint64_t MacroStartOffset = 0; // === Detailed PreprocessingRecord === - /// \brief The cursor to the start of the (optional) detailed preprocessing + /// The cursor to the start of the (optional) detailed preprocessing /// record block. llvm::BitstreamCursor PreprocessorDetailCursor; - /// \brief The offset of the start of the preprocessor detail cursor. + /// The offset of the start of the preprocessor detail cursor. uint64_t PreprocessorDetailStartOffset = 0; - /// \brief Base preprocessed entity ID for preprocessed entities local to + /// Base preprocessed entity ID for preprocessed entities local to /// this module. serialization::PreprocessedEntityID BasePreprocessedEntityID = 0; - /// \brief Remapping table for preprocessed entity IDs in this module. + /// Remapping table for preprocessed entity IDs in this module. ContinuousRangeMap<uint32_t, int, 2> PreprocessedEntityRemap; const PPEntityOffset *PreprocessedEntityOffsets = nullptr; unsigned NumPreprocessedEntities = 0; - /// \brief Base ID for preprocessed skipped ranges local to this module. + /// Base ID for preprocessed skipped ranges local to this module. unsigned BasePreprocessedSkippedRangeID = 0; const PPSkippedRange *PreprocessedSkippedRangeOffsets = nullptr; @@ -341,54 +341,54 @@ public: // === Header search information === - /// \brief The number of local HeaderFileInfo structures. + /// The number of local HeaderFileInfo structures. unsigned LocalNumHeaderFileInfos = 0; - /// \brief Actual data for the on-disk hash table of header file + /// Actual data for the on-disk hash table of header file /// information. /// /// This pointer points into a memory buffer, where the on-disk hash /// table for header file information actually lives. const char *HeaderFileInfoTableData = nullptr; - /// \brief The on-disk hash table that contains information about each of + /// The on-disk hash table that contains information about each of /// the header files. void *HeaderFileInfoTable = nullptr; // === Submodule information === - /// \brief The number of submodules in this module. + /// The number of submodules in this module. unsigned LocalNumSubmodules = 0; - /// \brief Base submodule ID for submodules local to this module. + /// Base submodule ID for submodules local to this module. serialization::SubmoduleID BaseSubmoduleID = 0; - /// \brief Remapping table for submodule IDs in this module. + /// Remapping table for submodule IDs in this module. ContinuousRangeMap<uint32_t, int, 2> SubmoduleRemap; // === Selectors === - /// \brief The number of selectors new to this file. + /// The number of selectors new to this file. /// /// This is the number of entries in SelectorOffsets. unsigned LocalNumSelectors = 0; - /// \brief Offsets into the selector lookup table's data array + /// Offsets into the selector lookup table's data array /// where each selector resides. const uint32_t *SelectorOffsets = nullptr; - /// \brief Base selector ID for selectors local to this module. + /// Base selector ID for selectors local to this module. serialization::SelectorID BaseSelectorID = 0; - /// \brief Remapping table for selector IDs in this module. + /// Remapping table for selector IDs in this module. ContinuousRangeMap<uint32_t, int, 2> SelectorRemap; - /// \brief A pointer to the character data that comprises the selector table + /// A pointer to the character data that comprises the selector table /// /// The SelectorOffsets table refers into this memory. const unsigned char *SelectorLookupTableData = nullptr; - /// \brief A pointer to an on-disk hash table of opaque type + /// A pointer to an on-disk hash table of opaque type /// ASTSelectorLookupTable. /// /// This hash table provides the IDs of all selectors, and the associated @@ -402,20 +402,20 @@ public: /// jump around with these in context. llvm::BitstreamCursor DeclsCursor; - /// \brief The number of declarations in this AST file. + /// The number of declarations in this AST file. unsigned LocalNumDecls = 0; - /// \brief Offset of each declaration within the bitstream, indexed + /// Offset of each declaration within the bitstream, indexed /// by the declaration ID (-1). const DeclOffset *DeclOffsets = nullptr; - /// \brief Base declaration ID for declarations local to this module. + /// Base declaration ID for declarations local to this module. serialization::DeclID BaseDeclID = 0; - /// \brief Remapping table for declaration IDs in this module. + /// Remapping table for declaration IDs in this module. ContinuousRangeMap<uint32_t, int, 2> DeclRemap; - /// \brief Mapping from the module files that this module file depends on + /// Mapping from the module files that this module file depends on /// to the base declaration ID for that module as it is understood within this /// module. /// @@ -424,59 +424,59 @@ public: /// as a local ID (for this module file). llvm::DenseMap<ModuleFile *, serialization::DeclID> GlobalToLocalDeclIDs; - /// \brief Array of file-level DeclIDs sorted by file. + /// Array of file-level DeclIDs sorted by file. const serialization::DeclID *FileSortedDecls = nullptr; unsigned NumFileSortedDecls = 0; - /// \brief Array of category list location information within this + /// Array of category list location information within this /// module file, sorted by the definition ID. const serialization::ObjCCategoriesInfo *ObjCCategoriesMap = nullptr; - /// \brief The number of redeclaration info entries in ObjCCategoriesMap. + /// The number of redeclaration info entries in ObjCCategoriesMap. unsigned LocalNumObjCCategoriesInMap = 0; - /// \brief The Objective-C category lists for categories known to this + /// The Objective-C category lists for categories known to this /// module. SmallVector<uint64_t, 1> ObjCCategories; // === Types === - /// \brief The number of types in this AST file. + /// The number of types in this AST file. unsigned LocalNumTypes = 0; - /// \brief Offset of each type within the bitstream, indexed by the + /// Offset of each type within the bitstream, indexed by the /// type ID, or the representation of a Type*. const uint32_t *TypeOffsets = nullptr; - /// \brief Base type ID for types local to this module as represented in + /// Base type ID for types local to this module as represented in /// the global type ID space. serialization::TypeID BaseTypeIndex = 0; - /// \brief Remapping table for type IDs in this module. + /// Remapping table for type IDs in this module. ContinuousRangeMap<uint32_t, int, 2> TypeRemap; // === Miscellaneous === - /// \brief Diagnostic IDs and their mappings that the user changed. + /// Diagnostic IDs and their mappings that the user changed. SmallVector<uint64_t, 8> PragmaDiagMappings; - /// \brief List of modules which depend on this module + /// List of modules which depend on this module llvm::SetVector<ModuleFile *> ImportedBy; - /// \brief List of modules which this module depends on + /// List of modules which this module depends on llvm::SetVector<ModuleFile *> Imports; - /// \brief Determine whether this module was directly imported at + /// Determine whether this module was directly imported at /// any point during translation. bool isDirectlyImported() const { return DirectlyImported; } - /// \brief Is this a module file for a module (rather than a PCH or similar). + /// Is this a module file for a module (rather than a PCH or similar). bool isModule() const { return Kind == MK_ImplicitModule || Kind == MK_ExplicitModule || Kind == MK_PrebuiltModule; } - /// \brief Dump debugging output for this module. + /// Dump debugging output for this module. void dump(); }; diff --git a/include/clang/Serialization/ModuleManager.h b/include/clang/Serialization/ModuleManager.h index 147a6910aa..e101e60b21 100644 --- a/include/clang/Serialization/ModuleManager.h +++ b/include/clang/Serialization/ModuleManager.h @@ -45,45 +45,45 @@ class PCHContainerReader; namespace serialization { -/// \brief Manages the set of modules loaded by an AST reader. +/// Manages the set of modules loaded by an AST reader. class ModuleManager { - /// \brief The chain of AST files, in the order in which we started to load + /// The chain of AST files, in the order in which we started to load /// them (this order isn't really useful for anything). SmallVector<std::unique_ptr<ModuleFile>, 2> Chain; - /// \brief The chain of non-module PCH files. The first entry is the one named + /// The chain of non-module PCH files. The first entry is the one named /// by the user, the last one is the one that doesn't depend on anything /// further. SmallVector<ModuleFile *, 2> PCHChain; - // \brief The roots of the dependency DAG of AST files. This is used + // The roots of the dependency DAG of AST files. This is used // to implement short-circuiting logic when running DFS over the dependencies. SmallVector<ModuleFile *, 2> Roots; - /// \brief All loaded modules, indexed by name. + /// All loaded modules, indexed by name. llvm::DenseMap<const FileEntry *, ModuleFile *> Modules; - /// \brief FileManager that handles translating between filenames and + /// FileManager that handles translating between filenames and /// FileEntry *. FileManager &FileMgr; /// Cache of PCM files. IntrusiveRefCntPtr<MemoryBufferCache> PCMCache; - /// \brief Knows how to unwrap module containers. + /// Knows how to unwrap module containers. const PCHContainerReader &PCHContainerRdr; - /// \brief Preprocessor's HeaderSearchInfo containing the module map. + /// Preprocessor's HeaderSearchInfo containing the module map. const HeaderSearch &HeaderSearchInfo; - /// \brief A lookup of in-memory (virtual file) buffers + /// A lookup of in-memory (virtual file) buffers llvm::DenseMap<const FileEntry *, std::unique_ptr<llvm::MemoryBuffer>> InMemoryBuffers; - /// \brief The visitation order. + /// The visitation order. SmallVector<ModuleFile *, 4> VisitOrder; - /// \brief The list of module files that both we and the global module index + /// The list of module files that both we and the global module index /// know about. /// /// Either the global index or the module manager may have modules that the @@ -93,13 +93,13 @@ class ModuleManager { /// known to the global index. SmallVector<ModuleFile *, 4> ModulesInCommonWithGlobalIndex; - /// \brief The global module index, if one is attached. + /// The global module index, if one is attached. /// /// The global module index will actually be owned by the ASTReader; this is /// just an non-owning pointer. GlobalModuleIndex *GlobalIndex = nullptr; - /// \brief State used by the "visit" operation to avoid malloc traffic in + /// State used by the "visit" operation to avoid malloc traffic in /// calls to visit(). struct VisitState { explicit VisitState(unsigned N) : VisitNumber(N, 0) { @@ -110,22 +110,22 @@ class ModuleManager { delete NextState; } - /// \brief The stack used when marking the imports of a particular module + /// The stack used when marking the imports of a particular module /// as not-to-be-visited. SmallVector<ModuleFile *, 4> Stack; - /// \brief The visit number of each module file, which indicates when + /// The visit number of each module file, which indicates when /// this module file was last visited. SmallVector<unsigned, 4> VisitNumber; - /// \brief The next visit number to use to mark visited module files. + /// The next visit number to use to mark visited module files. unsigned NextVisitNumber = 1; - /// \brief The next visit state. + /// The next visit state. VisitState *NextState = nullptr; }; - /// \brief The first visit() state in the chain. + /// The first visit() state in the chain. VisitState *FirstVisitState = nullptr; VisitState *allocateVisitState(); @@ -145,74 +145,74 @@ public: const HeaderSearch &HeaderSearchInfo); ~ModuleManager(); - /// \brief Forward iterator to traverse all loaded modules. + /// Forward iterator to traverse all loaded modules. ModuleIterator begin() { return Chain.begin(); } - /// \brief Forward iterator end-point to traverse all loaded modules + /// Forward iterator end-point to traverse all loaded modules ModuleIterator end() { return Chain.end(); } - /// \brief Const forward iterator to traverse all loaded modules. + /// Const forward iterator to traverse all loaded modules. ModuleConstIterator begin() const { return Chain.begin(); } - /// \brief Const forward iterator end-point to traverse all loaded modules + /// Const forward iterator end-point to traverse all loaded modules ModuleConstIterator end() const { return Chain.end(); } - /// \brief Reverse iterator to traverse all loaded modules. + /// Reverse iterator to traverse all loaded modules. ModuleReverseIterator rbegin() { return Chain.rbegin(); } - /// \brief Reverse iterator end-point to traverse all loaded modules. + /// Reverse iterator end-point to traverse all loaded modules. ModuleReverseIterator rend() { return Chain.rend(); } - /// \brief A range covering the PCH and preamble module files loaded. + /// A range covering the PCH and preamble module files loaded. llvm::iterator_range<SmallVectorImpl<ModuleFile *>::const_iterator> pch_modules() const { return llvm::make_range(PCHChain.begin(), PCHChain.end()); } - /// \brief Returns the primary module associated with the manager, that is, + /// Returns the primary module associated with the manager, that is, /// the first module loaded ModuleFile &getPrimaryModule() { return *Chain[0]; } - /// \brief Returns the primary module associated with the manager, that is, + /// Returns the primary module associated with the manager, that is, /// the first module loaded. ModuleFile &getPrimaryModule() const { return *Chain[0]; } - /// \brief Returns the module associated with the given index + /// Returns the module associated with the given index ModuleFile &operator[](unsigned Index) const { return *Chain[Index]; } - /// \brief Returns the module associated with the given file name. + /// Returns the module associated with the given file name. ModuleFile *lookupByFileName(StringRef FileName) const; - /// \brief Returns the module associated with the given module name. + /// Returns the module associated with the given module name. ModuleFile *lookupByModuleName(StringRef ModName) const; - /// \brief Returns the module associated with the given module file. + /// Returns the module associated with the given module file. ModuleFile *lookup(const FileEntry *File) const; - /// \brief Returns the in-memory (virtual file) buffer with the given name + /// Returns the in-memory (virtual file) buffer with the given name std::unique_ptr<llvm::MemoryBuffer> lookupBuffer(StringRef Name); - /// \brief Number of modules loaded + /// Number of modules loaded unsigned size() const { return Chain.size(); } - /// \brief The result of attempting to add a new module. + /// The result of attempting to add a new module. enum AddModuleResult { - /// \brief The module file had already been loaded. + /// The module file had already been loaded. AlreadyLoaded, - /// \brief The module file was just loaded in response to this call. + /// The module file was just loaded in response to this call. NewlyLoaded, - /// \brief The module file is missing. + /// The module file is missing. Missing, - /// \brief The module file is out-of-date. + /// The module file is out-of-date. OutOfDate }; using ASTFileSignatureReader = ASTFileSignature (*)(StringRef); - /// \brief Attempts to create a new module and add it to the list of known + /// Attempts to create a new module and add it to the list of known /// modules. /// /// \param FileName The file name of the module to be loaded. @@ -255,23 +255,23 @@ public: ModuleFile *&Module, std::string &ErrorStr); - /// \brief Remove the modules starting from First (to the end). + /// Remove the modules starting from First (to the end). void removeModules(ModuleIterator First, llvm::SmallPtrSetImpl<ModuleFile *> &LoadedSuccessfully, ModuleMap *modMap); - /// \brief Add an in-memory buffer the list of known buffers + /// Add an in-memory buffer the list of known buffers void addInMemoryBuffer(StringRef FileName, std::unique_ptr<llvm::MemoryBuffer> Buffer); - /// \brief Set the global module index. + /// Set the global module index. void setGlobalIndex(GlobalModuleIndex *Index); - /// \brief Notification from the AST reader that the given module file + /// Notification from the AST reader that the given module file /// has been "accepted", and will not (can not) be unloaded. void moduleFileAccepted(ModuleFile *MF); - /// \brief Visit each of the modules. + /// Visit each of the modules. /// /// This routine visits each of the modules, starting with the /// "root" modules that no other loaded modules depend on, and @@ -293,7 +293,7 @@ public: void visit(llvm::function_ref<bool(ModuleFile &M)> Visitor, llvm::SmallPtrSetImpl<ModuleFile *> *ModuleFilesHit = nullptr); - /// \brief Attempt to resolve the given module file name to a file entry. + /// Attempt to resolve the given module file name to a file entry. /// /// \param FileName The name of the module file. /// @@ -315,7 +315,7 @@ public: time_t ExpectedModTime, const FileEntry *&File); - /// \brief View the graphviz representation of the module graph. + /// View the graphviz representation of the module graph. void viewGraph(); MemoryBufferCache &getPCMCache() const { return *PCMCache; } |