[lldb-dev] solved: Unifying ctor+Clear() inits into in-class initializers?

Jan Kratochvil via lldb-dev lldb-dev at lists.llvm.org
Sun Nov 19 12:54:04 PST 2017


On Sun, 19 Nov 2017 15:58:02 +0100, Jan Kratochvil via lldb-dev wrote:
> https://reviews.llvm.org/D40212
...
> Is it OK to just use in-class member variable initializers and:
> 	void Clear() {
> 	  this->~ClassName();
> 	  new (this) ClassName();
> 	}
> ?

FYI Greg Clayton in the review above decided this is not good and it will be
better to avoid Clear() completely.


Jan Kratochvil


More information about the lldb-dev mailing list