1 // RUN: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
2 // RUN: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
12 class B
: virtual public A
{
20 // CHECK-LABEL: define {{.*}}AD1Ev
21 // CHECK: call void {{.*}}AD2Ev
24 // After invoking base dtor and dtor for virtual base, poison vtable ptr.
25 // CHECK-LABEL: define {{.*}}BD1Ev
26 // CHECK: call void {{.*}}BD2Ev
27 // CHECK: call void {{.*}}AD2Ev
28 // CHECK: call void @__sanitizer_dtor_callback_vptr{{.*}}, !dbg ![[DI1:[0-9]+]]
31 // Since no virtual bases, poison vtable ptr here.
32 // CHECK-LABEL: define {{.*}}AD2Ev
33 // CHECK: call void @__sanitizer_dtor_callback_fields{{.*}}, !dbg ![[DI2:[0-9]+]]
34 // CHECK: call void @__sanitizer_dtor_callback_vptr{{.*}}, !dbg ![[DI3:[0-9]+]]
38 // CHECK-LABEL: define {{.*}}BD2Ev
39 // CHECK: call void @__sanitizer_dtor_callback_fields{{.*}}, !dbg ![[DI4:[0-9]+]]
42 // CHECK-LABEL: !DIFile{{.*}}sanitize-dtor-vtable.cpp
44 // CHECK-DAG: ![[DI1]] = {{.*}}line: [[@LINE-28]]
45 // CHECK-DAG: ![[DI2]] = {{.*}}line: [[@LINE-39]]
46 // CHECK-DAG: ![[DI3]] = {{.*}}line: [[@LINE-38]]
47 // CHECK-DAG: ![[DI4]] = {{.*}}line: [[@LINE-33]]