[PATCH] D116514: [clangd] Add code action to generate a constructor for a C++ class

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 07:19:00 PDT 2022


sammccall added a comment.

In D116514#3230255 <https://reviews.llvm.org/D116514#3230255>, @njames93 wrote:

> Shouldn't the constructors that need `std::move` also ensure the `<utility>` header is also included, or at least transitively included. We don't want to generate constructors that wont compile.

I've added this just as a FIXME for now, because we're missing "framework" support for adding includes and composing separate edits in tweaks.
I think this is probably only a small obstacle in practice, it seems pretty rare to write `std::move` and need to add the `#include` for it to compile.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116514/new/

https://reviews.llvm.org/D116514



More information about the cfe-commits mailing list