Fix clang-tidy warnings in torch/jit (#146963)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/146963
Approved by: https://github.com/davidberard98
This commit is contained in:
cyy
2025-02-15 03:36:59 +00:00
committed by PyTorch MergeBot
parent 4233a77960
commit 8f291e8c00
24 changed files with 42 additions and 60 deletions

View File

@ -37,7 +37,7 @@ std::string stringSlice(
slice_indices_adjust(string.size(), &start_val, &end_val, step);
int64_t i = start_val;
std::string result = "";
std::string result;
for ([[maybe_unused]] const auto j : c10::irange(num_vals)) {
result += string[i];
i += step;