diff options
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 89d253981c5..0f60ad10a3e 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -3732,7 +3732,9 @@ static void TryListInitialization(Sema &S, // C++11 [dcl.init.list]p3: // - If T is an aggregate, aggregate initialization is performed. - if (DestType->isRecordType() && !DestType->isAggregateType()) { + if ((DestType->isRecordType() && !DestType->isAggregateType()) || + (S.getLangOpts().CPlusPlus11 && + S.isStdInitializerList(DestType, nullptr))) { if (S.getLangOpts().CPlusPlus11) { // - Otherwise, if the initializer list has no elements and T is a // class type with a default constructor, the object is |