diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 589e971ccb..3aeb518827 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -697,7 +697,8 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity, // initial value of the object, including unnamed members, is // that of the expression. if ((ElemType->isRecordType() || ElemType->isVectorType()) && - SemaRef.Context.hasSameUnqualifiedType(expr->getType(), ElemType)) { + SemaRef.CheckSingleAssignmentConstraints(ElemType, expr) + == Sema::Compatible) { SemaRef.DefaultFunctionArrayLvalueConversion(expr); UpdateStructuredListElement(StructuredList, StructuredIndex, expr); ++Index; |