================
@@ -2055,8 +2055,14 @@ static ExprResult checkArraySize(Sema &S, Expr
*&ArraySize,
// allow non-constant expressions and constant-folding. We only need to use
// the converted constant expression rules (to properly convert the source)
// when the source expression is of class type.
- return S.CheckConvertedConstantExpression(
- ArraySize, S.Context.getSizeType(), SizeVal, CCEKind::ArrayBound);
+ //
+ // Convert the bound itself, inside the ExprWithCleanups ActOnArrayBound
+ // may have wrapped it in.
+ Expr *Bound = ArraySize;
+ if (auto *Cleanups = dyn_cast<ExprWithCleanups>(Bound))
----------------
efriedma-quic wrote:
Is it okay to just throw away the ExprWithCleaunps here? The ExprWithCleanups
contains a list of objects; will CheckConvertedConstantExpression find all the
same objects?
https://github.com/llvm/llvm-project/pull/244274
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits