[Lldb-commits] [lldb] [LLDB] Fix operators <= and >= returning a wrong result when comparing to a floating point NaN (PR #108060)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 11 00:18:51 PDT 2024


https://github.com/labath commented:

The change looks great, but I'd like to reduce the duplication. Could you create a single comparison function (`Compare`, like `APFloat` has) and have the individual operators call that? Maybe the function could even return APFloat::cmpResult?

(Basically the idea is that all of the promotion and stuff happens in the Compare function and then the individual operators just do something like `return lhs.Compare(rhs) == lessThan`, etc.

https://github.com/llvm/llvm-project/pull/108060


More information about the lldb-commits mailing list