diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-27 23:16:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-27 23:16:44 +0000 |
commit | 6e3c7713ca126c76053cc092670a949a5e15ddaf (patch) | |
tree | aa376814b1082cc7aa7f5a2476b97482477eb03f /lib/Sema/SemaDecl.cpp | |
parent | 0ed2e0823cc7b727abd9307db4cd887f293eebe2 (diff) |
Centralize the management of CXXRecordDecl::DefinitionData's Aggregate
and PlainOldData bits in CXXRecordDecl itself. Another milepost on the
road toward <rdar://problem/8459981>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 68cdc556e8..5ac6f618d3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3931,10 +3931,6 @@ void Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, } } - // C++ [class]p4: A POD-struct is an aggregate class that has [...] no - // user-defined destructor. - Record->setPOD(false); - // C++ [class.dtor]p3: A destructor is trivial if it is an implicitly- // declared destructor. // FIXME: C++0x: don't do this for "= default" destructors @@ -6194,8 +6190,6 @@ FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, if (!InvalidDecl && getLangOptions().CPlusPlus) { CXXRecordDecl* CXXRecord = cast<CXXRecordDecl>(Record); - if (!T->isPODType()) - CXXRecord->setPOD(false); if (!ZeroWidth) CXXRecord->setEmpty(false); if (T->isReferenceType()) @@ -6235,18 +6229,6 @@ FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T, Diag(Loc, diag::warn_attribute_weak_on_field); NewFD->setAccess(AS); - - // C++ [dcl.init.aggr]p1: - // An aggregate is an array or a class (clause 9) with [...] no - // private or protected non-static data members (clause 11). - // A POD must be an aggregate. - if (getLangOptions().CPlusPlus && - (AS == AS_private || AS == AS_protected)) { - CXXRecordDecl *CXXRecord = cast<CXXRecordDecl>(Record); - CXXRecord->setAggregate(false); - CXXRecord->setPOD(false); - } - return NewFD; } |