diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-06-22 05:44:08 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-06-22 05:44:08 +0000 |
commit | 0e9272bee20292ffd2e56f86f1c15881a22bada5 (patch) | |
tree | 4a909aa28f40870994cd9516972efa8fb4ba8fc8 | |
parent | 19d44836d77349130547f8fa71715e0a60415f28 (diff) | |
download | bcm5719-llvm-0e9272bee20292ffd2e56f86f1c15881a22bada5.tar.gz bcm5719-llvm-0e9272bee20292ffd2e56f86f1c15881a22bada5.zip |
Placate MSVC's unchecked malloc warning in thread tests.
llvm-svn: 273385
-rw-r--r-- | libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp index 2489bfc972c..5dd6a40a0eb 100644 --- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp +++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp @@ -36,7 +36,9 @@ void* operator new(std::size_t s) throw(std::bad_alloc) throw std::bad_alloc(); --throw_one; ++outstanding_new; - return std::malloc(s); + void* ret = std::malloc(s); + if (!ret) std::abort(); // placate MSVC's unchecked malloc warning + return ret; } void operator delete(void* p) throw() |