-Wdelete-non-virtual-dtor already warns if A is a type with virtual functions but without virtual dtor has its constructor called via delete a. This makes the warning also fire if the dtor is called via a->~A(). This would've found a security bug in Chromium at compile time. Fixes PR26137.
Includes fixit for silencing the warning:
test.cc:12:3: warning: destructor called on 'B' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor] b->~B(); ^ test.cc:12:6: note: qualify call to silence this warning b->~B(); ^ B::