From a4fd290be24e091e1b67322d4a505ba277424718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 16 May 2025 17:59:20 +0200 Subject: [PATCH] Remove workarounds for old compiler and dependencies --- test/state/mpt.cpp | 2 -- test/state/precompiles.cpp | 7 +------ test/state/state.cpp | 2 +- test/unittests/precompiles_kzg_test.cpp | 6 ------ 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/test/state/mpt.cpp b/test/state/mpt.cpp index 8fad95f279..8b4fa2de73 100644 --- a/test/state/mpt.cpp +++ b/test/state/mpt.cpp @@ -76,8 +76,6 @@ class Path /// The MPT Node. /// /// The implementation is based on StackTrie from go-ethereum. -// TODO(clang-tidy-17): bug https://github.com/llvm/llvm-project/issues/50006 -// NOLINTNEXTLINE(bugprone-reserved-identifier) class MPTNode { static constexpr size_t num_children = 16; diff --git a/test/state/precompiles.cpp b/test/state/precompiles.cpp index be09d72226..bcf9d7b53d 100644 --- a/test/state/precompiles.cpp +++ b/test/state/precompiles.cpp @@ -649,12 +649,7 @@ inline constexpr std::array traits{{ bool is_precompile(evmc_revision rev, const evmc::address& addr) noexcept { - // Define compile-time constant, - // TODO(clang18): workaround for Clang Analyzer bug, fixed in clang 18. - // https://github.com/llvm/llvm-project/issues/59493. - static constexpr evmc::address address_boundary{stdx::to_underlying(PrecompileId::latest)}; - - if (evmc::is_zero(addr) || addr > address_boundary) + if (evmc::is_zero(addr) || addr > evmc::address{stdx::to_underlying(PrecompileId::latest)}) return false; const auto id = addr.bytes[19]; diff --git a/test/state/state.cpp b/test/state/state.cpp index 4450e2bac4..7d17c0c2f3 100644 --- a/test/state/state.cpp +++ b/test/state/state.cpp @@ -230,7 +230,7 @@ StateDiff State::build_diff(evmc_revision rev) const // Unconditionally report nonce and balance as modified. // TODO: We don't have information if the balance/nonce has actually changed. // One option is to just keep the original values. This may be handy for RPC. - // TODO(clang): In old Clang emplace_back without Account doesn't compile. + // TODO(clang): In AppleClang 15 emplace_back without StateDiff::Entry doesn't compile. // NOLINTNEXTLINE(modernize-use-emplace) auto& a = diff.modified_accounts.emplace_back(StateDiff::Entry{addr, m.nonce, m.balance}); diff --git a/test/unittests/precompiles_kzg_test.cpp b/test/unittests/precompiles_kzg_test.cpp index 8a59369cfa..c14ca4596f 100644 --- a/test/unittests/precompiles_kzg_test.cpp +++ b/test/unittests/precompiles_kzg_test.cpp @@ -14,12 +14,6 @@ using namespace evmone::crypto; namespace { -// TODO(intx): Add ""_u384. -consteval auto operator""_u384(const char* s) -{ - return intx::from_string(s); -} - constexpr auto G1_GENERATOR_X = 0x17F1D3A73197D7942695638C4FA9AC0FC3688C4F9774B905A14E3A3F171BAC586C55E83FF97A1AEFFB3AF00ADB22C6BB_u384; constexpr std::byte ZERO32[32]{};