summarylogtreecommitdiffstats
path: root/array-of-structure-optimization.patch
blob: 6371ba23225eafc05ddb78686032d714127d98de (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -11862,6 +11862,8 @@ bool ArrayExprEvaluator::VisitCXXConstructExpr(const CXXConstructExpr *E,
   if (const ConstantArrayType *CAT = Info.Ctx.getAsConstantArrayType(Type)) {
     unsigned FinalSize = CAT->getSize().getZExtValue();
 
+    if (FinalSize > 64) return false;
+
     // Preserve the array filler if we had prior zero-initialization.
     APValue Filler =
       HadZeroInit && Value->hasArrayFiller() ? Value->getArrayFiller()