summaryrefslogtreecommitdiffstats
path: root/clang/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
commita1ce1f80cfb09e75b32d1a34d323a9cddcec744c (patch)
treecd5081cd11ba0a9adbf5c3ec981bb49b65a218d6 /clang/lib/AST/DeclBase.cpp
parent96bfb50c035b9b9e4a9c1dc1badda780678d6cb9 (diff)
downloadbcm5719-llvm-a1ce1f80cfb09e75b32d1a34d323a9cddcec744c.tar.gz
bcm5719-llvm-a1ce1f80cfb09e75b32d1a34d323a9cddcec744c.zip
Centralize the handling of
CXXRecordDecl::DefinitionData::DeclaredCopyAssignment, for copy-assignment operators. Another step toward <rdar://problem/8459981>. llvm-svn: 114899
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp13
1 files changed, 5 insertions, 8 deletions
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<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) {
OpenPOWER on IntegriCloud