Timm =?utf-8?q?Bäder?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -21659,18 +21659,25 @@ bool Expr::isPotentialConstantExprUnevaluated(Expr *E,
return Diags.empty();
}
-bool Expr::tryEvaluateObjectSize(uint64_t &Result, ASTContext &Ctx,
- unsigned Type) const {
+std::optional<uint64_t> Expr::tryEvaluateObjectSize(const ASTContext &Ctx,
+ unsigned Type) const {
if (!getType()->isPointerType())
return false;
Expr::EvalStatus Status;
EvalInfo Info(Ctx, Status, EvaluationMode::ConstantFold);
- if (Info.EnableNewConstInterp) {
- return Info.Ctx.getInterpContext().tryEvaluateObjectSize(Info, this, Type,
- Result);
- }
- return tryEvaluateBuiltinObjectSize(this, Type, Info, Result);
+ uint64_t Result = ~0u;
----------------
tbaederr wrote:
@Sirraide Is that alright?
https://github.com/llvm/llvm-project/pull/179230
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits