aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-28 20:38:10 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-28 20:38:10 +0000
commit2cf9d656f6283f2a8be0549da110d7cfbb1ea4b2 (patch)
treecbcb070593bb170ec3e7aae8bc617367ecb6e5e3 /lib/Sema/SemaDeclCXX.cpp
parentb3737e4fcddbf1c3126eb853c0e3b366b35ceaba (diff)
Centralize the management of CXXRecordDecl::DefinitionData's Empty bit
in CXXRecordDecl itself. Yes, this is also part of <rdar://problem/8459981>. This reinstates r114924, with one crucial bug fix: we were ignoring the implicit fields created by anonymous structs/unions when updating the bits in CXXRecordDecl, which means that a class/struct containing only an anonymous class/struct would be considered "empty". Hilarity follows. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 8ecf047a67..c9a19dd625 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -516,11 +516,6 @@ Sema::CheckBaseSpecifier(CXXRecordDecl *Class,
void Sema::SetClassDeclAttributesFromBase(CXXRecordDecl *Class,
const CXXRecordDecl *BaseClass,
bool BaseIsVirtual) {
- // A class with a non-empty base class is not empty.
- // FIXME: Standard ref?
- if (!BaseClass->isEmpty())
- Class->setEmpty(false);
-
// C++ [class.virtual]p1:
// A class that [...] inherits a virtual function is called a polymorphic
// class.
@@ -540,11 +535,6 @@ void Sema::SetClassDeclAttributesFromBase(CXXRecordDecl *Class,
// A copy assignment operator is trivial if its class has no virtual
// base classes.
Class->setHasTrivialCopyAssignment(false);
-
- // C++0x [meta.unary.prop] is_empty:
- // T is a class type, but not a union type, with ... no virtual base
- // classes
- Class->setEmpty(false);
} else {
// C++ [class.ctor]p5:
// A constructor is trivial if all the direct base classes of its