Centralize the handling of

CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for
copy-assignment operators. Another step toward <rdar://problem/8459981>.

llvm-svn: 114899
This commit is contained in:
Douglas Gregor
2010-09-27 22:06:20 +00:00
parent 96bfb50c03
commit a1ce1f80cf
5 changed files with 123 additions and 119 deletions

View File

@@ -778,14 +778,11 @@ void DeclContext::addHiddenDecl(Decl *D) {
} else {
FirstDecl = LastDecl = D;
}
if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this)) {
Decl *InnerD = D;
if (FunctionTemplateDecl *FunTmpl = dyn_cast<FunctionTemplateDecl>(D))
InnerD = FunTmpl->getTemplatedDecl();
if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(InnerD))
Record->addedConstructor(Constructor);
}
// Notify a C++ record declaration that we've added a member, so it can
// update it's class-specific state.
if (CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this))
Record->addedMember(D);
}
void DeclContext::addDecl(Decl *D) {