This is an archive of the discontinued LLVM Phabricator instance.

Add a virtual destructor to a class with virtual methods.
AbandonedPublic

Authored by krasin on Apr 6 2017, 11:41 AM.

Details

Reviewers
pcc
Summary

Recently, Clang enabled the check for virtual destructors
in the presence of virtual methods. That broke the bootstrap
build. Fixing it.

This is a second attempt to fix this. Now, with out-of-line definition.

Event Timeline

krasin created this revision.Apr 6 2017, 11:41 AM
pcc accepted this revision.Apr 6 2017, 12:34 PM

LGTM

If this doesn't work I guess you can also try overriding operator delete for this class.

This revision is now accepted and ready to land.Apr 6 2017, 12:34 PM
krasin added a comment.Apr 6 2017, 1:00 PM

So, this does not work as it introduces an undefined reference to the operator delete. And after a second thought, it might be that it's the warning that got enabled by default is to blame.

krasin abandoned this revision.Apr 6 2017, 1:00 PM