Remove incorrect assertion.

llvm-svn: 210092
This commit is contained in:
Richard Smith 2014-06-03 08:40:27 +00:00
parent 454a7cdfb3
commit 9213a6bfa4
2 changed files with 10 additions and 4 deletions

View File

@ -439,10 +439,9 @@ void AggExprEmitter::EmitArrayInit(llvm::Value *DestPtr, llvm::ArrayType *AType,
// type is an array (or array of array, etc.) of class type.
Expr *filler = E->getArrayFiller();
bool hasTrivialFiller = true;
if (CXXConstructExpr *cons = dyn_cast_or_null<CXXConstructExpr>(filler)) {
assert(cons->getConstructor()->isDefaultConstructor());
hasTrivialFiller = cons->getConstructor()->isTrivial();
}
if (CXXConstructExpr *cons = dyn_cast_or_null<CXXConstructExpr>(filler))
hasTrivialFiller = cons->getConstructor()->isDefaultConstructor() &&
cons->getConstructor()->isTrivial();
// Any remaining elements need to be zero-initialized, possibly
// using the filler expression. We can skip this if the we're

View File

@ -448,3 +448,10 @@ namespace DR1070 {
};
C c = {};
}
namespace ArrayOfInitList {
struct S {
S(std::initializer_list<int>);
};
S x[1] = {};
}