[all-commits] [llvm/llvm-project] 84f483: [libc] Remove UB specializations of type traits fo...

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Thu Mar 7 02:01:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84f483dbeeba5ecadbf3e4a75bfb71525a3fa332
      https://github.com/llvm/llvm-project/commit/84f483dbeeba5ecadbf3e4a75bfb71525a3fa332
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    M libc/src/__support/CMakeLists.txt
    M libc/src/__support/CPP/bit.h
    M libc/src/__support/UInt.h
    M libc/src/__support/float_to_string.h
    M libc/src/__support/integer_to_string.h
    M libc/test/UnitTest/CMakeLists.txt
    M libc/test/UnitTest/LibcTest.cpp
    M libc/test/UnitTest/LibcTest.h
    M libc/test/UnitTest/TestLogger.cpp
    M libc/test/src/__support/CPP/bit_test.cpp
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel
    M utils/bazel/llvm-project-overlay/libc/test/UnitTest/BUILD.bazel

  Log Message:
  -----------
  [libc] Remove UB specializations of type traits for `BigInt` (#84035)

The standard specifies that it it UB to specialize the following traits:
 - `std::is_integral`
 - `std::is_unsigned`
 - `std::make_unsigned`
 - `std::make_signed`

This patch:
 - Removes specializations for `BigInt`
 - Transforms SFINAE for `bit.h` functions from template parameter to
   return type (This makes specialization easier).
 - Adds `BigInt` specialization for `bit.h` functions.
 - Fixes code depending on previous specializations.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list