From a1ce1f80cfb09e75b32d1a34d323a9cddcec744c Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 27 Sep 2010 22:06:20 +0000 Subject: Centralize the handling of CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward . llvm-svn: 114899 --- clang/lib/AST/DeclBase.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'clang/lib/AST/DeclBase.cpp') diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 207edde5921..26ab9250d72 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -778,14 +778,11 @@ void DeclContext::addHiddenDecl(Decl *D) { } else { FirstDecl = LastDecl = D; } - - if (CXXRecordDecl *Record = dyn_cast(this)) { - Decl *InnerD = D; - if (FunctionTemplateDecl *FunTmpl = dyn_cast(D)) - InnerD = FunTmpl->getTemplatedDecl(); - if (CXXConstructorDecl *Constructor = dyn_cast(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(this)) + Record->addedMember(D); } void DeclContext::addDecl(Decl *D) { -- cgit v1.2.3