forked from OSchip/llvm-project
Attempted fix for PR5884; this code will be dead soon, but this fix should
help for the moment. llvm-svn: 92165
This commit is contained in:
parent
b2138e5529
commit
11c7b15148
|
@ -1114,14 +1114,13 @@ Sema::BuildMemberInitializer(FieldDecl *Member, Expr **Args,
|
||||||
QualType FieldType = Member->getType();
|
QualType FieldType = Member->getType();
|
||||||
if (const ArrayType *Array = Context.getAsArrayType(FieldType))
|
if (const ArrayType *Array = Context.getAsArrayType(FieldType))
|
||||||
FieldType = Array->getElementType();
|
FieldType = Array->getElementType();
|
||||||
|
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
|
||||||
if (FieldType->isDependentType()) {
|
if (FieldType->isDependentType()) {
|
||||||
// Can't check init for dependent type.
|
// Can't check init for dependent type.
|
||||||
} else if (FieldType->isRecordType()) {
|
} else if (FieldType->isRecordType()) {
|
||||||
// Member is a record (struct/union/class), so pass the initializer
|
// Member is a record (struct/union/class), so pass the initializer
|
||||||
// arguments down to the record's constructor.
|
// arguments down to the record's constructor.
|
||||||
if (!HasDependentArg) {
|
if (!HasDependentArg) {
|
||||||
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
|
|
||||||
|
|
||||||
C = PerformInitializationByConstructor(FieldType,
|
C = PerformInitializationByConstructor(FieldType,
|
||||||
MultiExprArg(*this,
|
MultiExprArg(*this,
|
||||||
(void**)Args,
|
(void**)Args,
|
||||||
|
@ -1243,10 +1242,10 @@ Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
CXXConstructorDecl *C = 0;
|
CXXConstructorDecl *C = 0;
|
||||||
|
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
|
||||||
if (!BaseType->isDependentType() && !HasDependentArg) {
|
if (!BaseType->isDependentType() && !HasDependentArg) {
|
||||||
DeclarationName Name = Context.DeclarationNames.getCXXConstructorName(
|
DeclarationName Name = Context.DeclarationNames.getCXXConstructorName(
|
||||||
Context.getCanonicalType(BaseType).getUnqualifiedType());
|
Context.getCanonicalType(BaseType).getUnqualifiedType());
|
||||||
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
|
|
||||||
|
|
||||||
C = PerformInitializationByConstructor(BaseType,
|
C = PerformInitializationByConstructor(BaseType,
|
||||||
MultiExprArg(*this,
|
MultiExprArg(*this,
|
||||||
|
|
Loading…
Reference in New Issue