summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-27 21:17:54 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-27 21:17:54 +0000
commitd30e79f839ccd968168cc8449d3a2c0a15e252ac (patch)
tree5d1c22fe02b95328e583663bd2d37bcebed1e1c2 /clang/lib/Sema/SemaDeclCXX.cpp
parentce2e535b19e0cf5de6476ff6319e601b2ff4ff9c (diff)
downloadbcm5719-llvm-d30e79f839ccd968168cc8449d3a2c0a15e252ac.tar.gz
bcm5719-llvm-d30e79f839ccd968168cc8449d3a2c0a15e252ac.zip
Clean up the handling of the DeclaredDefaultConstructor and
DeclaredCopyConstructor bits in CXXRecordDecl's DefinitionData structure. Rather than having Sema call addedConstructor or set the bits directly at semi-random places, move all of the logic for managing these bits into CXXRecordDecl itself and tie the addedConstructor call into DeclContext::addDecl(). This makes it easier for AST-building clients to get the right bits set in DefinitionData, and is one small part of <rdar://problem/8459981>. llvm-svn: 114889
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index b171d85ee0e..025ac3bed9c 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -2985,13 +2985,6 @@ void Sema::CheckConstructor(CXXConstructorDecl *Constructor) {
Constructor->setInvalidDecl();
}
}
-
- // Notify the class that we've added a constructor. In principle we
- // don't need to do this for out-of-line declarations; in practice
- // we only instantiate the most recent declaration of a method, so
- // we have to call this for everything but friends.
- if (!Constructor->getFriendObjectKind())
- ClassDecl->addedConstructor(Context, Constructor);
}
/// CheckDestructor - Checks a fully-formed destructor definition for
@@ -4441,7 +4434,6 @@ CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
DefaultCon->setTrivial(ClassDecl->hasTrivialConstructor());
// Note that we have declared this constructor.
- ClassDecl->setDeclaredDefaultConstructor(true);
++ASTContext::NumImplicitDefaultConstructorsDeclared;
if (Scope *S = getScopeForContext(ClassDecl))
@@ -5412,7 +5404,6 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
CopyConstructor->setTrivial(ClassDecl->hasTrivialCopyConstructor());
// Note that we have declared this constructor.
- ClassDecl->setDeclaredCopyConstructor(true);
++ASTContext::NumImplicitCopyConstructorsDeclared;
// Add the parameter to the constructor.
OpenPOWER on IntegriCloud