14 #ifndef LLVM_CLANG_AST_ASTIMPORTER_H 15 #define LLVM_CLANG_AST_ASTIMPORTER_H 20 #include "llvm/ADT/DenseMap.h" 21 #include "llvm/ADT/DenseSet.h" 22 #include "llvm/ADT/SmallVector.h" 26 class CXXCtorInitializer;
27 class CXXBaseSpecifier;
30 class DiagnosticsEngine;
34 class NestedNameSpecifier;
43 typedef llvm::DenseMap<const CXXBaseSpecifier *, CXXBaseSpecifier *>
57 bool LastDiagFromFrom;
61 llvm::DenseMap<const Type *, const Type *> ImportedTypes;
65 llvm::DenseMap<Decl *, Decl *> ImportedDecls;
69 llvm::DenseMap<Stmt *, Stmt *> ImportedStmts;
73 llvm::DenseMap<FileID, FileID> ImportedFileIDs;
86 NonEquivalentDeclSet NonEquivalentDecls;
313 bool Complain =
true);
317 #endif // LLVM_CLANG_AST_ASTIMPORTER_H Smart pointer class that efficiently represents Objective-C method names.
A (possibly-)qualified type.
Implements support for file system lookup, file system caching, and directory search management...
Stmt - This represents one statement.
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
A container of type source information.
virtual Decl * GetOriginalDecl(Decl *To)
Called by StructuralEquivalenceContext.
FileManager & getFromFileManager() const
Retrieve the file manager that AST nodes are being imported from.
DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "to" context.
QualType Import(QualType FromT)
Import the given type from the "from" context into the "to" context.
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.
One of these records is kept for each identifier that is lexed.
DiagnosticBuilder FromDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "from" context.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
llvm::DenseSet< std::pair< Decl *, Decl * > > NonEquivalentDeclSet
llvm::DenseMap< const CXXBaseSpecifier *, CXXBaseSpecifier * > ImportedCXXBaseSpecifierMap
bool IsStructurallyEquivalent(QualType From, QualType To, bool Complain=true)
Determine whether the given types are structurally equivalent.
ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, ASTContext &FromContext, FileManager &FromFileManager, bool MinimalImport)
Create a new AST importer.
ASTContext & getToContext() const
Retrieve the context that AST nodes are being imported into.
A little helper class used to produce diagnostics.
Expr - This represents one expression.
Represents a C++ template name within the type system.
Decl * GetAlreadyImportedOrNull(Decl *FromD)
Return the copy of the given declaration in the "to" context if it has already been imported from the...
Encodes a location in the source.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
bool isMinimalImport() const
Whether the importer will perform a minimal import, creating to-be-completed forward declarations whe...
FileManager & getToFileManager() const
Retrieve the file manager that AST nodes are being imported into.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
NonEquivalentDeclSet & getNonEquivalentDecls()
Return the set of declarations that we know are not equivalent.
virtual void CompleteDecl(Decl *D)
Called for ObjCInterfaceDecl, ObjCProtocolDecl, and TagDecl.
Dataflow Directional Tag Classes.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
virtual Decl * Imported(Decl *From, Decl *To)
Note that we have imported the "from" declaration by mapping it to the (potentially-newly-created) "t...
DeclarationName - The name of a declaration.
Imports selected nodes from one AST context into another context, merging AST nodes where appropriate...
Represents a C++ base or member initializer.
Represents a base class of a C++ class.
void ImportDefinition(Decl *From)
Import the definition of the given declaration, including all of the declarations it contains...
Defines the clang::SourceLocation class and associated facilities.
ASTContext & getFromContext() const
Retrieve the context that AST nodes are being imported from.
A trivial tuple used to represent a source range.
NamedDecl - This represents a decl with a name.
DeclContext * ImportContext(DeclContext *FromDC)
Import the given declaration context from the "from" AST context into the "to" AST context...