clang 20.0.0git
Public Member Functions | List of all members
clang::ASTDeclMerger Class Reference

Public Member Functions

 ASTDeclMerger (ASTReader &Reader)
 
void mergeLambda (CXXRecordDecl *D, RedeclarableResult &Redecl, Decl &Context, unsigned Number)
 Attempt to merge D with a previous declaration of the same lambda, which is found by its index within its context declaration, if it has one.
 
template<typename T >
void mergeRedeclarableImpl (Redeclarable< T > *D, T *Existing, GlobalDeclID KeyDeclID)
 Attempts to merge the given declaration (D) with another declaration of the same entity.
 
template<typename T >
void mergeRedeclarable (Redeclarable< T > *D, T *Existing, RedeclarableResult &Redecl)
 
void mergeTemplatePattern (RedeclarableTemplateDecl *D, RedeclarableTemplateDecl *Existing, bool IsKeyDecl)
 Merge together the pattern declarations from two template declarations.
 
void MergeDefinitionData (CXXRecordDecl *D, struct CXXRecordDecl::DefinitionData &&NewDD)
 
void MergeDefinitionData (ObjCInterfaceDecl *D, struct ObjCInterfaceDecl::DefinitionData &&NewDD)
 
void MergeDefinitionData (ObjCProtocolDecl *D, struct ObjCProtocolDecl::DefinitionData &&NewDD)
 

Detailed Description

Definition at line 106 of file ASTReaderDecl.cpp.

Constructor & Destructor Documentation

◆ ASTDeclMerger()

clang::ASTDeclMerger::ASTDeclMerger ( ASTReader Reader)
inline

Definition at line 110 of file ASTReaderDecl.cpp.

Member Function Documentation

◆ MergeDefinitionData() [1/3]

void ASTDeclMerger::MergeDefinitionData ( CXXRecordDecl D,
struct CXXRecordDecl::DefinitionData &&  NewDD 
)

◆ MergeDefinitionData() [2/3]

void ASTDeclMerger::MergeDefinitionData ( ObjCInterfaceDecl D,
struct ObjCInterfaceDecl::DefinitionData &&  NewDD 
)

Definition at line 1273 of file ASTReaderDecl.cpp.

References D, and clang::ASTReader::mergeDefinitionVisibility().

◆ MergeDefinitionData() [3/3]

void ASTDeclMerger::MergeDefinitionData ( ObjCProtocolDecl D,
struct ObjCProtocolDecl::DefinitionData &&  NewDD 
)

Definition at line 1384 of file ASTReaderDecl.cpp.

References D, and clang::ASTReader::mergeDefinitionVisibility().

◆ mergeLambda()

void ASTDeclMerger::mergeLambda ( CXXRecordDecl D,
RedeclarableResult &  Redecl,
Decl Context,
unsigned  IndexInContext 
)

Attempt to merge D with a previous declaration of the same lambda, which is found by its index within its context declaration, if it has one.

We can't look up lambdas in their enclosing lexical or semantic context in general, because for lambdas in variables, both of those might be a namespace or the translation unit.

Definition at line 2858 of file ASTReaderDecl.cpp.

References D, clang::ASTReader::getContext(), clang::ASTContext::getLangOpts(), clang::Decl::isFirstDecl(), and mergeRedeclarable().

Referenced by clang::ASTDeclReader::VisitCXXRecordDeclImpl().

◆ mergeRedeclarable()

template<typename T >
void clang::ASTDeclMerger::mergeRedeclarable ( Redeclarable< T > *  D,
T Existing,
RedeclarableResult &  Redecl 
)
inline

◆ mergeRedeclarableImpl()

template<typename T >
void ASTDeclMerger::mergeRedeclarableImpl ( Redeclarable< T > *  D,
T Existing,
GlobalDeclID  KeyDeclID 
)

Attempts to merge the given declaration (D) with another declaration of the same entity.

Parameters
KeyDeclIDthe decl ID of the key declaration
D.GlobalDeclID() if
isnot a key declaration. See the comments of ASTReader::KeyDecls for the explanation of key declaration.

Definition at line 2944 of file ASTReaderDecl.cpp.

References D, clang::Decl::getCanonicalDecl(), clang::DeclIDBase::isValid(), mergeTemplatePattern(), clang::Redeclarable< decl_type >::PreviousDeclLink(), and clang::T.

Referenced by mergeRedeclarable().

◆ mergeTemplatePattern()

void ASTDeclMerger::mergeTemplatePattern ( RedeclarableTemplateDecl D,
RedeclarableTemplateDecl Existing,
bool  IsKeyDecl 
)

Merge together the pattern declarations from two template declarations.

Definition at line 2901 of file ASTReaderDecl.cpp.

References D, clang::TemplateDecl::getTemplatedDecl(), MergeDefinitionData(), mergeRedeclarable(), and clang::Result.

Referenced by mergeRedeclarableImpl().


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