aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/sanitize-no-dtor-callback.cpp
blob: ffd573e4d251fabf18b1a3645fcbc67d9be97199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Test with the flag -fno-sanitize-memory-use-after-dtor, to ensure that
// instrumentation is not erroneously inserted
// RUN: %clang_cc1 -fsanitize=memory -fno-sanitize-memory-use-after-dtor -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"

struct Simple {
  int x;
  ~Simple() {}
};
Simple s;
// CHECK-LABEL: define {{.*}}SimpleD1Ev

struct Inlined {
  int x;
  inline ~Inlined() {}
};
Inlined i;
// CHECK-LABEL: define {{.*}}InlinedD1Ev

// CHECK-LABEL: define {{.*}}SimpleD2Ev

// CHECK-LABEL: define {{.*}}InlinedD2Ev