[clang] [libcxxabi] [lldb] [libcxx] [libc] [llvm] [clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2024-01-22 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/69498 >From 6f89b118ed56ad7a3af1996e19ccd30cc893c51e Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 14 Jun 2023 17:49:22 -0700 Subject: [PATCH 1/8] [libc++] Fix the behavior of throwing `operator new` under -f

[llvm] [libcxx] [libcxxabi] [clang] [lldb] [libc] [clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2024-01-16 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/69498 >From 6f89b118ed56ad7a3af1996e19ccd30cc893c51e Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 14 Jun 2023 17:49:22 -0700 Subject: [PATCH 1/7] [libc++] Fix the behavior of throwing `operator new` under -f

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-25 Thread via cfe-commits
EricWF wrote: @ldionne You've fully convinced me on this approach. Thank you for the explanation. https://github.com/llvm/llvm-project/pull/69498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread via cfe-commits
EricWF wrote: I'm tempted to just do the non-conforming thing here (because -fno-exceptions is non-conforming), and just assume that when you're building with -fno-exceptions, you're not trying to replace the throwing operator new, and you'll be fine if we have the throwing kind call the non-

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread Louis Dionne via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> ldionne wrote: So this file needs to be shared between libc++abi and libc++, unfortunately

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-20 Thread via cfe-commits
@@ -38,39 +44,53 @@ static void* operator_new_impl(std::size_t size) noexcept { _LIBCPP_WEAK void* operator new(std::size_t size) _THROW_BAD_ALLOC { void* p = operator_new_impl(size); -# ifndef _LIBCPP_HAS_NO_EXCEPTIONS if (p == nullptr) -throw std::bad_alloc(); -#

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -0,0 +1,38 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread Reid Kleckner via cfe-commits
@@ -7,6 +7,8 @@ //===--===// #include <__memory/aligned_alloc.h> +#include <__overridable_function> rnk wrote: If this is only needed from files in src/, can the file be moved out of libcxx

[clang-tools-extra] [libc++] Fix the behavior of throwing `operator new` under -fno-exceptions (PR #69498)

2023-10-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 21e1b13f3384b875bd2205a736570320cb020f3e..7a9f17a4c7688958fce8bfbe80dc2e85ff37952f libcxx