File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,15 @@ bool fail{};
1414}
1515
1616// NOLINTNEXTLINE(hicpp-no-malloc)
17+ #if not defined(__clang__) || not defined(__SANITIZE_ADDRESS__)
1718auto operator new (::std::size_t size) -> void * { return fail ? throw ::std::bad_alloc () : ::std::malloc (size); }
1819
1920auto operator delete (void * ptr) noexcept -> void { ::std::free (ptr); } // NOLINT(hicpp-no-malloc)
2021auto operator delete (void * ptr, ::std::size_t ) noexcept -> void { ::std::free (ptr); } // NOLINT(hicpp-no-malloc)
22+ #endif
2123
2224TEST (stopsource_cons) {
25+ #if not defined(__clang__) || not defined(__SANITIZE_ADDRESS__)
2326 // Reference: [stopsource.cons] p1
2427 try {
2528 ::test_std::stop_source source;
@@ -40,4 +43,5 @@ TEST(stopsource_cons) {
4043 } catch (...) {
4144 ASSERT (nullptr == " can't be reached" ); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert)
4245 }
46+ #endif
4347}
You can’t perform that action at this time.
0 commit comments