[libcxx-commits] [libcxx] [libc++][hardening] Categorize more assertions. (PR #75918)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Dec 22 12:11:23 PST 2023
================
@@ -132,13 +132,13 @@ __base_10_u64(char* __buffer, uint64_t __value) noexcept {
/// range that can be used. However the range is sufficient for
/// \ref __base_10_u128.
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
- _LIBCPP_ASSERT_UNCATEGORIZED(__exp >= __pow10_128_offset, "Index out of bounds");
+ _LIBCPP_ASSERT_INTERNAL(__exp >= __pow10_128_offset, "Index out of bounds");
return __pow10_128[__exp - __pow10_128_offset];
}
_LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI inline char*
__base_10_u128(char* __buffer, __uint128_t __value) noexcept {
- _LIBCPP_ASSERT_UNCATEGORIZED(
+ _LIBCPP_ASSERT_INTERNAL(
__value > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
----------------
mordante wrote:
```suggestion
__value > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fails when this isn't true.");
```
Can you do this as a drive-by?
https://github.com/llvm/llvm-project/pull/75918
More information about the libcxx-commits
mailing list