================
@@ -2884,6 +2884,19 @@ bool CastAPS(InterpState &S, CodePtr OpPC, uint32_t
BitWidth) {
return true;
}
+// Cast an AP integer to Sint64, failing constant evaluation if the value is
+// negative or too large to fit (i.e. truncation would change the value).
+template <PrimType Name, class T = typename PrimConv<Name>::T>
+bool CastNoOverflow(InterpState &S, CodePtr OpPC) {
----------------
shafik wrote:
So this is a pretty generic name but the summary above look very specific. It
feels like the name should be more specific.
https://github.com/llvm/llvm-project/pull/204139
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits