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 | 323fc2a2292f1d4f9f50f86815b5515660d49326 (patch) | |
| tree | 4ef0140672ae3078c21dbac185986ced29aacca8 | |
| parent | e364a233c026c851b23c7c2fab29dd7e7374f90f (diff) | |
| download | bcm5719-llvm-323fc2a2292f1d4f9f50f86815b5515660d49326.tar.gz bcm5719-llvm-323fc2a2292f1d4f9f50f86815b5515660d49326.zip  | |
Explicit braces to avoid ambiguous ‘else’.
llvm-svn: 74171
| -rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 3 | 
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();  | 

