1 // Test -fsanitize-memory-use-after-dtor
2 // 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_"
3 // 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_"
11 // Force alignment to next 4 bytes
14 // Force alignment, 8 more bytes
44 // Force alignment to next byte
65 // CHECK-LABEL: define {{.*}}PackedD2Ev
66 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}i64 17{{.*}}, !dbg ![[DI1:[0-9]+]]
69 // CHECK-LABEL: define {{.*}}EmptyD2Ev
72 // CHECK-LABEL: define {{.*}}SimpleD2Ev
73 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}i64 1{{.*}}, !dbg ![[DI2:[0-9]+]]
76 // CHECK-LABEL: define {{.*}}AnonD2Ev
77 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}i64 5{{.*}}, !dbg ![[DI3:[0-9]+]]
80 // CHECK-LABEL: define {{.*}}AdjacentD2Ev
81 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}i64 1{{.*}}, !dbg ![[DI4:[0-9]+]]
84 // CHECK-LABEL: !DIFile{{.*}}cpp
86 // CHECK-DAG: ![[DI1]] = {{.*}}line: [[@LINE-78]]
87 // CHECK-DAG: ![[DI2]] = {{.*}}line: [[@LINE-54]]
88 // CHECK-DAG: ![[DI3]] = {{.*}}line: [[@LINE-46]]
89 // CHECK-DAG: ![[DI4]] = {{.*}}line: [[@LINE-30]]