diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-09-24 12:07:26 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-09-24 17:32:22 +0200 |
commit | 414316a04fe9479dafcb36e3617ee1f5813c6a30 (patch) | |
tree | ff7e111dad25f1e5eaa12fcaa49105d3880e36f2 /sal/qa/rtl | |
parent | 72da78be20ebe1cd62ba7a5ac6e29b9d40f00f15 (diff) |
Drop some newly obsolete __clang_major__ version checks
...after 6ef2d358ac053ce0f6de9cf0f8f25e8bae66d441 "Adapt Clang and GCC minimum
version checks"
Change-Id: Ib25fbb76211d1bda1d230de771f207960e645421
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157204
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/qa/rtl')
-rw-r--r-- | sal/qa/rtl/oustring/rtl_OUString2.cxx | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index b633af15626c..bff3a0d145f1 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -38,23 +38,8 @@ namespace rtl_OUString namespace { -// Avoid -fsanitize=undefined warning e.g. "runtime error: value 1e+99 is -// outside the range of representable values of type 'float'" with Clang prior to -// <https://github.com/llvm/llvm-project/commit/9e52c43090f8cd980167bbd2719878ae36bcf6b5> "Treat the -// range of representable values of floating-point types as [-inf, +inf] not as [-max, +max]" -// (ENABLE_RUNTIME_OPTIMIZATIONS is an approximation for checking whether building is done without -// -fsanitize=undefined): float doubleToFloat(double x) { -#if !defined __clang__ || __clang_major__ >= 9 || ENABLE_RUNTIME_OPTIMIZATIONS return static_cast<float>(x); -#else - return - x < -std::numeric_limits<float>::max() - ? -std::numeric_limits<float>::infinity() - : x > std::numeric_limits<float>::max() - ? std::numeric_limits<float>::infinity() - : static_cast<float>(x); -#endif } } |