Skip to content

Conversation

@mkolosick
Copy link
Contributor

Required backporting a fix for a clang-tidy bug from upstream llvm.

Copilot AI review requested due to automatic review settings November 6, 2025 18:51
@mkolosick mkolosick changed the title expand clang-tidy to apply to category/rpc expand clang-tidy checks to category/rpc Nov 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves const-correctness across the codebase by refactoring the mutation analyzer, adding const qualifiers to variables and parameters, adding explicit constructors, and including the category/rpc directory in clang-tidy checks.

  • Refactored ExprAutoMutationAnalyzer::isUnevaluated to be a simpler static method with clearer API
  • Added const qualifiers to many local variables, parameters, and return values throughout the codebase
  • Added explicit keyword to single-parameter constructors to prevent implicit conversions
  • Fixed forwarding references to use std::forward instead of std::move

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
utils/clang-tidy-auto-const/ExprAutoMutationAnalyzer.hpp Simplified isUnevaluated method signature and moved it to public static
utils/clang-tidy-auto-const/ExprAutoMutationAnalyzer.cpp Refactored isUnevaluated implementation with updated matcher logic
scripts/check-clang-tidy.sh Added category/rpc to directories checked by clang-tidy
category/rpc/monad_executor_test.cpp Added const qualifiers to test variables and fixed pointer declarations
category/rpc/monad_executor.cpp Improved const-correctness and removed unnecessary std::move on const variables
category/mpt/*.hpp Added explicit constructors, NOLINT suppressions, and improved const-correctness
category/execution/ethereum/state3/account_state.hpp Updated move semantics for account initialization
category/execution/ethereum/rlp/*.hpp Improved type safety in arithmetic operations and const-correctness
category/execution/ethereum/db/*.hpp Added explicit constructors for database classes
category/execution/ethereum/trace/prestate_tracer.hpp Added explicit constructors for tracer classes
category/core/lru/lru_cache.hpp Made RAII lock holders const and improved constructors
category/core/mem/batch_mem_pool.hpp Added explicit constructor
category/core/hash.hpp Added NOLINT for sizeof expression in hash function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkolosick mkolosick force-pushed the mkolosick/clang-tidy-rpc branch 2 times, most recently from 5212e50 to 446c732 Compare November 6, 2025 21:19
@jhunsaker jhunsaker force-pushed the mkolosick/clang-tidy-rpc branch from 446c732 to dedf373 Compare November 7, 2025 16:08
@mkolosick mkolosick force-pushed the mkolosick/clang-tidy-rpc branch 3 times, most recently from da67e9c to 1ef5b00 Compare November 7, 2025 19:45
- disable performance-move-const-arg.CheckTriviallyCopyableMove
as it provides no performance improvement and makes the code
unstable for future changes.
@jhunsaker jhunsaker force-pushed the mkolosick/clang-tidy-rpc branch from 1ef5b00 to a13ede5 Compare November 7, 2025 20:17
@zander-xyz zander-xyz merged commit 638e8bd into main Nov 7, 2025
13 checks passed
@zander-xyz zander-xyz deleted the mkolosick/clang-tidy-rpc branch November 7, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants