[libcxx-commits] [libcxx] [libc++][test] Fix more MSVC and Clang warnings (PR #74965)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Sun Dec 10 02:57:14 PST 2023


================
@@ -27,6 +27,9 @@ constexpr char pattern = 0xDE;
 
 void* operator new(std::size_t count) {
   void* ptr = std::malloc(count);
+  if (!ptr) {
+    std::abort(); // placate MSVC's unchecked malloc warning
----------------
mordante wrote:

assert?

https://github.com/llvm/llvm-project/pull/74965


More information about the libcxx-commits mailing list