aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-08-31 05:42:40 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-08-31 05:42:40 +0000
commit1baf2f778c26a71d1353ff2cc1701fcd1dbeaf76 (patch)
treef332bb2ac4080916a7a225b54359cd540a90a97d /lib/Sema/SemaDecl.cpp
parent5722b148e886dd08ef7ee49f033ebe4fd21b1b5e (diff)
Fix a regression that allowed clearly ill formed code. The diagnostic is still
terrible, FIXME left to do a proper job of diagnosing this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index fdffa04037..4b116890fa 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -6135,6 +6135,8 @@ FieldDecl *Sema::CheckFieldDecl(DeclarationName Name, QualType T,
CXXRecord->setPOD(false);
if (!ZeroWidth)
CXXRecord->setEmpty(false);
+ if (T->isReferenceType())
+ CXXRecord->setHasTrivialConstructor(false);
if (const RecordType *RT = EltTy->getAs<RecordType>()) {
CXXRecordDecl* RDecl = cast<CXXRecordDecl>(RT->getDecl());