================ @@ -15858,7 +15858,7 @@ static bool FastEvaluateAsRValue(const Expr *Exp, Expr::EvalResult &Result, } if (const auto *CE = dyn_cast<ConstantExpr>(Exp)) { - if (CE->hasAPValueResult()) { + if (CE->hasAPValueResult() && !CE->getAPValueResult().isLValue()) { ---------------- tbaederr wrote:
It looks like `ConstantExpr::getAPValueResult()` will sometimes create a new APValue, so we should try ti call `getAPValueResult()` only once. https://github.com/llvm/llvm-project/pull/97146 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits