steakhal wrote: > Oh, I thought that APInt supports big integers, but apparently it does not... > Thanks for fixing this!
APInt supports big integers. It's that we would need to pass a QualType for the evalBinOp APIs, and previously we just picked the next large enough primitive type, such as 32, 64, 128 bit wide integral type. However, when `__int128_t` was the parameter, then it could not find one primitive type with 256 bits, thus failed. Similar goes for non-power-of-2 bitwidths. There was no good match for them. In this patch, I simply sidestep this one by using BigInts, which provide arbitrary precision. Remember, this is only used for checking if wrapping happens. https://github.com/llvm/llvm-project/pull/174335 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
