mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 07:56:33 +00:00

Fixes #133365 ## Changes Done - Changed the signed checking to ```cpp struct is_signed : bool_constant<((is_fixed_point<T> || is_arithmetic_v<T>) && (T(-1) < T(0)))> ``` in ``/libc/src/__support/CPP/type_traits/is_signed.h``. Added check for fixed-points. - But, got to know that this will fail for ``unsigned _Fract`` or any unsigned fixed-point because ``unsigned _Fract`` can’t represent -1 in T(-1), while ``unsigned int`` can handle it via wrapping. - That's why I explicity added ``is_signed`` check for ``unsigned`` fixed-points. - Same changes to ``/libc/src/__support/CPP/type_traits/is_unsigned.h``. - Added tests for ``is_signed`` and ``is_unsigned``.
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.