[PATCH][ASan] Avoid ‘void operator delete(void*, size_t)’ is a usual (non-placement) deallocation function in C++14 warning in asan/asan_new_delete.cc
Uros Bizjak
ubizjak at gmail.com
Fri Feb 6 02:43:20 PST 2015
Hello!
The attached patch avoids the above warning when asan is built in GCC tree.
Bootstrapped in GCC tree, no testsuite regressions.
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64841
Uros.
-------------- next part --------------
Index: asan/asan_new_delete.cc
===================================================================
--- asan/asan_new_delete.cc (revision 220472)
+++ asan/asan_new_delete.cc (working copy)
@@ -103,6 +103,7 @@
void operator delete[](void *ptr, std::nothrow_t const&) {
OPERATOR_DELETE_BODY(FROM_NEW_BR);
}
+#if __cpp_sized_deallocation
CXX_OPERATOR_ATTRIBUTE
void operator delete(void *ptr, size_t size) throw() {
GET_STACK_TRACE_FREE;
@@ -113,6 +114,7 @@
GET_STACK_TRACE_FREE;
asan_sized_free(ptr, size, &stack, FROM_NEW_BR);
}
+#endif
#else // SANITIZER_MAC
INTERCEPTOR(void, _ZdlPv, void *ptr) {
More information about the llvm-commits
mailing list