mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
Enable performance-unnecessary-value-param in .clang-tidy (#15026)
Summary: This PR fixes around 250 places in the codebase where we were making unnecessary copies of objects (some large, some small). ezyang Pull Request resolved: https://github.com/pytorch/pytorch/pull/15026 Differential Revision: D13458784 Pulled By: goldsborough fbshipit-source-id: be5148b2ce09493588d70952e6f6d6ff5ec5199b
This commit is contained in:
committed by
Facebook Github Bot
parent
bdfff2f8c2
commit
1e9c384afb
@@ -240,7 +240,8 @@ TEST_F(ModuleTest, CallingCloneOnModuleThatDoesNotOverrideCloneThrows) {
|
||||
TEST_F(ModuleTest, CallingCloneOnModuleThatDoesOverrideCloneDoesNotThrow) {
|
||||
struct Cloneable : Module {
|
||||
std::shared_ptr<Module> clone(
|
||||
torch::optional<torch::Device> device = torch::nullopt) const override {
|
||||
const torch::optional<torch::Device>& device =
|
||||
torch::nullopt) const override {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user