1 // RUN: %clang_cc1 -triple i386-unknown-unknown -std=c++11 %s -emit-llvm -o - | FileCheck %s 2 3 namespace Test1 { ~ATest1::A4 struct A { virtual ~A() {} }; 5 struct B final : A {}; ~CTest1::C6 struct C : A { virtual ~C() final {} }; 7 struct D { virtual ~D() final = 0; }; 8 // CHECK-LABEL: define void @_ZN5Test13fooEPNS_1BE foo(B * b)9 void foo(B *b) { 10 // CHECK: call void @_ZN5Test11BD1Ev 11 delete b; 12 } 13 // CHECK-LABEL: define void @_ZN5Test14foo2EPNS_1CE foo2(C * c)14 void foo2(C *c) { 15 // CHECK: call void @_ZN5Test11CD1Ev 16 delete c; 17 } 18 // CHECK-LABEL: define void @_ZN5Test14evilEPNS_1DE evil(D * p)19 void evil(D *p) { 20 // CHECK-NOT: call void @_ZN5Test11DD1Ev 21 delete p; 22 } 23 } 24