llvm-project/compiler-rt/test/hwasan/TestCases/override-new-delete.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
626 B
C++
Raw Normal View History

// RUN: %clangxx_hwasan %s -o %t
#include <stddef.h>
#include <new>
char *__dummy;
void *operator new(size_t size) { return __dummy; }
void *operator new[](size_t size) { return __dummy; }
void *operator new(size_t size, std::nothrow_t const&) noexcept {
return __dummy;
}
void *operator new[](size_t size, std::nothrow_t const&) noexcept {
return __dummy;
}
void operator delete(void *ptr) noexcept {}
void operator delete[](void *ptr) noexcept {}
void operator delete(void *ptr, std::nothrow_t const&) noexcept {}
void operator delete[](void *ptr, std::nothrow_t const&) noexcept {}
int main() {
return 0;
}