diff options
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 6608e120f3c..fada7fe0adb 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -909,7 +909,7 @@ void InitListChecker::CheckArrayType(InitListExpr *IList, QualType &DeclType, if (!maxElementsKnown && elementIndex > maxElements) maxElements = elementIndex; } - if (DeclType->isIncompleteArrayType()) { + if (!hadError && DeclType->isIncompleteArrayType()) { // If this is an incomplete array type, the actual type needs to // be calculated here. llvm::APSInt Zero(maxElements.getBitWidth(), maxElements.isUnsigned()); |