mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-05 00:14:54 +08:00
[2/N] Fix cppcoreguidelines-init-variables suppression (#146237)
This PR removes all `cppcoreguidelines-init-variables` suppressions. Pull Request resolved: https://github.com/pytorch/pytorch/pull/146237 Approved by: https://github.com/ezyang
This commit is contained in:
@ -19,8 +19,7 @@ TEST(SubgraphUtilsTest, Basic) {
|
||||
for (bool reverse_iterate : {true, false}) {
|
||||
// Merge everything into a single subgraph
|
||||
bool first = true;
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
Node* subgraph;
|
||||
Node* subgraph = nullptr;
|
||||
auto it =
|
||||
reverse_iterate ? graph->nodes().rbegin() : graph->nodes().begin();
|
||||
auto end = reverse_iterate ? graph->nodes().rend() : graph->nodes().end();
|
||||
@ -84,8 +83,7 @@ graph(%a : Tensor, %b : Tensor, %c : Tensor):
|
||||
while (graph2->next() != *graph->nodes().end()) {
|
||||
SubgraphUtils::mergeNodeIntoSubgraph(graph2->next(), graph2);
|
||||
}
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-init-variables)
|
||||
Node* subgraph;
|
||||
Node* subgraph = nullptr;
|
||||
if (reverse_merge) {
|
||||
SubgraphUtils::mergeNodeIntoSubgraph(graph2, graph1);
|
||||
subgraph = graph1;
|
||||
|
||||
Reference in New Issue
Block a user