[lldb] Scalar re-fix UB in float->int conversions
The refactor in 48ca1559 reintroduced UB when converting out-of-bounds floating point numbers to integers -- the behavior for ULongLong() was originally fixed in r341685, but did not survive my refactor because I based my template code on one of the methods which did not have this fix. This time, I apply the fix to all float->int conversions, instead of just the "double->unsigned long long" case. I also use a slightly simpler version of the code, with fewer round-trips (APFloat->APSInt->native_int vs APFloat->native_float->APInt->native_int). I also add some unit tests for the conversions.
Loading
Please sign in to comment