clang  9.0.0svn
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::ASTImporter Class Reference

Imports selected nodes from one AST context into another context, merging AST nodes where appropriate. More...

#include "clang/AST/ASTImporter.h"

Public Types

using NonEquivalentDeclSet = llvm::DenseSet< std::pair< Decl *, Decl * > >
 
using ImportedCXXBaseSpecifierMap = llvm::DenseMap< const CXXBaseSpecifier *, CXXBaseSpecifier * >
 

Public Member Functions

 ASTImporter (ASTContext &ToContext, FileManager &ToFileManager, ASTContext &FromContext, FileManager &FromFileManager, bool MinimalImport, ASTImporterLookupTable *LookupTable=nullptr)
 
virtual ~ASTImporter ()
 
bool isMinimalImport () const
 Whether the importer will perform a minimal import, creating to-be-completed forward declarations when possible. More...
 
template<typename ImportT >
LLVM_NODISCARD llvm::Error importInto (ImportT &To, const ImportT &From)
 Import the given object, returns the result. More...
 
llvm::Expected< QualTypeImport_New (QualType FromT)
 Import the given type from the "from" context into the "to" context. More...
 
QualType Import (QualType FromT)
 
llvm::Expected< TypeSourceInfo * > Import_New (TypeSourceInfo *FromTSI)
 Import the given type source information from the "from" context into the "to" context. More...
 
TypeSourceInfoImport (TypeSourceInfo *FromTSI)
 
llvm::Expected< Attr * > Import_New (const Attr *FromAttr)
 Import the given attribute from the "from" context into the "to" context. More...
 
AttrImport (const Attr *FromAttr)
 
llvm::Expected< Decl * > Import_New (Decl *FromD)
 Import the given declaration from the "from" context into the "to" context. More...
 
llvm::Expected< Decl * > Import_New (const Decl *FromD)
 
DeclImport (Decl *FromD)
 
DeclImport (const Decl *FromD)
 
DeclGetAlreadyImportedOrNull (const Decl *FromD) const
 Return the copy of the given declaration in the "to" context if it has already been imported from the "from" context. More...
 
TranslationUnitDeclGetFromTU (Decl *ToD)
 Return the translation unit from where the declaration was imported. More...
 
llvm::Expected< DeclContext * > ImportContext (DeclContext *FromDC)
 Import the given declaration context from the "from" AST context into the "to" AST context. More...
 
llvm::Expected< Expr * > Import_New (Expr *FromE)
 Import the given expression from the "from" context into the "to" context. More...
 
ExprImport (Expr *FromE)
 
llvm::Expected< Stmt * > Import_New (Stmt *FromS)
 Import the given statement from the "from" context into the "to" context. More...
 
StmtImport (Stmt *FromS)
 
llvm::Expected< NestedNameSpecifier * > Import_New (NestedNameSpecifier *FromNNS)
 Import the given nested-name-specifier from the "from" context into the "to" context. More...
 
NestedNameSpecifierImport (NestedNameSpecifier *FromNNS)
 
llvm::Expected< NestedNameSpecifierLocImport_New (NestedNameSpecifierLoc FromNNS)
 Import the given nested-name-specifier-loc from the "from" context into the "to" context. More...
 
NestedNameSpecifierLoc Import (NestedNameSpecifierLoc FromNNS)
 
llvm::Expected< TemplateNameImport_New (TemplateName From)
 Import the given template name from the "from" context into the "to" context, or the import error. More...
 
TemplateName Import (TemplateName From)
 
llvm::Expected< SourceLocationImport_New (SourceLocation FromLoc)
 Import the given source location from the "from" context into the "to" context. More...
 
SourceLocation Import (SourceLocation FromLoc)
 
llvm::Expected< SourceRangeImport_New (SourceRange FromRange)
 Import the given source range from the "from" context into the "to" context. More...
 
SourceRange Import (SourceRange FromRange)
 
llvm::Expected< DeclarationNameImport_New (DeclarationName FromName)
 Import the given declaration name from the "from" context into the "to" context. More...
 
DeclarationName Import (DeclarationName FromName)
 
IdentifierInfoImport (const IdentifierInfo *FromId)
 Import the given identifier from the "from" context into the "to" context. More...
 
llvm::Expected< SelectorImport_New (Selector FromSel)
 Import the given Objective-C selector from the "from" context into the "to" context. More...
 
Selector Import (Selector FromSel)
 
llvm::Expected< FileIDImport_New (FileID)
 Import the given file ID from the "from" context into the "to" context. More...
 
FileID Import (FileID)
 
llvm::Expected< CXXCtorInitializer * > Import_New (CXXCtorInitializer *FromInit)
 Import the given C++ constructor initializer from the "from" context into the "to" context. More...
 
CXXCtorInitializerImport (CXXCtorInitializer *FromInit)
 
llvm::Expected< CXXBaseSpecifier * > Import_New (const CXXBaseSpecifier *FromSpec)
 Import the given CXXBaseSpecifier from the "from" context into the "to" context. More...
 
CXXBaseSpecifierImport (const CXXBaseSpecifier *FromSpec)
 
LLVM_NODISCARD llvm::Error ImportDefinition_New (Decl *From)
 Import the definition of the given declaration, including all of the declarations it contains. More...
 
void ImportDefinition (Decl *From)
 
virtual DeclarationName HandleNameConflict (DeclarationName Name, DeclContext *DC, unsigned IDNS, NamedDecl **Decls, unsigned NumDecls)
 Cope with a name conflict when importing a declaration into the given context. More...
 
ASTContextgetToContext () const
 Retrieve the context that AST nodes are being imported into. More...
 
ASTContextgetFromContext () const
 Retrieve the context that AST nodes are being imported from. More...
 
FileManagergetToFileManager () const
 Retrieve the file manager that AST nodes are being imported into. More...
 
FileManagergetFromFileManager () const
 Retrieve the file manager that AST nodes are being imported from. More...
 
DiagnosticBuilder ToDiag (SourceLocation Loc, unsigned DiagID)
 Report a diagnostic in the "to" context. More...
 
DiagnosticBuilder FromDiag (SourceLocation Loc, unsigned DiagID)
 Report a diagnostic in the "from" context. More...
 
NonEquivalentDeclSetgetNonEquivalentDecls ()
 Return the set of declarations that we know are not equivalent. More...
 
virtual void CompleteDecl (Decl *D)
 Called for ObjCInterfaceDecl, ObjCProtocolDecl, and TagDecl. More...
 
virtual DeclImported (Decl *From, Decl *To)
 Subclasses can override this function to observe all of the From -> To declaration mappings as they are imported. More...
 
DeclMapImported (Decl *From, Decl *To)
 Store and assign the imported declaration to its counterpart. More...
 
virtual DeclGetOriginalDecl (Decl *To)
 Called by StructuralEquivalenceContext. More...
 
bool IsStructurallyEquivalent (QualType From, QualType To, bool Complain=true)
 Determine whether the given types are structurally equivalent. More...
 
template<>
LLVM_NODISCARD Error importInto (SourceLocation &To, const SourceLocation &From)
 
template<>
LLVM_NODISCARD Error importInto (QualType &To, const QualType &From)
 

Static Public Member Functions

static llvm::Optional< unsigned > getFieldIndex (Decl *F)
 Determine the index of a field in its parent record. More...
 

Friends

class ASTNodeImporter
 

Detailed Description

Imports selected nodes from one AST context into another context, merging AST nodes where appropriate.

Definition at line 83 of file ASTImporter.h.

Member Typedef Documentation

◆ ImportedCXXBaseSpecifierMap

Definition at line 88 of file ASTImporter.h.

◆ NonEquivalentDeclSet

Definition at line 86 of file ASTImporter.h.

Constructor & Destructor Documentation

◆ ASTImporter()

ASTImporter::ASTImporter ( ASTContext ToContext,
FileManager ToFileManager,
ASTContext FromContext,
FileManager FromFileManager,
bool  MinimalImport,
ASTImporterLookupTable LookupTable = nullptr 
)
Parameters
ToContextThe context we'll be importing into.
ToFileManagerThe file manager we'll be importing into.
FromContextThe context we'll be importing from.
FromFileManagerThe file manager we'll be importing into.
MinimalImportIf true, the importer will attempt to import as little as it can, e.g., by importing declarations as forward declarations that can be completed at a later point.
LookupTableThe importer specific lookup table which may be shared amongst several ASTImporter objects. If not set then the original C/C++ lookup is used.

Definition at line 7665 of file ASTImporter.cpp.

References clang::ASTContext::getTranslationUnitDecl(), and ~ASTImporter().

◆ ~ASTImporter()

ASTImporter::~ASTImporter ( )
virtualdefault

Referenced by ASTImporter().

Member Function Documentation

◆ CompleteDecl()

void ASTImporter::CompleteDecl ( Decl D)
virtual

Called for ObjCInterfaceDecl, ObjCProtocolDecl, and TagDecl.

Mark the Decl as complete, filling it in as much as possible.

Parameters
DA declaration in the "to" context.

Definition at line 8531 of file ASTImporter.cpp.

Referenced by ImportContext().

◆ FromDiag()

DiagnosticBuilder ASTImporter::FromDiag ( SourceLocation  Loc,
unsigned  DiagID 
)

Report a diagnostic in the "from" context.

Definition at line 8523 of file ASTImporter.cpp.

References clang::ASTContext::getDiagnostics(), clang::DiagnosticsEngine::notePriorDiagnosticFrom(), and clang::DiagnosticsEngine::Report().

◆ GetAlreadyImportedOrNull()

Decl * ASTImporter::GetAlreadyImportedOrNull ( const Decl FromD) const

Return the copy of the given declaration in the "to" context if it has already been imported from the "from" context.

Otherwise return nullptr.

Definition at line 7793 of file ASTImporter.cpp.

Referenced by Import().

◆ getFieldIndex()

Optional< unsigned > ASTImporter::getFieldIndex ( Decl F)
static

Determine the index of a field in its parent record.

F should be a field (or indirect field) declaration.

Returns
The index of the field in its parent context (starting from 0). On error None is returned (parent context is non-record).

Definition at line 7686 of file ASTImporter.cpp.

References clang::Decl::getDeclContext(), and clang::None.

◆ getFromContext()

ASTContext& clang::ASTImporter::getFromContext ( ) const
inline

Retrieve the context that AST nodes are being imported from.

Definition at line 408 of file ASTImporter.h.

◆ getFromFileManager()

FileManager& clang::ASTImporter::getFromFileManager ( ) const
inline

Retrieve the file manager that AST nodes are being imported from.

Definition at line 414 of file ASTImporter.h.

◆ GetFromTU()

TranslationUnitDecl * ASTImporter::GetFromTU ( Decl ToD)

Return the translation unit from where the declaration was imported.

If it does not exist nullptr is returned.

Definition at line 7801 of file ASTImporter.cpp.

◆ getNonEquivalentDecls()

NonEquivalentDeclSet& clang::ASTImporter::getNonEquivalentDecls ( )
inline

Return the set of declarations that we know are not equivalent.

Definition at line 423 of file ASTImporter.h.

◆ GetOriginalDecl()

virtual Decl* clang::ASTImporter::GetOriginalDecl ( Decl To)
inlinevirtual

Called by StructuralEquivalenceContext.

If a RecordDecl is being compared to another RecordDecl as part of import, completing the other RecordDecl may trigger importation of the first RecordDecl. This happens especially for anonymous structs. If the original of the second RecordDecl can be found, we can complete it without the need for importation, eliminating this loop.

Definition at line 444 of file ASTImporter.h.

References IsStructurallyEquivalent().

◆ getToContext()

ASTContext& clang::ASTImporter::getToContext ( ) const
inline

Retrieve the context that AST nodes are being imported into.

Definition at line 405 of file ASTImporter.h.

◆ getToFileManager()

FileManager& clang::ASTImporter::getToFileManager ( ) const
inline

Retrieve the file manager that AST nodes are being imported into.

Definition at line 411 of file ASTImporter.h.

◆ HandleNameConflict()

DeclarationName ASTImporter::HandleNameConflict ( DeclarationName  Name,
DeclContext DC,
unsigned  IDNS,
NamedDecl **  Decls,
unsigned  NumDecls 
)
virtual

Cope with a name conflict when importing a declaration into the given context.

This routine is invoked whenever there is a name conflict while importing a declaration. The returned name will become the name of the imported declaration. By default, the returned name is the same as the original name, leaving the conflict unresolve such that name lookup for this name is likely to find an ambiguity later.

Subclasses may override this routine to resolve the conflict, e.g., by renaming the declaration being imported.

Parameters
Namethe name of the declaration being imported, which conflicts with other declarations.
DCthe declaration context (in the "to" AST context) in which the name is being imported.
IDNSthe identifier namespace in which the name will be found.
Declsthe set of declarations with the same name as the declaration being imported.
NumDeclsthe number of conflicting declarations in Decls.
Returns
the name that the newly-imported declaration should have.

Definition at line 8507 of file ASTImporter.cpp.

◆ Import() [1/18]

QualType ASTImporter::Import ( QualType  FromT)

◆ Import() [2/18]

TypeSourceInfo * ASTImporter::Import ( TypeSourceInfo FromTSI)

◆ Import() [3/18]

Attr * ASTImporter::Import ( const Attr FromAttr)

◆ Import() [4/18]

Decl * ASTImporter::Import ( Decl FromD)

◆ Import() [5/18]

Decl* clang::ASTImporter::Import ( const Decl FromD)
inline

Definition at line 228 of file ASTImporter.h.

References clang::Error.

◆ Import() [6/18]

Expr * ASTImporter::Import ( Expr FromE)

Definition at line 7913 of file ASTImporter.cpp.

References Import().

◆ Import() [7/18]

Stmt * ASTImporter::Import ( Stmt FromS)

Definition at line 7926 of file ASTImporter.cpp.

◆ Import() [8/18]

NestedNameSpecifier * ASTImporter::Import ( NestedNameSpecifier FromNNS)

◆ Import() [9/18]

NestedNameSpecifierLoc ASTImporter::Import ( NestedNameSpecifierLoc  FromNNS)

Definition at line 8026 of file ASTImporter.cpp.

References clang::NestedNameSpecifierLoc::getPrefix().

◆ Import() [10/18]

TemplateName ASTImporter::Import ( TemplateName  From)

Definition at line 8103 of file ASTImporter.cpp.

References clang::UnresolvedSetImpl::addDecl(), clang::UnresolvedSetImpl::begin(), clang::TemplateName::DependentTemplate, clang::UnresolvedSetImpl::end(), clang::SubstTemplateTemplateParmPackStorage::getArgumentPack(), clang::TemplateName::getAsDependentTemplateName(), clang::TemplateName::getAsOverloadedTemplate(), clang::TemplateName::getAsQualifiedTemplateName(), clang::TemplateName::getAsSubstTemplateTemplateParm(), clang::TemplateName::getAsSubstTemplateTemplateParmPack(), clang::TemplateName::getAsTemplateDecl(), clang::ASTContext::getDependentTemplateName(), clang::DependentTemplateName::getIdentifier(), clang::TemplateName::getKind(), clang::DependentTemplateName::getOperator(), clang::ASTContext::getOverloadedTemplateName(), clang::SubstTemplateTemplateParmStorage::getParameter(), clang::SubstTemplateTemplateParmPackStorage::getParameterPack(), clang::ASTContext::getQualifiedTemplateName(), clang::QualifiedTemplateName::getQualifier(), clang::DependentTemplateName::getQualifier(), clang::SubstTemplateTemplateParmStorage::getReplacement(), clang::ASTContext::getSubstTemplateTemplateParm(), clang::ASTContext::getSubstTemplateTemplateParmPack(), clang::QualifiedTemplateName::hasTemplateKeyword(), Import(), clang::ASTNodeImporter::ImportTemplateArgument(), clang::DependentTemplateName::isIdentifier(), clang::TemplateName::isNull(), clang::TemplateName::OverloadedTemplate, clang::TemplateName::QualifiedTemplate, clang::TemplateName::SubstTemplateTemplateParm, clang::TemplateName::SubstTemplateTemplateParmPack, and clang::TemplateName::Template.

◆ Import() [11/18]

SourceLocation ASTImporter::Import ( SourceLocation  FromLoc)

◆ Import() [12/18]

SourceRange ASTImporter::Import ( SourceRange  FromRange)

◆ Import() [13/18]

DeclarationName ASTImporter::Import ( DeclarationName  FromName)

◆ Import() [14/18]

IdentifierInfo * ASTImporter::Import ( const IdentifierInfo FromId)

Import the given identifier from the "from" context into the "to" context.

Returns
The equivalent identifier in the "to" context. Note: It returns nullptr only if the FromId was nullptr.

Definition at line 8478 of file ASTImporter.cpp.

References clang::IdentifierTable::get(), clang::IdentifierInfo::getBuiltinID(), clang::IdentifierInfo::getName(), clang::ASTContext::Idents, and clang::IdentifierInfo::setBuiltinID().

◆ Import() [15/18]

Selector ASTImporter::Import ( Selector  FromSel)

◆ Import() [16/18]

FileID ASTImporter::Import ( FileID  FromID)

◆ Import() [17/18]

CXXCtorInitializer * ASTImporter::Import ( CXXCtorInitializer FromInit)

◆ Import() [18/18]

CXXBaseSpecifier * ASTImporter::Import ( const CXXBaseSpecifier FromSpec)

◆ Import_New() [1/17]

Expected< QualType > ASTImporter::Import_New ( QualType  FromT)

Import the given type from the "from" context into the "to" context.

A null type is imported as a null type (no error).

Returns
The equivalent type in the "to" context, or the import error.

Definition at line 7679 of file ASTImporter.cpp.

References Import(), and clang::QualType::isNull().

◆ Import_New() [2/17]

Expected< TypeSourceInfo * > ASTImporter::Import_New ( TypeSourceInfo FromTSI)

Import the given type source information from the "from" context into the "to" context.

Returns
The equivalent type source information in the "to" context, or the import error.

Definition at line 7763 of file ASTImporter.cpp.

References Import().

◆ Import_New() [3/17]

Expected< Attr * > ASTImporter::Import_New ( const Attr FromAttr)

Import the given attribute from the "from" context into the "to" context.

Returns
The equivalent attribute in the "to" context, or the import error.

Definition at line 7783 of file ASTImporter.cpp.

References Import().

◆ Import_New() [4/17]

Expected< Decl * > ASTImporter::Import_New ( Decl FromD)

Import the given declaration from the "from" context into the "to" context.

Returns
The equivalent declaration in the "to" context, or the import error.

Definition at line 7808 of file ASTImporter.cpp.

References Import().

◆ Import_New() [5/17]

llvm::Expected<Decl *> clang::ASTImporter::Import_New ( const Decl FromD)
inline

Definition at line 223 of file ASTImporter.h.

◆ Import_New() [6/17]

Expected< Expr * > ASTImporter::Import_New ( Expr FromE)

Import the given expression from the "from" context into the "to" context.

Returns
The equivalent expression in the "to" context, or the import error.

Definition at line 7907 of file ASTImporter.cpp.

References Import().

◆ Import_New() [7/17]

Expected< Stmt * > ASTImporter::Import_New ( Stmt FromS)

Import the given statement from the "from" context into the "to" context.

Returns
The equivalent statement in the "to" context, or the import error.

Definition at line 7920 of file ASTImporter.cpp.

References Import().

◆ Import_New() [8/17]

Expected< NestedNameSpecifier * > ASTImporter::Import_New ( NestedNameSpecifier FromNNS)

Import the given nested-name-specifier from the "from" context into the "to" context.

Returns
The equivalent nested-name-specifier in the "to" context, or the import error.

Definition at line 7962 of file ASTImporter.cpp.

References Import().

◆ Import_New() [9/17]

Expected< NestedNameSpecifierLoc > ASTImporter::Import_New ( NestedNameSpecifierLoc  FromNNS)

Import the given nested-name-specifier-loc from the "from" context into the "to" context.

Returns
The equivalent nested-name-specifier-loc in the "to" context, or the import error.

Definition at line 8022 of file ASTImporter.cpp.

References Import().

◆ Import_New() [10/17]

Expected< TemplateName > ASTImporter::Import_New ( TemplateName  From)

Import the given template name from the "from" context into the "to" context, or the import error.

Definition at line 8097 of file ASTImporter.cpp.

References Import(), and clang::TemplateName::isNull().

◆ Import_New() [11/17]

Expected< SourceLocation > ASTImporter::Import_New ( SourceLocation  FromLoc)

Import the given source location from the "from" context into the "to" context.

Returns
The equivalent source location in the "to" context, or the import error.

Definition at line 8193 of file ASTImporter.cpp.

References Import(), and clang::SourceLocation::isInvalid().

◆ Import_New() [12/17]

Expected< SourceRange > ASTImporter::Import_New ( SourceRange  FromRange)

Import the given source range from the "from" context into the "to" context.

Returns
The equivalent source range in the "to" context, or the import error.

Definition at line 8213 of file ASTImporter.cpp.

References Import().

◆ Import_New() [13/17]

Expected< DeclarationName > ASTImporter::Import_New ( DeclarationName  FromName)

Import the given declaration name from the "from" context into the "to" context.

Returns
The equivalent declaration name in the "to" context, or the import error.

Definition at line 8408 of file ASTImporter.cpp.

References Import().

◆ Import_New() [14/17]

Expected< Selector > ASTImporter::Import_New ( Selector  FromSel)

Import the given Objective-C selector from the "from" context into the "to" context.

Returns
The equivalent selector in the "to" context, or the import error.

Definition at line 8490 of file ASTImporter.cpp.

References Import(), and clang::Selector::isNull().

◆ Import_New() [15/17]

Expected< FileID > ASTImporter::Import_New ( FileID  FromID)

Import the given file ID from the "from" context into the "to" context.

Returns
The equivalent file ID in the source manager of the "to" context, or the import error.

Definition at line 8221 of file ASTImporter.cpp.

References Import(), clang::FileID::isInvalid(), and clang::FileID::isValid().

◆ Import_New() [16/17]

Expected< CXXCtorInitializer * > ASTImporter::Import_New ( CXXCtorInitializer FromInit)

Import the given C++ constructor initializer from the "from" context into the "to" context.

Returns
The equivalent initializer in the "to" context, or the import error.

Definition at line 8285 of file ASTImporter.cpp.

References Import().

◆ Import_New() [17/17]

Expected< CXXBaseSpecifier * > ASTImporter::Import_New ( const CXXBaseSpecifier FromSpec)

Import the given CXXBaseSpecifier from the "from" context into the "to" context.

Returns
The equivalent CXXBaseSpecifier in the source manager of the "to" context, or the import error.

Definition at line 8337 of file ASTImporter.cpp.

References Import().

◆ ImportContext()

Expected< DeclContext * > ASTImporter::ImportContext ( DeclContext FromDC)

Import the given declaration context from the "from" AST context into the "to" AST context.

Returns
the equivalent declaration context in the "to" context, or error value.

Definition at line 7848 of file ASTImporter.cpp.

References ASTNodeImporter, CompleteDecl(), clang::Error, clang::ObjCInterfaceDecl::getDefinition(), clang::ObjCProtocolDecl::getDefinition(), clang::ASTNodeImporter::IDK_Basic, and Import().

◆ ImportDefinition()

void ASTImporter::ImportDefinition ( Decl From)

Definition at line 8403 of file ASTImporter.cpp.

References clang::Error, and ImportDefinition_New().

◆ ImportDefinition_New()

Error ASTImporter::ImportDefinition_New ( Decl From)

Import the definition of the given declaration, including all of the declarations it contains.

Definition at line 8358 of file ASTImporter.cpp.

References clang::ASTNodeImporter::IDK_Everything, Import(), clang::ASTNodeImporter::ImportDeclContext(), and clang::ASTNodeImporter::ImportDefinition().

Referenced by clang::ExternalASTMerger::CompleteType(), and ImportDefinition().

◆ Imported()

virtual Decl* clang::ASTImporter::Imported ( Decl From,
Decl To 
)
inlinevirtual

Subclasses can override this function to observe all of the From -> To declaration mappings as they are imported.

Definition at line 433 of file ASTImporter.h.

Referenced by Import().

◆ importInto() [1/3]

template<>
LLVM_NODISCARD Error clang::ASTImporter::importInto ( SourceLocation To,
const SourceLocation From 
)

◆ importInto() [2/3]

template<>
LLVM_NODISCARD Error clang::ASTImporter::importInto ( QualType To,
const QualType From 
)

Definition at line 149 of file ASTImporter.cpp.

References clang::QualType::isNull().

◆ importInto() [3/3]

template<typename ImportT >
LLVM_NODISCARD llvm::Error clang::ASTImporter::importInto ( ImportT &  To,
const ImportT &  From 
)
inline

Import the given object, returns the result.

Parameters
ToImport the object into this variable.
FromObject to import.
Returns
Error information (success or error).

Definition at line 179 of file ASTImporter.h.

◆ isMinimalImport()

bool clang::ASTImporter::isMinimalImport ( ) const
inline

Whether the importer will perform a minimal import, creating to-be-completed forward declarations when possible.

Definition at line 171 of file ASTImporter.h.

References clang::Minimal.

Referenced by getStructuralEquivalenceKind(), and clang::ASTNodeImporter::shouldForceImportDeclContext().

◆ IsStructurallyEquivalent()

bool ASTImporter::IsStructurallyEquivalent ( QualType  From,
QualType  To,
bool  Complain = true 
)

Determine whether the given types are structurally equivalent.

Definition at line 8564 of file ASTImporter.cpp.

References getStructuralEquivalenceKind(), clang::QualType::getTypePtr(), clang::ASTContext::hasSameType(), Import(), and clang::StructuralEquivalenceContext::IsEquivalent().

◆ MapImported()

Decl * ASTImporter::MapImported ( Decl From,
Decl To 
)

Store and assign the imported declaration to its counterpart.

Definition at line 8551 of file ASTImporter.cpp.

Referenced by clang::ExternalASTMerger::CompleteType().

◆ ToDiag()

DiagnosticBuilder ASTImporter::ToDiag ( SourceLocation  Loc,
unsigned  DiagID 
)

Report a diagnostic in the "to" context.

Definition at line 8515 of file ASTImporter.cpp.

References clang::ASTContext::getDiagnostics(), clang::DiagnosticsEngine::notePriorDiagnosticFrom(), and clang::DiagnosticsEngine::Report().

Friends And Related Function Documentation

◆ ASTNodeImporter

friend class ASTNodeImporter
friend

Definition at line 84 of file ASTImporter.h.

Referenced by ImportContext().


The documentation for this class was generated from the following files: