[compiler-rt] r201014 - Update these declarations of operator delete (and delete[]) to have noexcept,
Nick Lewycky
nicholas at mxc.ca
Fri Feb 7 17:29:07 PST 2014
Author: nicholas
Date: Fri Feb 7 19:29:07 2014
New Revision: 201014
URL: http://llvm.org/viewvc/llvm-project?rev=201014&view=rev
Log:
Update these declarations of operator delete (and delete[]) to have noexcept,
as required per core issue 1552 and warned about with
-Wimplicit-exception-spec-mismatch.
Modified:
compiler-rt/trunk/lib/asan/asan_new_delete.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/asan/asan_new_delete.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_new_delete.cc?rev=201014&r1=201013&r2=201014&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_new_delete.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_new_delete.cc Fri Feb 7 19:29:07 2014
@@ -81,15 +81,21 @@ INTERCEPTOR(void *, _ZnamRKSt9nothrow_t,
#if !SANITIZER_MAC
INTERCEPTOR_ATTRIBUTE
-void operator delete(void *ptr) { OPERATOR_DELETE_BODY(FROM_NEW); }
+void operator delete(void *ptr) noexcept {
+ OPERATOR_DELETE_BODY(FROM_NEW);
+}
INTERCEPTOR_ATTRIBUTE
-void operator delete[](void *ptr) { OPERATOR_DELETE_BODY(FROM_NEW_BR); }
+void operator delete[](void *ptr) noexcept {
+ OPERATOR_DELETE_BODY(FROM_NEW_BR);
+}
INTERCEPTOR_ATTRIBUTE
-void operator delete(void *ptr, std::nothrow_t const&)
-{ OPERATOR_DELETE_BODY(FROM_NEW); }
+void operator delete(void *ptr, std::nothrow_t const&) {
+ OPERATOR_DELETE_BODY(FROM_NEW);
+}
INTERCEPTOR_ATTRIBUTE
-void operator delete[](void *ptr, std::nothrow_t const&)
-{ OPERATOR_DELETE_BODY(FROM_NEW_BR); }
+void operator delete[](void *ptr, std::nothrow_t const&) {
+ OPERATOR_DELETE_BODY(FROM_NEW_BR);
+}
#else // SANITIZER_MAC
INTERCEPTOR(void, _ZdlPv, void *ptr) {
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=201014&r1=201013&r2=201014&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Fri Feb 7 19:29:07 2014
@@ -576,14 +576,14 @@ void *operator new[](__sanitizer::uptr s
user_free(thr, pc, ptr);
SANITIZER_INTERFACE_ATTRIBUTE
-void operator delete(void *ptr);
-void operator delete(void *ptr) {
+void operator delete(void *ptr) noexcept;
+void operator delete(void *ptr) noexcept {
OPERATOR_DELETE_BODY(_ZdlPv);
}
SANITIZER_INTERFACE_ATTRIBUTE
-void operator delete[](void *ptr);
-void operator delete[](void *ptr) {
+void operator delete[](void *ptr) noexcept;
+void operator delete[](void *ptr) noexcept {
OPERATOR_DELETE_BODY(_ZdlPvRKSt9nothrow_t);
}
More information about the llvm-commits
mailing list