diff options
author | Duncan Sands <baldrick@free.fr> | 2009-06-25 09:03:06 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-06-25 09:03:06 +0000 |
commit | 6887e63ff533d46046c47a2f0ea8765914fbfb76 (patch) | |
tree | 301e953f557fe6feb47141c9f7fdd76d42208b8e | |
parent | e4df9c465782c5d4b1751b399bfecc113abbb389 (diff) |
Explicit braces to avoid ambiguous ‘else’.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74171 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index f417cdfb9b..186097c127 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1911,7 +1911,7 @@ void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, if (const RecordType *FieldClassType = FieldType->getAsRecordType()) { CXXRecordDecl *FieldClassDecl = cast<CXXRecordDecl>(FieldClassType->getDecl()); - if (!FieldClassDecl->hasTrivialConstructor()) + if (!FieldClassDecl->hasTrivialConstructor()) { if (CXXConstructorDecl *FieldCtor = FieldClassDecl->getDefaultConstructor(Context)) MarkDeclarationReferenced(CurrentLocation, FieldCtor); @@ -1924,6 +1924,7 @@ void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, err = true; } } + } else if (FieldType->isReferenceType()) { Diag(CurrentLocation, diag::err_unintialized_member) << Context.getTagDeclType(ClassDecl) << 0 << (*Field)->getNameAsCString(); |