summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-06-25 09:03:06 +0000
committerDuncan Sands <baldrick@free.fr>2009-06-25 09:03:06 +0000
commit323fc2a2292f1d4f9f50f86815b5515660d49326 (patch)
tree4ef0140672ae3078c21dbac185986ced29aacca8 /clang/lib/Sema/SemaDeclCXX.cpp
parente364a233c026c851b23c7c2fab29dd7e7374f90f (diff)
downloadbcm5719-llvm-323fc2a2292f1d4f9f50f86815b5515660d49326.tar.gz
bcm5719-llvm-323fc2a2292f1d4f9f50f86815b5515660d49326.zip
Explicit braces to avoid ambiguous ‘else’.
llvm-svn: 74171
Diffstat (limited to 'clang/lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclCXX.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index f417cdfb9bc..186097c1271 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud