aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-27 22:06:20 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-27 22:06:20 +0000
commit27c08ab4859d071efa158a256f7e47e13d924443 (patch)
tree2b872505f86f5b992abad7c2900e59a12240a5f1 /lib/AST/DeclBase.cpp
parentdf4d4825050f8b0eedcfc70c461a21160e48d993 (diff)
Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 207edde592..26ab9250d7 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -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) {