aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-04 09:03:57 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-04 09:03:57 +0000
commit74e40b70306b39d65fed16d474017df036ff3960 (patch)
treea797db1e2c238aea4cfa8e6ad678debd14d43714 /lib/Sema/SemaInit.cpp
parent9c5d70cee1fab3f988f9cd40316071b088a3f19d (diff)
Don't crash when initializing a subaggregate in C from a property r-value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index d7048a129f..7c4bd4a82e 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -698,6 +698,7 @@ void InitListChecker::CheckSubElementType(const InitializedEntity &Entity,
// that of the expression.
if ((ElemType->isRecordType() || ElemType->isVectorType()) &&
SemaRef.Context.hasSameUnqualifiedType(expr->getType(), ElemType)) {
+ SemaRef.DefaultFunctionArrayLvalueConversion(expr);
UpdateStructuredListElement(StructuredList, StructuredIndex, expr);
++Index;
return;