Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / override-new-delete.cpp
bloba221f66fcfb72822b7e69242578966c0a31d492d
1 // RUN: %clangxx_hwasan %s -o %t
2 #include <stddef.h>
3 #include <new>
5 char *__dummy;
7 void *operator new(size_t size) { return __dummy; }
8 void *operator new[](size_t size) { return __dummy; }
9 void *operator new(size_t size, std::nothrow_t const&) noexcept {
10 return __dummy;
12 void *operator new[](size_t size, std::nothrow_t const&) noexcept {
13 return __dummy;
16 void operator delete(void *ptr) noexcept {}
17 void operator delete[](void *ptr) noexcept {}
18 void operator delete(void *ptr, std::nothrow_t const&) noexcept {}
19 void operator delete[](void *ptr, std::nothrow_t const&) noexcept {}
21 int main() {
22 return 0;