mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[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:
committed by
PyTorch MergeBot
parent
331191ce4b
commit
9fff8155c3
@ -78,8 +78,7 @@ void flatten_rec(PyObject* obj, ParsedArgs& args) {
|
||||
args.desc.metadata.emplace_back(var);
|
||||
args.desc.structure.push_back(D::Bool);
|
||||
} else if (PyLong_Check(obj)) { // Wrap longs in Long tensors
|
||||
at::Tensor var = scalar_to_tensor(
|
||||
at::Scalar(static_cast<int64_t>(THPUtils_unpackLong(obj))));
|
||||
at::Tensor var = scalar_to_tensor(at::Scalar(THPUtils_unpackLong(obj)));
|
||||
args.vars.push_back(var);
|
||||
args.desc.metadata.emplace_back(var);
|
||||
args.desc.structure.push_back(D::Long);
|
||||
|
Reference in New Issue
Block a user