[2/N] Fix clang-tidy readability checks (#164652)

This PR applies clang-tidy readability checks to jit sources and all headers in the code base.
`readability-redundant-inline-specifier` is suppressed because it incurs too many changes. `readability-redundant-inline-specifier` is used to detect redundant inline specifiers on function and variable declarations. There are many in-class method definitions that are marked inline.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164652
Approved by: https://github.com/Skylion007
This commit is contained in:
Yuanyuan Chen
2025-10-06 01:06:01 +00:00
committed by PyTorch MergeBot
parent 331191ce4b
commit 9fff8155c3
88 changed files with 142 additions and 196 deletions

View File

@ -1063,10 +1063,10 @@ void Unpickler::rebuildRRef() {
// const reference will extend the lifetime of the temporary variable
const auto& rrefId = distributed::rpc::RRefId(
static_cast<int16_t>(args.at(distributed::rpc::RREFID_ON_IDX).toInt()),
static_cast<int64_t>(args.at(distributed::rpc::RREFID_ID_IDX).toInt()));
args.at(distributed::rpc::RREFID_ID_IDX).toInt());
const auto& forkId = distributed::rpc::RRefId(
static_cast<int16_t>(args.at(distributed::rpc::FORKID_ON_IDX).toInt()),
static_cast<int64_t>(args.at(distributed::rpc::FORKID_ID_IDX).toInt()));
args.at(distributed::rpc::FORKID_ID_IDX).toInt());
auto parent =
static_cast<int16_t>(args.at(distributed::rpc::PARENT_IDX).toInt());
const auto& typeStr = static_cast<std::string>(