llvm/clang/lib/Serialization/ASTReader.cpp

//===- ASTReader.cpp - AST File Reader ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file defines the ASTReader class, which reads AST files.
//
//===----------------------------------------------------------------------===//

#include "ASTCommon.h"
#include "ASTReaderInternals.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/ASTStructuralEquivalence.h"
#include "clang/AST/ASTUnresolvedSet.h"
#include "clang/AST/AbstractTypeReader.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclGroup.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExternalASTSource.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/ODRDiagsEmitter.h"
#include "clang/AST/OpenACCClause.h"
#include "clang/AST/OpenMPClause.h"
#include "clang/AST/RawCommentList.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/TemplateName.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeLocVisitor.h"
#include "clang/AST/UnresolvedSet.h"
#include "clang/Basic/ASTSourceDescriptor.h"
#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticError.h"
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/DiagnosticSema.h"
#include "clang/Basic/ExceptionSpecificationType.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/OpenACCKinds.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/PragmaKinds.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/SourceManagerInternals.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/TargetOptions.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Basic/Version.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/MacroInfo.h"
#include "clang/Lex/ModuleMap.h"
#include "clang/Lex/PreprocessingRecord.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Lex/Token.h"
#include "clang/Sema/ObjCMethodList.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaCUDA.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/Weak.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ASTDeserializationListener.h"
#include "clang/Serialization/ASTRecordReader.h"
#include "clang/Serialization/ContinuousRangeMap.h"
#include "clang/Serialization/GlobalModuleIndex.h"
#include "clang/Serialization/InMemoryModuleCache.h"
#include "clang/Serialization/ModuleFile.h"
#include "clang/Serialization/ModuleFileExtension.h"
#include "clang/Serialization/ModuleManager.h"
#include "clang/Serialization/PCHContainerOperations.h"
#include "clang/Serialization/SerializationDiagnostic.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/DJB.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <system_error>
#include <tuple>
#include <utility>
#include <vector>

usingnamespaceclang;
usingnamespaceclang::serialization;
usingnamespaceclang::serialization::reader;
BitstreamCursor;

//===----------------------------------------------------------------------===//
// ChainedASTReaderListener implementation
//===----------------------------------------------------------------------===//

bool
ChainedASTReaderListener::ReadFullVersionInformation(StringRef FullVersion) {}

void ChainedASTReaderListener::ReadModuleName(StringRef ModuleName) {}

void ChainedASTReaderListener::ReadModuleMapFile(StringRef ModuleMapPath) {}

bool ChainedASTReaderListener::ReadLanguageOptions(
    const LangOptions &LangOpts, StringRef ModuleFilename, bool Complain,
    bool AllowCompatibleDifferences) {}

bool ChainedASTReaderListener::ReadTargetOptions(
    const TargetOptions &TargetOpts, StringRef ModuleFilename, bool Complain,
    bool AllowCompatibleDifferences) {}

bool ChainedASTReaderListener::ReadDiagnosticOptions(
    IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts, StringRef ModuleFilename,
    bool Complain) {}

bool
ChainedASTReaderListener::ReadFileSystemOptions(const FileSystemOptions &FSOpts,
                                                bool Complain) {}

bool ChainedASTReaderListener::ReadHeaderSearchOptions(
    const HeaderSearchOptions &HSOpts, StringRef ModuleFilename,
    StringRef SpecificModuleCachePath, bool Complain) {}

bool ChainedASTReaderListener::ReadPreprocessorOptions(
    const PreprocessorOptions &PPOpts, StringRef ModuleFilename,
    bool ReadMacros, bool Complain, std::string &SuggestedPredefines) {}

void ChainedASTReaderListener::ReadCounter(const serialization::ModuleFile &M,
                                           unsigned Value) {}

bool ChainedASTReaderListener::needsInputFileVisitation() {}

bool ChainedASTReaderListener::needsSystemInputFileVisitation() {}

void ChainedASTReaderListener::visitModuleFile(StringRef Filename,
                                               ModuleKind Kind) {}

bool ChainedASTReaderListener::visitInputFile(StringRef Filename,
                                              bool isSystem,
                                              bool isOverridden,
                                              bool isExplicitModule) {}

void ChainedASTReaderListener::readModuleFileExtension(
       const ModuleFileExtensionMetadata &Metadata) {}

//===----------------------------------------------------------------------===//
// PCH validator implementation
//===----------------------------------------------------------------------===//

ASTReaderListener::~ASTReaderListener() = default;

/// Compare the given set of language options against an existing set of
/// language options.
///
/// \param Diags If non-NULL, diagnostics will be emitted via this engine.
/// \param AllowCompatibleDifferences If true, differences between compatible
///        language options will be permitted.
///
/// \returns true if the languagae options mis-match, false otherwise.
static bool checkLanguageOptions(const LangOptions &LangOpts,
                                 const LangOptions &ExistingLangOpts,
                                 StringRef ModuleFilename,
                                 DiagnosticsEngine *Diags,
                                 bool AllowCompatibleDifferences = true) {}

/// Compare the given set of target options against an existing set of
/// target options.
///
/// \param Diags If non-NULL, diagnostics will be emitted via this engine.
///
/// \returns true if the target options mis-match, false otherwise.
static bool checkTargetOptions(const TargetOptions &TargetOpts,
                               const TargetOptions &ExistingTargetOpts,
                               StringRef ModuleFilename,
                               DiagnosticsEngine *Diags,
                               bool AllowCompatibleDifferences = true) {}

bool PCHValidator::ReadLanguageOptions(const LangOptions &LangOpts,
                                       StringRef ModuleFilename, bool Complain,
                                       bool AllowCompatibleDifferences) {}

bool PCHValidator::ReadTargetOptions(const TargetOptions &TargetOpts,
                                     StringRef ModuleFilename, bool Complain,
                                     bool AllowCompatibleDifferences) {}

namespace {

MacroDefinitionsMap;
DeclsMap;

} // namespace

static bool checkDiagnosticGroupMappings(DiagnosticsEngine &StoredDiags,
                                         DiagnosticsEngine &Diags,
                                         StringRef ModuleFilename,
                                         bool Complain) {}

static bool isExtHandlingFromDiagsError(DiagnosticsEngine &Diags) {}

static bool checkDiagnosticMappings(DiagnosticsEngine &StoredDiags,
                                    DiagnosticsEngine &Diags,
                                    StringRef ModuleFilename, bool IsSystem,
                                    bool SystemHeaderWarningsInModule,
                                    bool Complain) {}

/// Return the top import module if it is implicit, nullptr otherwise.
static Module *getTopImportImplicitModule(ModuleManager &ModuleMgr,
                                          Preprocessor &PP) {}

bool PCHValidator::ReadDiagnosticOptions(
    IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts, StringRef ModuleFilename,
    bool Complain) {}

/// Collect the macro definitions provided by the given preprocessor
/// options.
static void
collectMacroDefinitions(const PreprocessorOptions &PPOpts,
                        MacroDefinitionsMap &Macros,
                        SmallVectorImpl<StringRef> *MacroNames = nullptr) {}

enum OptionValidation {};

/// Check the preprocessor options deserialized from the control block
/// against the preprocessor options in an existing preprocessor.
///
/// \param Diags If non-null, produce diagnostics for any mismatches incurred.
/// \param Validation If set to OptionValidateNone, ignore differences in
///        preprocessor options. If set to OptionValidateContradictions,
///        require that options passed both in the AST file and on the command
///        line (-D or -U) match, but tolerate options missing in one or the
///        other. If set to OptionValidateContradictions, require that there
///        are no differences in the options between the two.
static bool checkPreprocessorOptions(
    const PreprocessorOptions &PPOpts,
    const PreprocessorOptions &ExistingPPOpts, StringRef ModuleFilename,
    bool ReadMacros, DiagnosticsEngine *Diags, FileManager &FileMgr,
    std::string &SuggestedPredefines, const LangOptions &LangOpts,
    OptionValidation Validation = OptionValidateContradictions) {}

bool PCHValidator::ReadPreprocessorOptions(const PreprocessorOptions &PPOpts,
                                           StringRef ModuleFilename,
                                           bool ReadMacros, bool Complain,
                                           std::string &SuggestedPredefines) {}

bool SimpleASTReaderListener::ReadPreprocessorOptions(
    const PreprocessorOptions &PPOpts, StringRef ModuleFilename,
    bool ReadMacros, bool Complain, std::string &SuggestedPredefines) {}

/// Check that the specified and the existing module cache paths are equivalent.
///
/// \param Diags If non-null, produce diagnostics for any mismatches incurred.
/// \returns true when the module cache paths differ.
static bool checkModuleCachePath(llvm::vfs::FileSystem &VFS,
                                 StringRef SpecificModuleCachePath,
                                 StringRef ExistingModuleCachePath,
                                 StringRef ModuleFilename,
                                 DiagnosticsEngine *Diags,
                                 const LangOptions &LangOpts,
                                 const PreprocessorOptions &PPOpts) {}

bool PCHValidator::ReadHeaderSearchOptions(const HeaderSearchOptions &HSOpts,
                                           StringRef ModuleFilename,
                                           StringRef SpecificModuleCachePath,
                                           bool Complain) {}

void PCHValidator::ReadCounter(const ModuleFile &M, unsigned Value) {}

//===----------------------------------------------------------------------===//
// AST reader implementation
//===----------------------------------------------------------------------===//

static uint64_t readULEB(const unsigned char *&P) {}

/// Read ULEB-encoded key length and data length.
static std::pair<unsigned, unsigned>
readULEBKeyDataLength(const unsigned char *&P) {}

void ASTReader::setDeserializationListener(ASTDeserializationListener *Listener,
                                           bool TakeOwnership) {}

unsigned ASTSelectorLookupTrait::ComputeHash(Selector Sel) {}

LocalDeclID LocalDeclID::get(ASTReader &Reader, ModuleFile &MF, DeclID Value) {}

LocalDeclID LocalDeclID::get(ASTReader &Reader, ModuleFile &MF,
                             unsigned ModuleFileIndex, unsigned LocalDeclID) {}

std::pair<unsigned, unsigned>
ASTSelectorLookupTrait::ReadKeyDataLength(const unsigned char*& d) {}

ASTSelectorLookupTrait::internal_key_type
ASTSelectorLookupTrait::ReadKey(const unsigned char* d, unsigned) {}

ASTSelectorLookupTrait::data_type
ASTSelectorLookupTrait::ReadData(Selector, const unsigned char* d,
                                 unsigned DataLen) {}

unsigned ASTIdentifierLookupTraitBase::ComputeHash(const internal_key_type& a) {}

std::pair<unsigned, unsigned>
ASTIdentifierLookupTraitBase::ReadKeyDataLength(const unsigned char*& d) {}

ASTIdentifierLookupTraitBase::internal_key_type
ASTIdentifierLookupTraitBase::ReadKey(const unsigned char* d, unsigned n) {}

/// Whether the given identifier is "interesting".
static bool isInterestingIdentifier(ASTReader &Reader, const IdentifierInfo &II,
                                    bool IsModule) {}

static bool readBit(unsigned &Bits) {}

IdentifierID ASTIdentifierLookupTrait::ReadIdentifierID(const unsigned char *d) {}

static void markIdentifierFromAST(ASTReader &Reader, IdentifierInfo &II,
                                  bool IsModule) {}

IdentifierInfo *ASTIdentifierLookupTrait::ReadData(const internal_key_type& k,
                                                   const unsigned char* d,
                                                   unsigned DataLen) {}

DeclarationNameKey::DeclarationNameKey(DeclarationName Name)
    :{}

unsigned DeclarationNameKey::getHash() const {}

ModuleFile *
ASTDeclContextNameLookupTrait::ReadFileRef(const unsigned char *&d) {}

std::pair<unsigned, unsigned>
ASTDeclContextNameLookupTrait::ReadKeyDataLength(const unsigned char *&d) {}

ASTDeclContextNameLookupTrait::internal_key_type
ASTDeclContextNameLookupTrait::ReadKey(const unsigned char *d, unsigned) {}

void ASTDeclContextNameLookupTrait::ReadDataInto(internal_key_type,
                                                 const unsigned char *d,
                                                 unsigned DataLen,
                                                 data_type_builder &Val) {}

bool ASTReader::ReadLexicalDeclContextStorage(ModuleFile &M,
                                              BitstreamCursor &Cursor,
                                              uint64_t Offset,
                                              DeclContext *DC) {}

bool ASTReader::ReadVisibleDeclContextStorage(ModuleFile &M,
                                              BitstreamCursor &Cursor,
                                              uint64_t Offset,
                                              GlobalDeclID ID) {}

void ASTReader::Error(StringRef Msg) const {}

void ASTReader::Error(unsigned DiagID, StringRef Arg1, StringRef Arg2,
                      StringRef Arg3) const {}

void ASTReader::Error(llvm::Error &&Err) const {}

//===----------------------------------------------------------------------===//
// Source Manager Deserialization
//===----------------------------------------------------------------------===//

/// Read the line table in the source manager block.
void ASTReader::ParseLineTable(ModuleFile &F, const RecordData &Record) {}

/// Read a source manager block
llvm::Error ASTReader::ReadSourceManagerBlock(ModuleFile &F) {}

llvm::Expected<SourceLocation::UIntTy>
ASTReader::readSLocOffset(ModuleFile *F, unsigned Index) {}

int ASTReader::getSLocEntryID(SourceLocation::UIntTy SLocOffset) {}

bool ASTReader::ReadSLocEntry(int ID) {}

std::pair<SourceLocation, StringRef> ASTReader::getModuleImportLoc(int ID) {}

/// Find the location where the module F is imported.
SourceLocation ASTReader::getImportLocation(ModuleFile *F) {}

/// Enter a subblock of the specified BlockID with the specified cursor. Read
/// the abbreviations that are at the top of the block and then leave the cursor
/// pointing into the block.
llvm::Error ASTReader::ReadBlockAbbrevs(BitstreamCursor &Cursor,
                                        unsigned BlockID,
                                        uint64_t *StartOfBlockOffset) {}

Token ASTReader::ReadToken(ModuleFile &M, const RecordDataImpl &Record,
                           unsigned &Idx) {}

MacroInfo *ASTReader::ReadMacroRecord(ModuleFile &F, uint64_t Offset) {}

PreprocessedEntityID
ASTReader::getGlobalPreprocessedEntityID(ModuleFile &M,
                                         unsigned LocalID) const {}

const FileEntry *HeaderFileInfoTrait::getFile(const internal_key_type &Key) {}

unsigned HeaderFileInfoTrait::ComputeHash(internal_key_ref ikey) {}

HeaderFileInfoTrait::internal_key_type
HeaderFileInfoTrait::GetInternalKey(external_key_type ekey) {}

bool HeaderFileInfoTrait::EqualKey(internal_key_ref a, internal_key_ref b) {}

std::pair<unsigned, unsigned>
HeaderFileInfoTrait::ReadKeyDataLength(const unsigned char*& d) {}

HeaderFileInfoTrait::internal_key_type
HeaderFileInfoTrait::ReadKey(const unsigned char *d, unsigned) {}

HeaderFileInfoTrait::data_type
HeaderFileInfoTrait::ReadData(internal_key_ref key, const unsigned char *d,
                              unsigned DataLen) {}

void ASTReader::addPendingMacro(IdentifierInfo *II, ModuleFile *M,
                                uint32_t MacroDirectivesOffset) {}

void ASTReader::ReadDefinedMacros() {}

namespace {

  /// Visitor class used to look up identifirs in an AST file.
  class IdentifierLookupVisitor {};

} // namespace

void ASTReader::updateOutOfDateIdentifier(const IdentifierInfo &II) {}

void ASTReader::markIdentifierUpToDate(const IdentifierInfo *II) {}

void ASTReader::resolvePendingMacro(IdentifierInfo *II,
                                    const PendingMacroInfo &PMInfo) {}

bool ASTReader::shouldDisableValidationForFile(
    const serialization::ModuleFile &M) const {}

InputFileInfo ASTReader::getInputFileInfo(ModuleFile &F, unsigned ID) {}

static unsigned moduleKindForDiagnostic(ModuleKind Kind);
InputFile ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) {}

/// If we are loading a relocatable PCH or module file, and the filename
/// is not an absolute path, add the system or module root to the beginning of
/// the file name.
void ASTReader::ResolveImportedPath(ModuleFile &M, std::string &Filename) {}

void ASTReader::ResolveImportedPath(std::string &Filename, StringRef Prefix) {}

static bool isDiagnosedResult(ASTReader::ASTReadResult ARR, unsigned Caps) {}

ASTReader::ASTReadResult ASTReader::ReadOptionsBlock(
    BitstreamCursor &Stream, StringRef Filename,
    unsigned ClientLoadCapabilities, bool AllowCompatibleConfigurationMismatch,
    ASTReaderListener &Listener, std::string &SuggestedPredefines) {}

ASTReader::ASTReadResult
ASTReader::ReadControlBlock(ModuleFile &F,
                            SmallVectorImpl<ImportedModule> &Loaded,
                            const ModuleFile *ImportedBy,
                            unsigned ClientLoadCapabilities) {}

llvm::Error ASTReader::ReadASTBlock(ModuleFile &F,
                                    unsigned ClientLoadCapabilities) {}

void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const {}

ASTReader::ASTReadResult
ASTReader::ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F,
                                  const ModuleFile *ImportedBy,
                                  unsigned ClientLoadCapabilities) {}

/// Move the given method to the back of the global list of methods.
static void moveMethodToBackOfGlobalList(Sema &S, ObjCMethodDecl *Method) {}

void ASTReader::makeNamesVisible(const HiddenNames &Names, Module *Owner) {}

void ASTReader::makeModuleVisible(Module *Mod,
                                  Module::NameVisibilityKind NameVisibility,
                                  SourceLocation ImportLoc) {}

/// We've merged the definition \p MergedDef into the existing definition
/// \p Def. Ensure that \p Def is made visible whenever \p MergedDef is made
/// visible.
void ASTReader::mergeDefinitionVisibility(NamedDecl *Def,
                                          NamedDecl *MergedDef) {}

bool ASTReader::loadGlobalIndex() {}

bool ASTReader::isGlobalIndexUnavailable() const {}

static void updateModuleTimestamp(ModuleFile &MF) {}

/// Given a cursor at the start of an AST file, scan ahead and drop the
/// cursor into the start of the given block ID, returning false on success and
/// true on failure.
static bool SkipCursorToBlock(BitstreamCursor &Cursor, unsigned BlockID) {}

ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName, ModuleKind Type,
                                            SourceLocation ImportLoc,
                                            unsigned ClientLoadCapabilities,
                                            ModuleFile **NewLoadedModuleFile) {}

static ASTFileSignature readASTFileSignature(StringRef PCH);

/// Whether \p Stream doesn't start with the AST/PCH file magic number 'CPCH'.
static llvm::Error doesntStartWithASTFileMagic(BitstreamCursor &Stream) {}

static unsigned moduleKindForDiagnostic(ModuleKind Kind) {}

ASTReader::ASTReadResult
ASTReader::ReadASTCore(StringRef FileName,
                       ModuleKind Type,
                       SourceLocation ImportLoc,
                       ModuleFile *ImportedBy,
                       SmallVectorImpl<ImportedModule> &Loaded,
                       off_t ExpectedSize, time_t ExpectedModTime,
                       ASTFileSignature ExpectedSignature,
                       unsigned ClientLoadCapabilities) {}

ASTReader::ASTReadResult
ASTReader::readUnhashedControlBlock(ModuleFile &F, bool WasImportedBy,
                                    unsigned ClientLoadCapabilities) {}

ASTReader::ASTReadResult ASTReader::readUnhashedControlBlockImpl(
    ModuleFile *F, llvm::StringRef StreamData, StringRef Filename,
    unsigned ClientLoadCapabilities, bool AllowCompatibleConfigurationMismatch,
    ASTReaderListener *Listener, bool ValidateDiagnosticOptions) {}

/// Parse a record and blob containing module file extension metadata.
static bool parseModuleFileExtensionMetadata(
              const SmallVectorImpl<uint64_t> &Record,
              StringRef Blob,
              ModuleFileExtensionMetadata &Metadata) {}

llvm::Error ASTReader::ReadExtensionBlock(ModuleFile &F) {}

void ASTReader::InitializeContext() {}

void ASTReader::finalizeForWriting() {}

/// Reads and return the signature record from \p PCH's control block, or
/// else returns 0.
static ASTFileSignature readASTFileSignature(StringRef PCH) {}

/// Retrieve the name of the original source file name
/// directly from the AST file, without actually loading the AST
/// file.
std::string ASTReader::getOriginalSourceFile(
    const std::string &ASTFileName, FileManager &FileMgr,
    const PCHContainerReader &PCHContainerRdr, DiagnosticsEngine &Diags) {}

namespace {

  class SimplePCHValidator : public ASTReaderListener {};

} // namespace

bool ASTReader::readASTFileControlBlock(
    StringRef Filename, FileManager &FileMgr,
    const InMemoryModuleCache &ModuleCache,
    const PCHContainerReader &PCHContainerRdr, bool FindModuleFileExtensions,
    ASTReaderListener &Listener, bool ValidateDiagnosticOptions,
    unsigned ClientLoadCapabilities) {}

bool ASTReader::isAcceptableASTFile(StringRef Filename, FileManager &FileMgr,
                                    const InMemoryModuleCache &ModuleCache,
                                    const PCHContainerReader &PCHContainerRdr,
                                    const LangOptions &LangOpts,
                                    const TargetOptions &TargetOpts,
                                    const PreprocessorOptions &PPOpts,
                                    StringRef ExistingModuleCachePath,
                                    bool RequireStrictOptionMatches) {}

llvm::Error ASTReader::ReadSubmoduleBlock(ModuleFile &F,
                                          unsigned ClientLoadCapabilities) {}

/// Parse the record that corresponds to a LangOptions data
/// structure.
///
/// This routine parses the language options from the AST file and then gives
/// them to the AST listener if one is set.
///
/// \returns true if the listener deems the file unacceptable, false otherwise.
bool ASTReader::ParseLanguageOptions(const RecordData &Record,
                                     StringRef ModuleFilename, bool Complain,
                                     ASTReaderListener &Listener,
                                     bool AllowCompatibleDifferences) {}

bool ASTReader::ParseTargetOptions(const RecordData &Record,
                                   StringRef ModuleFilename, bool Complain,
                                   ASTReaderListener &Listener,
                                   bool AllowCompatibleDifferences) {}

bool ASTReader::ParseDiagnosticOptions(const RecordData &Record,
                                       StringRef ModuleFilename, bool Complain,
                                       ASTReaderListener &Listener) {}

bool ASTReader::ParseFileSystemOptions(const RecordData &Record, bool Complain,
                                       ASTReaderListener &Listener) {}

bool ASTReader::ParseHeaderSearchOptions(const RecordData &Record,
                                         StringRef ModuleFilename,
                                         bool Complain,
                                         ASTReaderListener &Listener) {}

bool ASTReader::ParseHeaderSearchPaths(const RecordData &Record, bool Complain,
                                       ASTReaderListener &Listener) {}

bool ASTReader::ParsePreprocessorOptions(const RecordData &Record,
                                         StringRef ModuleFilename,
                                         bool Complain,
                                         ASTReaderListener &Listener,
                                         std::string &SuggestedPredefines) {}

std::pair<ModuleFile *, unsigned>
ASTReader::getModulePreprocessedEntity(unsigned GlobalIndex) {}

llvm::iterator_range<PreprocessingRecord::iterator>
ASTReader::getModulePreprocessedEntities(ModuleFile &Mod) const {}

bool ASTReader::canRecoverFromOutOfDate(StringRef ModuleFileName,
                                        unsigned int ClientLoadCapabilities) {}

llvm::iterator_range<ASTReader::ModuleDeclIterator>
ASTReader::getModuleFileLevelDecls(ModuleFile &Mod) {}

SourceRange ASTReader::ReadSkippedRange(unsigned GlobalIndex) {}

PreprocessedEntity *ASTReader::ReadPreprocessedEntity(unsigned Index) {}

/// 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
/// preprocessed entities or the entities it contains are not the ones we are
/// looking for.
PreprocessedEntityID ASTReader::findNextPreprocessedEntity(
                       GlobalSLocOffsetMapType::const_iterator SLocMapI) const {}

namespace {

struct PPEntityComp {};

} // namespace

PreprocessedEntityID ASTReader::findPreprocessedEntity(SourceLocation Loc,
                                                       bool EndsAfter) const {}

/// Returns a pair of [Begin, End) indices of preallocated
/// preprocessed entities that \arg Range encompasses.
std::pair<unsigned, unsigned>
    ASTReader::findPreprocessedEntitiesInRange(SourceRange Range) {}

/// Optionally returns true or false if the preallocated preprocessed
/// entity with index \arg Index came from file \arg FID.
std::optional<bool> ASTReader::isPreprocessedEntityInFileID(unsigned Index,
                                                            FileID FID) {}

namespace {

  /// Visitor used to search for information about a header file.
  class HeaderFileInfoVisitor {};

} // namespace

HeaderFileInfo ASTReader::GetHeaderFileInfo(FileEntryRef FE) {}

void ASTReader::ReadPragmaDiagnosticMappings(DiagnosticsEngine &Diag) {}

/// Get the correct cursor and offset for loading a type.
ASTReader::RecordLocation ASTReader::TypeCursorForIndex(TypeID ID) {}

static std::optional<Type::TypeClass> getTypeClassForCode(TypeCode code) {}

/// Read and return the type with the given index..
///
/// The index is the type ID, shifted and minus the number of predefs. This
/// routine actually reads the record corresponding to the type at the given
/// location. It is a helper routine for GetType, which deals with reading type
/// IDs.
QualType ASTReader::readTypeRecord(TypeID ID) {}

namespace clang {

class TypeLocReader : public TypeLocVisitor<TypeLocReader> {};

} // namespace clang

void TypeLocReader::VisitQualifiedTypeLoc(QualifiedTypeLoc TL) {}

void TypeLocReader::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) {}

void TypeLocReader::VisitComplexTypeLoc(ComplexTypeLoc TL) {}

void TypeLocReader::VisitPointerTypeLoc(PointerTypeLoc TL) {}

void TypeLocReader::VisitDecayedTypeLoc(DecayedTypeLoc TL) {}

void TypeLocReader::VisitAdjustedTypeLoc(AdjustedTypeLoc TL) {}

void TypeLocReader::VisitArrayParameterTypeLoc(ArrayParameterTypeLoc TL) {}

void TypeLocReader::VisitMacroQualifiedTypeLoc(MacroQualifiedTypeLoc TL) {}

void TypeLocReader::VisitBlockPointerTypeLoc(BlockPointerTypeLoc TL) {}

void TypeLocReader::VisitLValueReferenceTypeLoc(LValueReferenceTypeLoc TL) {}

void TypeLocReader::VisitRValueReferenceTypeLoc(RValueReferenceTypeLoc TL) {}

void TypeLocReader::VisitMemberPointerTypeLoc(MemberPointerTypeLoc TL) {}

void TypeLocReader::VisitArrayTypeLoc(ArrayTypeLoc TL) {}

void TypeLocReader::VisitConstantArrayTypeLoc(ConstantArrayTypeLoc TL) {}

void TypeLocReader::VisitIncompleteArrayTypeLoc(IncompleteArrayTypeLoc TL) {}

void TypeLocReader::VisitVariableArrayTypeLoc(VariableArrayTypeLoc TL) {}

void TypeLocReader::VisitDependentSizedArrayTypeLoc(
                                            DependentSizedArrayTypeLoc TL) {}

void TypeLocReader::VisitDependentAddressSpaceTypeLoc(
    DependentAddressSpaceTypeLoc TL) {}

void TypeLocReader::VisitDependentSizedExtVectorTypeLoc(
                                        DependentSizedExtVectorTypeLoc TL) {}

void TypeLocReader::VisitVectorTypeLoc(VectorTypeLoc TL) {}

void TypeLocReader::VisitDependentVectorTypeLoc(
    DependentVectorTypeLoc TL) {}

void TypeLocReader::VisitExtVectorTypeLoc(ExtVectorTypeLoc TL) {}

void TypeLocReader::VisitConstantMatrixTypeLoc(ConstantMatrixTypeLoc TL) {}

void TypeLocReader::VisitDependentSizedMatrixTypeLoc(
    DependentSizedMatrixTypeLoc TL) {}

void TypeLocReader::VisitFunctionTypeLoc(FunctionTypeLoc TL) {}

void TypeLocReader::VisitFunctionProtoTypeLoc(FunctionProtoTypeLoc TL) {}

void TypeLocReader::VisitFunctionNoProtoTypeLoc(FunctionNoProtoTypeLoc TL) {}

void TypeLocReader::VisitUnresolvedUsingTypeLoc(UnresolvedUsingTypeLoc TL) {}

void TypeLocReader::VisitUsingTypeLoc(UsingTypeLoc TL) {}

void TypeLocReader::VisitTypedefTypeLoc(TypedefTypeLoc TL) {}

void TypeLocReader::VisitTypeOfExprTypeLoc(TypeOfExprTypeLoc TL) {}

void TypeLocReader::VisitTypeOfTypeLoc(TypeOfTypeLoc TL) {}

void TypeLocReader::VisitDecltypeTypeLoc(DecltypeTypeLoc TL) {}

void TypeLocReader::VisitPackIndexingTypeLoc(PackIndexingTypeLoc TL) {}

void TypeLocReader::VisitUnaryTransformTypeLoc(UnaryTransformTypeLoc TL) {}

ConceptReference *ASTRecordReader::readConceptReference() {}

void TypeLocReader::VisitAutoTypeLoc(AutoTypeLoc TL) {}

void TypeLocReader::VisitDeducedTemplateSpecializationTypeLoc(
    DeducedTemplateSpecializationTypeLoc TL) {}

void TypeLocReader::VisitRecordTypeLoc(RecordTypeLoc TL) {}

void TypeLocReader::VisitEnumTypeLoc(EnumTypeLoc TL) {}

void TypeLocReader::VisitAttributedTypeLoc(AttributedTypeLoc TL) {}

void TypeLocReader::VisitCountAttributedTypeLoc(CountAttributedTypeLoc TL) {}

void TypeLocReader::VisitBTFTagAttributedTypeLoc(BTFTagAttributedTypeLoc TL) {}

void TypeLocReader::VisitHLSLAttributedResourceTypeLoc(
    HLSLAttributedResourceTypeLoc TL) {}

void TypeLocReader::VisitTemplateTypeParmTypeLoc(TemplateTypeParmTypeLoc TL) {}

void TypeLocReader::VisitSubstTemplateTypeParmTypeLoc(
                                            SubstTemplateTypeParmTypeLoc TL) {}

void TypeLocReader::VisitSubstTemplateTypeParmPackTypeLoc(
                                          SubstTemplateTypeParmPackTypeLoc TL) {}

void TypeLocReader::VisitTemplateSpecializationTypeLoc(
                                           TemplateSpecializationTypeLoc TL) {}

void TypeLocReader::VisitParenTypeLoc(ParenTypeLoc TL) {}

void TypeLocReader::VisitElaboratedTypeLoc(ElaboratedTypeLoc TL) {}

void TypeLocReader::VisitInjectedClassNameTypeLoc(InjectedClassNameTypeLoc TL) {}

void TypeLocReader::VisitDependentNameTypeLoc(DependentNameTypeLoc TL) {}

void TypeLocReader::VisitDependentTemplateSpecializationTypeLoc(
       DependentTemplateSpecializationTypeLoc TL) {}

void TypeLocReader::VisitPackExpansionTypeLoc(PackExpansionTypeLoc TL) {}

void TypeLocReader::VisitObjCInterfaceTypeLoc(ObjCInterfaceTypeLoc TL) {}

void TypeLocReader::VisitObjCTypeParamTypeLoc(ObjCTypeParamTypeLoc TL) {}

void TypeLocReader::VisitObjCObjectTypeLoc(ObjCObjectTypeLoc TL) {}

void TypeLocReader::VisitObjCObjectPointerTypeLoc(ObjCObjectPointerTypeLoc TL) {}

void TypeLocReader::VisitAtomicTypeLoc(AtomicTypeLoc TL) {}

void TypeLocReader::VisitPipeTypeLoc(PipeTypeLoc TL) {}

void TypeLocReader::VisitBitIntTypeLoc(clang::BitIntTypeLoc TL) {}
void TypeLocReader::VisitDependentBitIntTypeLoc(
    clang::DependentBitIntTypeLoc TL) {}

void ASTRecordReader::readTypeLoc(TypeLoc TL, LocSeq *ParentSeq) {}

TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() {}

static unsigned getIndexForTypeID(serialization::TypeID ID) {}

static unsigned getModuleFileIndexForTypeID(serialization::TypeID ID) {}

static bool isPredefinedType(serialization::TypeID ID) {}

std::pair<ModuleFile *, unsigned>
ASTReader::translateTypeIDToIndex(serialization::TypeID ID) const {}

QualType ASTReader::GetType(TypeID ID) {}

QualType ASTReader::getLocalType(ModuleFile &F, LocalTypeID LocalID) {}

serialization::TypeID ASTReader::getGlobalTypeID(ModuleFile &F,
                                                 LocalTypeID LocalID) const {}

TemplateArgumentLocInfo
ASTRecordReader::readTemplateArgumentLocInfo(TemplateArgument::ArgKind Kind) {}

TemplateArgumentLoc ASTRecordReader::readTemplateArgumentLoc() {}

void ASTRecordReader::readTemplateArgumentListInfo(
    TemplateArgumentListInfo &Result) {}

const ASTTemplateArgumentListInfo *
ASTRecordReader::readASTTemplateArgumentListInfo() {}

Decl *ASTReader::GetExternalDecl(GlobalDeclID ID) {}

void ASTReader::CompleteRedeclChain(const Decl *D) {}

CXXCtorInitializer **
ASTReader::GetExternalCXXCtorInitializers(uint64_t Offset) {}

CXXBaseSpecifier *ASTReader::GetExternalCXXBaseSpecifiers(uint64_t Offset) {}

GlobalDeclID ASTReader::getGlobalDeclID(ModuleFile &F,
                                        LocalDeclID LocalID) const {}

bool ASTReader::isDeclIDFromModule(GlobalDeclID ID, ModuleFile &M) const {}

ModuleFile *ASTReader::getOwningModuleFile(GlobalDeclID ID) const {}

ModuleFile *ASTReader::getOwningModuleFile(const Decl *D) const {}

SourceLocation ASTReader::getSourceLocationForDeclID(GlobalDeclID ID) {}

Decl *ASTReader::getPredefinedDecl(PredefinedDeclIDs ID) {}

unsigned ASTReader::translateGlobalDeclIDToIndex(GlobalDeclID GlobalID) const {}

Decl *ASTReader::GetExistingDecl(GlobalDeclID ID) {}

Decl *ASTReader::GetDecl(GlobalDeclID ID) {}

LocalDeclID ASTReader::mapGlobalIDToModuleFileGlobalID(ModuleFile &M,
                                                       GlobalDeclID GlobalID) {}

GlobalDeclID ASTReader::ReadDeclID(ModuleFile &F, const RecordDataImpl &Record,
                                   unsigned &Idx) {}

/// 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
/// LazyOffsetPtr (which is used by Decls for the body of functions, etc).
Stmt *ASTReader::GetExternalDeclStmt(uint64_t Offset) {}

void ASTReader::FindExternalLexicalDecls(
    const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
    SmallVectorImpl<Decl *> &Decls) {}

namespace {

class UnalignedDeclIDComp {};

} // namespace

void ASTReader::FindFileRegionDecls(FileID File,
                                    unsigned Offset, unsigned Length,
                                    SmallVectorImpl<Decl *> &Decls) {}

bool
ASTReader::FindExternalVisibleDeclsByName(const DeclContext *DC,
                                          DeclarationName Name) {}

void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {}

const serialization::reader::DeclContextLookupTable *
ASTReader::getLoadedLookupTables(DeclContext *Primary) const {}

/// Under non-PCH compilation the consumer receives the objc methods
/// before receiving the implementation, and codegen depends on this.
/// We simulate this by deserializing and passing to consumer the methods of the
/// implementation before passing the deserialized implementation decl.
static void PassObjCImplDeclToConsumer(ObjCImplDecl *ImplD,
                                       ASTConsumer *Consumer) {}

void ASTReader::PassInterestingDeclToConsumer(Decl *D) {}

void ASTReader::PassVTableToConsumer(CXXRecordDecl *RD) {}

void ASTReader::StartTranslationUnit(ASTConsumer *Consumer) {}

void ASTReader::PrintStats() {}

template<typename Key, typename ModuleFile, unsigned InitialCapacity>
LLVM_DUMP_METHOD static void
dumpModuleIDMap(StringRef Name,
                const ContinuousRangeMap<Key, ModuleFile *,
                                         InitialCapacity> &Map) {}

LLVM_DUMP_METHOD void ASTReader::dump() {}

/// Return the amount of memory used by memory buffers, breaking down
/// by heap-backed versus mmap'ed memory.
void ASTReader::getMemoryBufferSizes(MemoryBufferSizes &sizes) const {}

void ASTReader::InitializeSema(Sema &S) {}

void ASTReader::UpdateSema() {}

IdentifierInfo *ASTReader::get(StringRef Name) {}

namespace clang {

  /// An identifier-lookup iterator that enumerates all of the
  /// identifiers stored within a set of AST files.
  class ASTIdentifierIterator : public IdentifierIterator {};

} // namespace clang

ASTIdentifierIterator::ASTIdentifierIterator(const ASTReader &Reader,
                                             bool SkipModules)
    :{}

StringRef ASTIdentifierIterator::Next() {}

namespace {

/// A utility for appending two IdentifierIterators.
class ChainedIdentifierIterator : public IdentifierIterator {};

} // namespace

IdentifierIterator *ASTReader::getIdentifiers() {}

namespace clang {
namespace serialization {

  class ReadMethodPoolVisitor {};

} // namespace serialization
} // namespace clang

/// Add the given set of methods to the method list.
static void addMethodsToPool(Sema &S, ArrayRef<ObjCMethodDecl *> Methods,
                             ObjCMethodList &List) {}

void ASTReader::ReadMethodPool(Selector Sel) {}

void ASTReader::updateOutOfDateSelector(Selector Sel) {}

void ASTReader::ReadKnownNamespaces(
                          SmallVectorImpl<NamespaceDecl *> &Namespaces) {}

void ASTReader::ReadUndefinedButUsed(
    llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) {}

void ASTReader::ReadMismatchingDeleteExpressions(llvm::MapVector<
    FieldDecl *, llvm::SmallVector<std::pair<SourceLocation, bool>, 4>> &
                                                     Exprs) {}

void ASTReader::ReadTentativeDefinitions(
                  SmallVectorImpl<VarDecl *> &TentativeDefs) {}

void ASTReader::ReadUnusedFileScopedDecls(
                               SmallVectorImpl<const DeclaratorDecl *> &Decls) {}

void ASTReader::ReadDelegatingConstructors(
                                 SmallVectorImpl<CXXConstructorDecl *> &Decls) {}

void ASTReader::ReadExtVectorDecls(SmallVectorImpl<TypedefNameDecl *> &Decls) {}

void ASTReader::ReadUnusedLocalTypedefNameCandidates(
    llvm::SmallSetVector<const TypedefNameDecl *, 4> &Decls) {}

void ASTReader::ReadDeclsToCheckForDeferredDiags(
    llvm::SmallSetVector<Decl *, 4> &Decls) {}

void ASTReader::ReadReferencedSelectors(
       SmallVectorImpl<std::pair<Selector, SourceLocation>> &Sels) {}

void ASTReader::ReadWeakUndeclaredIdentifiers(
       SmallVectorImpl<std::pair<IdentifierInfo *, WeakInfo>> &WeakIDs) {}

void ASTReader::ReadUsedVTables(SmallVectorImpl<ExternalVTableUse> &VTables) {}

void ASTReader::ReadPendingInstantiations(
       SmallVectorImpl<std::pair<ValueDecl *, SourceLocation>> &Pending) {}

void ASTReader::ReadLateParsedTemplates(
    llvm::MapVector<const FunctionDecl *, std::unique_ptr<LateParsedTemplate>>
        &LPTMap) {}

void ASTReader::AssignedLambdaNumbering(CXXRecordDecl *Lambda) {}

void ASTReader::LoadSelector(Selector Sel) {}

void ASTReader::SetIdentifierInfo(IdentifierID ID, IdentifierInfo *II) {}

/// Set the globally-visible declarations associated with the given
/// identifier.
///
/// If the AST reader is currently in a state where the given declaration IDs
/// cannot safely be resolved, they are queued until it is safe to resolve
/// them.
///
/// \param II an IdentifierInfo that refers to one or more globally-visible
/// declarations.
///
/// \param DeclIDs the set of declaration IDs with the name @p II that are
/// visible at global scope.
///
/// \param Decls if non-null, this vector will be populated with the set of
/// deserialized declarations. These declarations will not be pushed into
/// scope.
void ASTReader::SetGloballyVisibleDecls(
    IdentifierInfo *II, const SmallVectorImpl<GlobalDeclID> &DeclIDs,
    SmallVectorImpl<Decl *> *Decls) {}

std::pair<ModuleFile *, unsigned>
ASTReader::translateIdentifierIDToIndex(IdentifierID ID) const {}

IdentifierInfo *ASTReader::DecodeIdentifierInfo(IdentifierID ID) {}

IdentifierInfo *ASTReader::getLocalIdentifier(ModuleFile &M, uint64_t LocalID) {}

IdentifierID ASTReader::getGlobalIdentifierID(ModuleFile &M, uint64_t LocalID) {}

MacroInfo *ASTReader::getMacro(MacroID ID) {}

MacroID ASTReader::getGlobalMacroID(ModuleFile &M, unsigned LocalID) {}

serialization::SubmoduleID
ASTReader::getGlobalSubmoduleID(ModuleFile &M, unsigned LocalID) const {}

Module *ASTReader::getSubmodule(SubmoduleID GlobalID) {}

Module *ASTReader::getModule(unsigned ID) {}

ModuleFile *ASTReader::getLocalModuleFile(ModuleFile &M, unsigned ID) const {}

unsigned ASTReader::getModuleFileID(ModuleFile *M) {}

std::optional<ASTSourceDescriptor> ASTReader::getSourceDescriptor(unsigned ID) {}

ExternalASTSource::ExtKind ASTReader::hasExternalDefinitions(const Decl *FD) {}

Selector ASTReader::getLocalSelector(ModuleFile &M, unsigned LocalID) {}

Selector ASTReader::DecodeSelector(serialization::SelectorID ID) {}

Selector ASTReader::GetExternalSelector(serialization::SelectorID ID) {}

uint32_t ASTReader::GetNumExternalSelectors() {}

serialization::SelectorID
ASTReader::getGlobalSelectorID(ModuleFile &M, unsigned LocalID) const {}

DeclarationNameLoc
ASTRecordReader::readDeclarationNameLoc(DeclarationName Name) {}

DeclarationNameInfo ASTRecordReader::readDeclarationNameInfo() {}

TypeCoupledDeclRefInfo ASTRecordReader::readTypeCoupledDeclRefInfo() {}

void ASTRecordReader::readQualifierInfo(QualifierInfo &Info) {}

TemplateParameterList *
ASTRecordReader::readTemplateParameterList() {}

void ASTRecordReader::readTemplateArgumentList(
                        SmallVectorImpl<TemplateArgument> &TemplArgs,
                        bool Canonicalize) {}

/// Read a UnresolvedSet structure.
void ASTRecordReader::readUnresolvedSet(LazyASTUnresolvedSet &Set) {}

CXXBaseSpecifier
ASTRecordReader::readCXXBaseSpecifier() {}

CXXCtorInitializer **
ASTRecordReader::readCXXCtorInitializers() {}

NestedNameSpecifierLoc
ASTRecordReader::readNestedNameSpecifierLoc() {}

SourceRange ASTReader::ReadSourceRange(ModuleFile &F, const RecordData &Record,
                                       unsigned &Idx, LocSeq *Seq) {}

llvm::BitVector ASTReader::ReadBitVector(const RecordData &Record,
                                         const StringRef Blob) {}

/// Read a floating-point value
llvm::APFloat ASTRecordReader::readAPFloat(const llvm::fltSemantics &Sem) {}

// Read a string
std::string ASTReader::ReadString(const RecordDataImpl &Record, unsigned &Idx) {}

std::string ASTReader::ReadPath(ModuleFile &F, const RecordData &Record,
                                unsigned &Idx) {}

std::string ASTReader::ReadPath(StringRef BaseDirectory,
                                const RecordData &Record, unsigned &Idx) {}

VersionTuple ASTReader::ReadVersionTuple(const RecordData &Record,
                                         unsigned &Idx) {}

CXXTemporary *ASTReader::ReadCXXTemporary(ModuleFile &F,
                                          const RecordData &Record,
                                          unsigned &Idx) {}

DiagnosticBuilder ASTReader::Diag(unsigned DiagID) const {}

DiagnosticBuilder ASTReader::Diag(SourceLocation Loc, unsigned DiagID) const {}

void ASTReader::warnStackExhausted(SourceLocation Loc) {}

/// Retrieve the identifier table associated with the
/// preprocessor.
IdentifierTable &ASTReader::getIdentifierTable() {}

/// Record that the given ID maps to the given switch-case
/// statement.
void ASTReader::RecordSwitchCaseID(SwitchCase *SC, unsigned ID) {}

/// Retrieve the switch-case statement with the given ID.
SwitchCase *ASTReader::getSwitchCaseWithID(unsigned ID) {}

void ASTReader::ClearSwitchCaseIDs() {}

void ASTReader::ReadComments() {}

void ASTReader::visitInputFileInfos(
    serialization::ModuleFile &MF, bool IncludeSystem,
    llvm::function_ref<void(const serialization::InputFileInfo &IFI,
                            bool IsSystem)>
        Visitor) {}

void ASTReader::visitInputFiles(serialization::ModuleFile &MF,
                                bool IncludeSystem, bool Complain,
                    llvm::function_ref<void(const serialization::InputFile &IF,
                                            bool isSystem)> Visitor) {}

void ASTReader::visitTopLevelModuleMaps(
    serialization::ModuleFile &MF,
    llvm::function_ref<void(FileEntryRef FE)> Visitor) {}

void ASTReader::finishPendingActions() {}

void ASTReader::diagnoseOdrViolations() {}

void ASTReader::StartedDeserializing() {}

void ASTReader::FinishedDeserializing() {}

void ASTReader::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) {}

ASTReader::ASTReader(Preprocessor &PP, InMemoryModuleCache &ModuleCache,
                     ASTContext *Context,
                     const PCHContainerReader &PCHContainerRdr,
                     ArrayRef<std::shared_ptr<ModuleFileExtension>> Extensions,
                     StringRef isysroot,
                     DisableValidationForModuleKind DisableValidationKind,
                     bool AllowASTWithCompilerErrors,
                     bool AllowConfigurationMismatch, bool ValidateSystemInputs,
                     bool ValidateASTInputFilesContent, bool UseGlobalIndex,
                     std::unique_ptr<llvm::Timer> ReadTimer)
    :{}

ASTReader::~ASTReader() {}

IdentifierResolver &ASTReader::getIdResolver() {}

Expected<unsigned> ASTRecordReader::readRecord(llvm::BitstreamCursor &Cursor,
                                               unsigned AbbrevID) {}
//===----------------------------------------------------------------------===//
//// OMPClauseReader implementation
////===----------------------------------------------------------------------===//

// This has to be in namespace clang because it's friended by all
// of the OMP clauses.
namespace clang {

class OMPClauseReader : public OMPClauseVisitor<OMPClauseReader> {};

} // end namespace clang

OMPClause *ASTRecordReader::readOMPClause() {}

OMPClause *OMPClauseReader::readClause() {}

void OMPClauseReader::VisitOMPClauseWithPreInit(OMPClauseWithPreInit *C) {}

void OMPClauseReader::VisitOMPClauseWithPostUpdate(OMPClauseWithPostUpdate *C) {}

void OMPClauseReader::VisitOMPIfClause(OMPIfClause *C) {}

void OMPClauseReader::VisitOMPFinalClause(OMPFinalClause *C) {}

void OMPClauseReader::VisitOMPNumThreadsClause(OMPNumThreadsClause *C) {}

void OMPClauseReader::VisitOMPSafelenClause(OMPSafelenClause *C) {}

void OMPClauseReader::VisitOMPSimdlenClause(OMPSimdlenClause *C) {}

void OMPClauseReader::VisitOMPSizesClause(OMPSizesClause *C) {}

void OMPClauseReader::VisitOMPFullClause(OMPFullClause *C) {}

void OMPClauseReader::VisitOMPPartialClause(OMPPartialClause *C) {}

void OMPClauseReader::VisitOMPAllocatorClause(OMPAllocatorClause *C) {}

void OMPClauseReader::VisitOMPCollapseClause(OMPCollapseClause *C) {}

void OMPClauseReader::VisitOMPDefaultClause(OMPDefaultClause *C) {}

void OMPClauseReader::VisitOMPProcBindClause(OMPProcBindClause *C) {}

void OMPClauseReader::VisitOMPScheduleClause(OMPScheduleClause *C) {}

void OMPClauseReader::VisitOMPOrderedClause(OMPOrderedClause *C) {}

void OMPClauseReader::VisitOMPDetachClause(OMPDetachClause *C) {}

void OMPClauseReader::VisitOMPNowaitClause(OMPNowaitClause *) {}

void OMPClauseReader::VisitOMPUntiedClause(OMPUntiedClause *) {}

void OMPClauseReader::VisitOMPMergeableClause(OMPMergeableClause *) {}

void OMPClauseReader::VisitOMPReadClause(OMPReadClause *) {}

void OMPClauseReader::VisitOMPWriteClause(OMPWriteClause *) {}

void OMPClauseReader::VisitOMPUpdateClause(OMPUpdateClause *C) {}

void OMPClauseReader::VisitOMPCaptureClause(OMPCaptureClause *) {}

void OMPClauseReader::VisitOMPCompareClause(OMPCompareClause *) {}

// Read the parameter of fail clause. This will have been saved when
// OMPClauseWriter is called.
void OMPClauseReader::VisitOMPFailClause(OMPFailClause *C) {}

void OMPClauseReader::VisitOMPAbsentClause(OMPAbsentClause *C) {}

void OMPClauseReader::VisitOMPHoldsClause(OMPHoldsClause *C) {}

void OMPClauseReader::VisitOMPContainsClause(OMPContainsClause *C) {}

void OMPClauseReader::VisitOMPNoOpenMPClause(OMPNoOpenMPClause *) {}

void OMPClauseReader::VisitOMPNoOpenMPRoutinesClause(
    OMPNoOpenMPRoutinesClause *) {}

void OMPClauseReader::VisitOMPNoParallelismClause(OMPNoParallelismClause *) {}

void OMPClauseReader::VisitOMPSeqCstClause(OMPSeqCstClause *) {}

void OMPClauseReader::VisitOMPAcqRelClause(OMPAcqRelClause *) {}

void OMPClauseReader::VisitOMPAcquireClause(OMPAcquireClause *) {}

void OMPClauseReader::VisitOMPReleaseClause(OMPReleaseClause *) {}

void OMPClauseReader::VisitOMPRelaxedClause(OMPRelaxedClause *) {}

void OMPClauseReader::VisitOMPWeakClause(OMPWeakClause *) {}

void OMPClauseReader::VisitOMPThreadsClause(OMPThreadsClause *) {}

void OMPClauseReader::VisitOMPSIMDClause(OMPSIMDClause *) {}

void OMPClauseReader::VisitOMPNogroupClause(OMPNogroupClause *) {}

void OMPClauseReader::VisitOMPInitClause(OMPInitClause *C) {}

void OMPClauseReader::VisitOMPUseClause(OMPUseClause *C) {}

void OMPClauseReader::VisitOMPDestroyClause(OMPDestroyClause *C) {}

void OMPClauseReader::VisitOMPNovariantsClause(OMPNovariantsClause *C) {}

void OMPClauseReader::VisitOMPNocontextClause(OMPNocontextClause *C) {}

void OMPClauseReader::VisitOMPUnifiedAddressClause(OMPUnifiedAddressClause *) {}

void OMPClauseReader::VisitOMPUnifiedSharedMemoryClause(
    OMPUnifiedSharedMemoryClause *) {}

void OMPClauseReader::VisitOMPReverseOffloadClause(OMPReverseOffloadClause *) {}

void
OMPClauseReader::VisitOMPDynamicAllocatorsClause(OMPDynamicAllocatorsClause *) {}

void OMPClauseReader::VisitOMPAtomicDefaultMemOrderClause(
    OMPAtomicDefaultMemOrderClause *C) {}

void OMPClauseReader::VisitOMPAtClause(OMPAtClause *C) {}

void OMPClauseReader::VisitOMPSeverityClause(OMPSeverityClause *C) {}

void OMPClauseReader::VisitOMPMessageClause(OMPMessageClause *C) {}

void OMPClauseReader::VisitOMPPrivateClause(OMPPrivateClause *C) {}

void OMPClauseReader::VisitOMPFirstprivateClause(OMPFirstprivateClause *C) {}

void OMPClauseReader::VisitOMPLastprivateClause(OMPLastprivateClause *C) {}

void OMPClauseReader::VisitOMPSharedClause(OMPSharedClause *C) {}

void OMPClauseReader::VisitOMPReductionClause(OMPReductionClause *C) {}

void OMPClauseReader::VisitOMPTaskReductionClause(OMPTaskReductionClause *C) {}

void OMPClauseReader::VisitOMPInReductionClause(OMPInReductionClause *C) {}

void OMPClauseReader::VisitOMPLinearClause(OMPLinearClause *C) {}

void OMPClauseReader::VisitOMPAlignedClause(OMPAlignedClause *C) {}

void OMPClauseReader::VisitOMPCopyinClause(OMPCopyinClause *C) {}

void OMPClauseReader::VisitOMPCopyprivateClause(OMPCopyprivateClause *C) {}

void OMPClauseReader::VisitOMPFlushClause(OMPFlushClause *C) {}

void OMPClauseReader::VisitOMPDepobjClause(OMPDepobjClause *C) {}

void OMPClauseReader::VisitOMPDependClause(OMPDependClause *C) {}

void OMPClauseReader::VisitOMPDeviceClause(OMPDeviceClause *C) {}

void OMPClauseReader::VisitOMPMapClause(OMPMapClause *C) {}

void OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) {}

void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) {}

void OMPClauseReader::VisitOMPThreadLimitClause(OMPThreadLimitClause *C) {}

void OMPClauseReader::VisitOMPPriorityClause(OMPPriorityClause *C) {}

void OMPClauseReader::VisitOMPGrainsizeClause(OMPGrainsizeClause *C) {}

void OMPClauseReader::VisitOMPNumTasksClause(OMPNumTasksClause *C) {}

void OMPClauseReader::VisitOMPHintClause(OMPHintClause *C) {}

void OMPClauseReader::VisitOMPDistScheduleClause(OMPDistScheduleClause *C) {}

void OMPClauseReader::VisitOMPDefaultmapClause(OMPDefaultmapClause *C) {}

void OMPClauseReader::VisitOMPToClause(OMPToClause *C) {}

void OMPClauseReader::VisitOMPFromClause(OMPFromClause *C) {}

void OMPClauseReader::VisitOMPUseDevicePtrClause(OMPUseDevicePtrClause *C) {}

void OMPClauseReader::VisitOMPUseDeviceAddrClause(OMPUseDeviceAddrClause *C) {}

void OMPClauseReader::VisitOMPIsDevicePtrClause(OMPIsDevicePtrClause *C) {}

void OMPClauseReader::VisitOMPHasDeviceAddrClause(OMPHasDeviceAddrClause *C) {}

void OMPClauseReader::VisitOMPNontemporalClause(OMPNontemporalClause *C) {}

void OMPClauseReader::VisitOMPInclusiveClause(OMPInclusiveClause *C) {}

void OMPClauseReader::VisitOMPExclusiveClause(OMPExclusiveClause *C) {}

void OMPClauseReader::VisitOMPUsesAllocatorsClause(OMPUsesAllocatorsClause *C) {}

void OMPClauseReader::VisitOMPAffinityClause(OMPAffinityClause *C) {}

void OMPClauseReader::VisitOMPOrderClause(OMPOrderClause *C) {}

void OMPClauseReader::VisitOMPFilterClause(OMPFilterClause *C) {}

void OMPClauseReader::VisitOMPBindClause(OMPBindClause *C) {}

void OMPClauseReader::VisitOMPAlignClause(OMPAlignClause *C) {}

void OMPClauseReader::VisitOMPXDynCGroupMemClause(OMPXDynCGroupMemClause *C) {}

void OMPClauseReader::VisitOMPDoacrossClause(OMPDoacrossClause *C) {}

void OMPClauseReader::VisitOMPXAttributeClause(OMPXAttributeClause *C) {}

void OMPClauseReader::VisitOMPXBareClause(OMPXBareClause *C) {}

OMPTraitInfo *ASTRecordReader::readOMPTraitInfo() {}

void ASTRecordReader::readOMPChildren(OMPChildren *Data) {}

SmallVector<Expr *> ASTRecordReader::readOpenACCVarList() {}

SmallVector<Expr *> ASTRecordReader::readOpenACCIntExprList() {}

OpenACCClause *ASTRecordReader::readOpenACCClause() {}

void ASTRecordReader::readOpenACCClauseList(
    MutableArrayRef<const OpenACCClause *> Clauses) {}