aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-13 10:38:46 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-13 10:38:46 +0000
commit6b5374f837f925d99b1a76bc2fe8c98c1698df7f (patch)
treef5b66f1cfd643795ab115ce1a815133c6e1c1fea /lib/Sema/SemaInit.cpp
parent148772a841cae6f32db16d890e788b92a763bb3f (diff)
Allow initializing a vector with a vector in addition to allowing a list
of the elements. Issue reported on cfe-dev by Mattias Holm. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 4e0eb1d431..45085962d4 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -674,7 +674,7 @@ void InitListChecker::CheckSubElementType(InitListExpr *IList,
// compatible structure or union type. In the latter case, the
// initial value of the object, including unnamed members, is
// that of the expression.
- if (ElemType->isRecordType() &&
+ if ((ElemType->isRecordType() || ElemType->isVectorType()) &&
SemaRef.Context.hasSameUnqualifiedType(expr->getType(), ElemType)) {
UpdateStructuredListElement(StructuredList, StructuredIndex, expr);
++Index;