// Test -fsanitize-memory-use-after-dtor
// RUN: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
// 24 bytes total
;
Packed p;
// 1 byte total
;
Empty e;
// 4 byte total
;
Simple s;
// 8 bytes total
;
Anon an;
;
;
Adjacent ad;
// CHECK-LABEL: define {{.*}}PackedD2Ev
// CHECK: call void @__sanitizer_dtor_callback{{.*}}i64 17
// CHECK: ret void
// CHECK-LABEL: define {{.*}}EmptyD2Ev
// CHECK-NOT: call void @__sanitizer_dtor_callback{{.*}}i64 0
// CHECK: ret void
// CHECK-LABEL: define {{.*}}SimpleD2Ev
// CHECK: call void @__sanitizer_dtor_callback{{.*}}i64 1
// CHECK: ret void
// CHECK-LABEL: define {{.*}}AnonD2Ev
// CHECK: call void @__sanitizer_dtor_callback{{.*}}i64 5
// CHECK: ret void
// CHECK-LABEL: define {{.*}}AdjacentD2Ev
// CHECK: call void @__sanitizer_dtor_callback{{.*}}i64 1
// CHECK: ret void