clang API Documentation

Public Types | Public Member Functions
clang::ASTNodeImporter Class Reference
Inheritance diagram for clang::ASTNodeImporter:
Inheritance graph
[legend]
Collaboration diagram for clang::ASTNodeImporter:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ImportDefinitionKind { IDK_Default, IDK_Everything, IDK_Basic }
 What we should import from the definition. More...

Public Member Functions

 ASTNodeImporter (ASTImporter &Importer)
QualType VisitType (const Type *T)
 Method called if ImpClass doesn't provide specific handler for some type class.
QualType VisitBuiltinType (const BuiltinType *T)
QualType VisitComplexType (const ComplexType *T)
QualType VisitPointerType (const PointerType *T)
QualType VisitBlockPointerType (const BlockPointerType *T)
QualType VisitLValueReferenceType (const LValueReferenceType *T)
QualType VisitRValueReferenceType (const RValueReferenceType *T)
QualType VisitMemberPointerType (const MemberPointerType *T)
QualType VisitConstantArrayType (const ConstantArrayType *T)
QualType VisitIncompleteArrayType (const IncompleteArrayType *T)
QualType VisitVariableArrayType (const VariableArrayType *T)
QualType VisitVectorType (const VectorType *T)
QualType VisitExtVectorType (const ExtVectorType *T)
QualType VisitFunctionNoProtoType (const FunctionNoProtoType *T)
QualType VisitFunctionProtoType (const FunctionProtoType *T)
QualType VisitParenType (const ParenType *T)
QualType VisitTypedefType (const TypedefType *T)
QualType VisitTypeOfExprType (const TypeOfExprType *T)
QualType VisitTypeOfType (const TypeOfType *T)
QualType VisitDecltypeType (const DecltypeType *T)
QualType VisitUnaryTransformType (const UnaryTransformType *T)
QualType VisitAutoType (const AutoType *T)
QualType VisitRecordType (const RecordType *T)
QualType VisitEnumType (const EnumType *T)
QualType VisitTemplateSpecializationType (const TemplateSpecializationType *T)
QualType VisitElaboratedType (const ElaboratedType *T)
QualType VisitObjCInterfaceType (const ObjCInterfaceType *T)
QualType VisitObjCObjectType (const ObjCObjectType *T)
QualType VisitObjCObjectPointerType (const ObjCObjectPointerType *T)
bool ImportDeclParts (NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC, DeclarationName &Name, SourceLocation &Loc)
void ImportDefinitionIfNeeded (Decl *FromD, Decl *ToD=nullptr)
void ImportDeclarationNameLoc (const DeclarationNameInfo &From, DeclarationNameInfo &To)
void ImportDeclContext (DeclContext *FromDC, bool ForceImport=false)
bool shouldForceImportDeclContext (ImportDefinitionKind IDK)
bool ImportDefinition (RecordDecl *From, RecordDecl *To, ImportDefinitionKind Kind=IDK_Default)
bool ImportDefinition (VarDecl *From, VarDecl *To, ImportDefinitionKind Kind=IDK_Default)
bool ImportDefinition (EnumDecl *From, EnumDecl *To, ImportDefinitionKind Kind=IDK_Default)
bool ImportDefinition (ObjCInterfaceDecl *From, ObjCInterfaceDecl *To, ImportDefinitionKind Kind=IDK_Default)
bool ImportDefinition (ObjCProtocolDecl *From, ObjCProtocolDecl *To, ImportDefinitionKind Kind=IDK_Default)
TemplateParameterListImportTemplateParameterList (TemplateParameterList *Params)
TemplateArgument ImportTemplateArgument (const TemplateArgument &From)
bool ImportTemplateArguments (const TemplateArgument *FromArgs, unsigned NumFromArgs, SmallVectorImpl< TemplateArgument > &ToArgs)
bool IsStructuralMatch (RecordDecl *FromRecord, RecordDecl *ToRecord, bool Complain=true)
bool IsStructuralMatch (VarDecl *FromVar, VarDecl *ToVar, bool Complain=true)
bool IsStructuralMatch (EnumDecl *FromEnum, EnumDecl *ToRecord)
bool IsStructuralMatch (EnumConstantDecl *FromEC, EnumConstantDecl *ToEC)
bool IsStructuralMatch (ClassTemplateDecl *From, ClassTemplateDecl *To)
bool IsStructuralMatch (VarTemplateDecl *From, VarTemplateDecl *To)
DeclVisitDecl (Decl *D)
DeclVisitTranslationUnitDecl (TranslationUnitDecl *D)
DeclVisitNamespaceDecl (NamespaceDecl *D)
DeclVisitTypedefNameDecl (TypedefNameDecl *D, bool IsAlias)
DeclVisitTypedefDecl (TypedefDecl *D)
DeclVisitTypeAliasDecl (TypeAliasDecl *D)
DeclVisitEnumDecl (EnumDecl *D)
DeclVisitRecordDecl (RecordDecl *D)
DeclVisitEnumConstantDecl (EnumConstantDecl *D)
DeclVisitFunctionDecl (FunctionDecl *D)
DeclVisitCXXMethodDecl (CXXMethodDecl *D)
DeclVisitCXXConstructorDecl (CXXConstructorDecl *D)
DeclVisitCXXDestructorDecl (CXXDestructorDecl *D)
DeclVisitCXXConversionDecl (CXXConversionDecl *D)
DeclVisitFieldDecl (FieldDecl *D)
DeclVisitIndirectFieldDecl (IndirectFieldDecl *D)
DeclVisitObjCIvarDecl (ObjCIvarDecl *D)
DeclVisitVarDecl (VarDecl *D)
DeclVisitImplicitParamDecl (ImplicitParamDecl *D)
DeclVisitParmVarDecl (ParmVarDecl *D)
DeclVisitObjCMethodDecl (ObjCMethodDecl *D)
DeclVisitObjCCategoryDecl (ObjCCategoryDecl *D)
DeclVisitObjCProtocolDecl (ObjCProtocolDecl *D)
DeclVisitObjCInterfaceDecl (ObjCInterfaceDecl *D)
DeclVisitObjCCategoryImplDecl (ObjCCategoryImplDecl *D)
DeclVisitObjCImplementationDecl (ObjCImplementationDecl *D)
DeclVisitObjCPropertyDecl (ObjCPropertyDecl *D)
DeclVisitObjCPropertyImplDecl (ObjCPropertyImplDecl *D)
DeclVisitTemplateTypeParmDecl (TemplateTypeParmDecl *D)
DeclVisitNonTypeTemplateParmDecl (NonTypeTemplateParmDecl *D)
DeclVisitTemplateTemplateParmDecl (TemplateTemplateParmDecl *D)
DeclVisitClassTemplateDecl (ClassTemplateDecl *D)
DeclVisitClassTemplateSpecializationDecl (ClassTemplateSpecializationDecl *D)
DeclVisitVarTemplateDecl (VarTemplateDecl *D)
DeclVisitVarTemplateSpecializationDecl (VarTemplateSpecializationDecl *D)
StmtVisitStmt (Stmt *S)
ExprVisitExpr (Expr *E)
ExprVisitDeclRefExpr (DeclRefExpr *E)
ExprVisitIntegerLiteral (IntegerLiteral *E)
ExprVisitCharacterLiteral (CharacterLiteral *E)
ExprVisitParenExpr (ParenExpr *E)
ExprVisitUnaryOperator (UnaryOperator *E)
ExprVisitUnaryExprOrTypeTraitExpr (UnaryExprOrTypeTraitExpr *E)
ExprVisitBinaryOperator (BinaryOperator *E)
ExprVisitCompoundAssignOperator (CompoundAssignOperator *E)
ExprVisitImplicitCastExpr (ImplicitCastExpr *E)
ExprVisitCStyleCastExpr (CStyleCastExpr *E)

Detailed Description

Definition at line 28 of file ASTImporter.cpp.


Member Enumeration Documentation

What we should import from the definition.

Enumerator:
IDK_Default 

Import the default subset of the definition, which might be nothing (if minimal import is set) or might be everything (if minimal import is not set).

IDK_Everything 

Import everything.

IDK_Basic 

Import only the bare bones needed to establish a valid DeclContext.

Definition at line 90 of file ASTImporter.cpp.


Constructor & Destructor Documentation

clang::ASTNodeImporter::ASTNodeImporter ( ASTImporter Importer) [inline, explicit]

Definition at line 34 of file ASTImporter.cpp.


Member Function Documentation

void ASTNodeImporter::ImportDeclContext ( DeclContext FromDC,
bool  ForceImport = false 
)
bool ASTNodeImporter::ImportDeclParts ( NamedDecl D,
DeclContext *&  DC,
DeclContext *&  LexicalDC,
DeclarationName Name,
SourceLocation Loc 
)
void ASTNodeImporter::ImportDefinitionIfNeeded ( Decl FromD,
Decl ToD = nullptr 
)
bool ASTNodeImporter::ImportTemplateArguments ( const TemplateArgument FromArgs,
unsigned  NumFromArgs,
SmallVectorImpl< TemplateArgument > &  ToArgs 
)
bool ASTNodeImporter::IsStructuralMatch ( RecordDecl FromRecord,
RecordDecl ToRecord,
bool  Complain = true 
)
bool ASTNodeImporter::IsStructuralMatch ( VarDecl FromVar,
VarDecl ToVar,
bool  Complain = true 
)
bool ASTNodeImporter::IsStructuralMatch ( EnumDecl FromEnum,
EnumDecl ToRecord 
)

Definition at line 2194 of file ASTImporter.cpp.

References clang::EnumConstantDecl::getInitVal().

Definition at line 102 of file ASTImporter.cpp.

References IDK_Default, IDK_Everything, and clang::ASTImporter::isMinimalImport().

Referenced by ImportDefinition().

Definition at line 2823 of file ASTImporter.cpp.

References VisitCXXMethodDecl().

Definition at line 2831 of file ASTImporter.cpp.

References VisitCXXMethodDecl().

Definition at line 2827 of file ASTImporter.cpp.

References VisitCXXMethodDecl().

Definition at line 2645 of file ASTImporter.cpp.

References clang::DeclContext::addDeclInternal(), clang::FunctionDecl::Create(), clang::CXXMethodDecl::Create(), clang::CXXConstructorDecl::Create(), clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::FunctionProtoType::ExtProtoInfo::ExceptionSpec, clang::Decl::getAccess(), clang::Type::getAs(), clang::ASTImporter::getFromContext(), clang::ASTContext::getFunctionType(), clang::DeclaratorDecl::getInnerLocStart(), clang::ASTContext::getLangOpts(), clang::Decl::getLocEnd(), clang::FunctionDecl::getNameInfo(), clang::DeclaratorDecl::getQualifierLoc(), clang::FunctionDecl::getStorageClass(), clang::ASTImporter::getToContext(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::ASTImporter::HandleNameConflict(), clang::NamedDecl::hasExternalFormalLinkage(), clang::FunctionDecl::hasWrittenPrototype(), clang::Decl::IDNS_Ordinary, clang::ASTImporter::Import(), ImportDeclarationNameLoc(), ImportDeclParts(), clang::ASTImporter::Imported(), clang::FunctionDecl::isConstexpr(), clang::DeclContext::isFunctionOrMethod(), clang::Decl::isImplicit(), clang::FunctionDecl::isInlineSpecified(), clang::QualType::isNull(), clang::FunctionDecl::isPure(), clang::ASTImporter::IsStructurallyEquivalent(), clang::FunctionDecl::isTrivial(), clang::FunctionDecl::isVirtualAsWritten(), clang::DeclContext::localUncachedLookup(), clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr, P, clang::FunctionDecl::params(), clang::Decl::setAccess(), clang::Decl::setLexicalDeclContext(), clang::FunctionDecl::setPure(), clang::DeclaratorDecl::setQualifierInfo(), clang::FunctionDecl::setTrivial(), clang::ValueDecl::setType(), clang::FunctionDecl::setVirtualAsWritten(), clang::FunctionProtoType::ExceptionSpecInfo::SourceDecl, clang::FunctionProtoType::ExceptionSpecInfo::SourceTemplate, and clang::ASTImporter::ToDiag().

Referenced by VisitCXXMethodDecl().

Method called if ImpClass doesn't provide specific handler for some type class.

Reimplemented from clang::TypeVisitor< ASTNodeImporter, QualType >.

Definition at line 1422 of file ASTImporter.cpp.

References clang::ASTImporter::FromDiag(), and clang::Type::getTypeClassName().

Definition at line 2374 of file ASTImporter.cpp.

References VisitTypedefNameDecl().

Definition at line 2370 of file ASTImporter.cpp.

References VisitTypedefNameDecl().


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