[PATCH] D147808: [clangd] Support defaulted destructors in Define Outline tweak

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 14 08:26:01 PDT 2023


kadircet added a comment.

there's actually a slight difference between an inline defaulted special member function and an out-of-line defaulted one. the latter makes the special member "user-defined" which might cause various headaches (e.g. type is no longer "trivial"). i don't think we should make it easy for people to change trivialness of types (especially considering our experience with people thinking anything that comes from the lightbulb is a way to improve your code). on a side node, this is less of an issue in the scenario you described (i.e. when the destructor is virtual, as it already means type is non-trivial).

so if you feel like this is really useful, i guess we can change the scope a little to apply to all special members, but only when type is no longer trivial. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147808



More information about the cfe-commits mailing list