Clean up more clang-tidy supression (#92203)

1. remove unused NOLINTNEXTLINE(performance-move-const-arg)
2. add more std::move

Pull Request resolved: https://github.com/pytorch/pytorch/pull/92203
Approved by: https://github.com/Skylion007
This commit is contained in:
cyy
2023-01-17 05:43:05 +00:00
committed by PyTorch MergeBot
parent bbce4184be
commit 9b716a0682
22 changed files with 29 additions and 70 deletions

View File

@ -2180,7 +2180,6 @@ void initTensorImplConversion(PyObject* module) {
unsafe_reclaim_from_nonowning(static_cast<c10::TensorImpl*>(ptr));
TORCH_CHECK(p.defined(), "Can't wrap undefined tensor");
auto tensor = at::Tensor::wrap_tensor_impl(std::move(p));
// NOLINTNEXTLINE(performance-move-const-arg)
return py::cast(std::move(tensor));
});
// set on the module level to avoid mixing pybind and plain CPython extensions