1 // RUN: %clang_cc1 %s -verify -DDIAG1
2 // RUN: %clang_cc1 %s -verify -DDIAG1 -DDIAG2 -Wdelete-non-virtual-dtor
3 // RUN: %clang_cc1 %s -verify -DDIAG1 -Wmost -Wno-delete-non-abstract-non-virtual-dtor
4 // RUN: %clang_cc1 %s -verify -DDIAG2 -Wmost -Wno-delete-abstract-non-virtual-dtor
5 // RUN: %clang_cc1 %s -verify -Wmost -Wno-delete-non-virtual-dtor
9 // expected-no-diagnostics
15 virtual void abs() = 0;
18 void f1(S1
*s1
) { delete s1
; }
20 // expected-warning@-2 {{delete called on 'S1' that is abstract but has non-virtual destructor}}
25 virtual void real() {}
27 void f2(S2
*s2
) { delete s2
; }
29 // expected-warning@-2 {{delete called on non-final 'S2' that has virtual functions but non-virtual destructor}}