summaryrefslogtreecommitdiffstats
path: root/clang/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
commitfc0e2a03fafd1f8f221cb73c81208ff4b24c0433 (patch)
tree347f962a334335aeff1c2f1573f9bf04ffdbbba0 /clang/lib/Sema/SemaDecl.cpp
parent79a2788512b6b342b681f2e1b97ff06d6714e142 (diff)
downloadbcm5719-llvm-fc0e2a03fafd1f8f221cb73c81208ff4b24c0433.tar.gz
bcm5719-llvm-fc0e2a03fafd1f8f221cb73c81208ff4b24c0433.zip
Fix a regression that allowed clearly ill formed code. The diagnostic is still
terrible, FIXME left to do a proper job of diagnosing this. llvm-svn: 112581
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index fdffa040373..4b116890fa1 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud