Skip to content
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ constexpr bool test_signed() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::add_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::add_sat(minVal, maxVal);

static_assert(noexcept(std::add_sat(minVal, maxVal)));

Expand Down Expand Up @@ -97,8 +96,7 @@ constexpr bool test_unsigned() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::add_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::add_sat(minVal, maxVal);

static_assert(noexcept(std::add_sat(minVal, maxVal)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ constexpr bool test_signed() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] and `{}` scope since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::div_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::div_sat(minVal, maxVal);

static_assert(noexcept(std::div_sat(minVal, maxVal)));

Expand Down Expand Up @@ -89,8 +88,7 @@ constexpr bool test_unsigned() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::div_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::div_sat(minVal, maxVal);
static_assert(noexcept(std::div_sat(minVal, maxVal)));

// clang-format off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ constexpr bool test_signed() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::mul_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::mul_sat(minVal, maxVal);

static_assert(noexcept(std::mul_sat(minVal, maxVal)));

Expand Down Expand Up @@ -103,8 +102,7 @@ constexpr bool test_unsigned() {
constexpr auto minVal = std::numeric_limits<IntegerT>::min();
constexpr auto maxVal = std::numeric_limits<IntegerT>::max();

// TODO(LLVM-20) remove [[maybe_unused]] since all supported compilers support "Placeholder variables with no name"
[[maybe_unused]] std::same_as<IntegerT> decltype(auto) _ = std::mul_sat(minVal, maxVal);
std::same_as<IntegerT> decltype(auto) _ = std::mul_sat(minVal, maxVal);

static_assert(noexcept(std::mul_sat(minVal, maxVal)));

Expand Down
Loading
Loading