[cfe-commits] r74171 - /cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Duncan Sands
baldrick at free.fr
Thu Jun 25 02:03:20 PDT 2009
Author: baldrick
Date: Thu Jun 25 04:03:06 2009
New Revision: 74171
URL: http://llvm.org/viewvc/llvm-project?rev=74171&view=rev
Log:
Explicit braces to avoid ambiguous ‘else’.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=74171&r1=74170&r2=74171&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Thu Jun 25 04:03:06 2009
@@ -1911,7 +1911,7 @@
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 @@
err = true;
}
}
+ }
else if (FieldType->isReferenceType()) {
Diag(CurrentLocation, diag::err_unintialized_member)
<< Context.getTagDeclType(ClassDecl) << 0 << (*Field)->getNameAsCString();
More information about the cfe-commits
mailing list