Index: clang/lib/AST/Interp/ByteCodeExprGen.cpp =================================================================== --- clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -732,6 +732,23 @@ return false; } return true; + } else if (const auto *IVIE = dyn_cast(Initializer)) { + auto ArrayType = IVIE->getType()->getAsArrayTypeUnsafe(); + const auto *CAT = dyn_cast(ArrayType); + const size_t NumElems = CAT->getSize().getZExtValue(); + Optional ElemT = classify(CAT->getElementType()); + + for (size_t I = 0; I != NumElems; ++I) { + if (ElemT) { + if (!this->emitZero(*ElemT, Initializer)) + return false; + if (!this->emitInitElem(*ElemT, I, Initializer)) + return false; + } else { + assert(false && "default initializer for non-primitive type"); + } + } + return true; } assert(false && "Unknown expression for array initialization");