[Lldb-commits] [PATCH] D96817: Fix deep copying for OptionValue classes

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 17 13:35:01 PST 2021


dblaikie added a comment.

> CRTP was my first implementation, however, I discarded it as more bug-prone. Virtual Clone function at the interface is so common that, I believe, everyone knows it must be overridden by a new derived class. The necessity of inheriting from base_clone_helper is not so obvious.

I would've thought it'd be pretty easy to accidentally miss either of these - I think the CRTP helper ensures consistency of implementation (harder to accidentally slice/copy the wrong type/etc. But I'm not a code owner/major contributor to lldb specifically, so probably more up to other developers who are.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96817



More information about the lldb-commits mailing list