See https://bugs.chromium.org/p/chromium/issues/detail?id=673169.
We should get a warning when we try to delete an instance from a class with virtual methods that does not have a virtual destructor (-Wdelete-non-virtual-dtor) or if it is not possible with std::unique_ptr, maybe we should warn about classes with virtual methods and no virtual destructor (-Wnon-virtual-dtor). This is stricter but will avoid the same class of errors.
Reference https://llvm.org/bugs/show_bug.cgi?id=28460
Summary: Make Wdelete-non-virtual-dtor work with unique_ptr (was: Warn about deleting instance from class with virtual methods but no virtual destructor)
Retitled. The second behavior you describe is how the existing warning works in gcc, and it's way too noisy in practice. The llvm bug describes what we should do. (Guess it doesn't hurt to have a bug over here as well.)
Comment 1 by sdefresne@chromium.org
, Dec 11 2016