Skip to content

[BUG] Double move when passing by move #413

Open
@JohelEGP

Description

@JohelEGP

Title: Double move when passing by move.

Minimal reproducer (https://cpp2.godbolt.org/z/31sPe9xMj):

main: () = {
  x := 0;
  :(y) = 0;
  (move x);
}

Commands:

cppfront -clean-cpp1 main.cpp2

Expected result:

  [](auto const& y) -> void { 0;  }
  (std::move(x));

Actual result and error:

  [](auto const& y) -> void { 0;  }
  (std::move(std::move(x)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions