[libcxx-commits] [libcxx] [libc++] Destroy elements when exceptions are thrown in __construct_at_end (PR #167112)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Nov 15 19:39:47 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- libcxx/test/std/containers/sequences/vector/exception_construct_at_end.pass.cpp libcxx/include/__memory/uninitialized_algorithms.h libcxx/include/__vector/vector.h libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared_for_overwrite.pass.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared_for_overwrite.pass.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/containers/sequences/vector/exception_construct_at_end.pass.cpp b/libcxx/test/std/containers/sequences/vector/exception_construct_at_end.pass.cpp
index b94e7a142..36ea5ba75 100644
--- a/libcxx/test/std/containers/sequences/vector/exception_construct_at_end.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/exception_construct_at_end.pass.cpp
@@ -27,12 +27,11 @@
#include "count_new.h"
#ifdef DISABLE_NEW_COUNT
-#define CHECK_NEW_DELETE_DIFF(...)
+# define CHECK_NEW_DELETE_DIFF(...)
#else
-#define CHECK_NEW_DELETE_DIFF(__n) assert(globalMemCounter.new_called == globalMemCounter.delete_called + __n)
+# define CHECK_NEW_DELETE_DIFF(__n) assert(globalMemCounter.new_called == globalMemCounter.delete_called + __n)
#endif
-
struct throw_context {
static int num;
static int limit;
``````````
</details>
https://github.com/llvm/llvm-project/pull/167112
More information about the libcxx-commits
mailing list