================
@@ -3799,10 +3799,29 @@ bool Compiler<Emitter>::VisitOffsetOfExpr(const
OffsetOfExpr *E) {
continue;
}
+ if (IndexT == PT_IntAP || IndexT == PT_IntAPS) {
+ // AP types (e.g. __uint128_t, __int128) cannot be safely cast to
+ // Sint64. Evaluate the constant and push it directly as Sint64.
+ Expr::EvalResult EvalResult;
+ if (!ArrayIndexExpr->EvaluateAsInt(EvalResult, Ctx.getASTContext()))
----------------
tbaederr wrote:
Calling `Evaluate` functions in the compiler does not fly.
https://github.com/llvm/llvm-project/pull/204139
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits