[libcxx-commits] [libcxx] aee3a9f - [libc++][NFC] clang-format new_handler.cpp
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 15 08:14:53 PDT 2023
Author: Louis Dionne
Date: 2023-06-15T11:14:26-04:00
New Revision: aee3a9f5bcdc13de4bb1b3eb04845b172fffb23c
URL: https://github.com/llvm/llvm-project/commit/aee3a9f5bcdc13de4bb1b3eb04845b172fffb23c
DIFF: https://github.com/llvm/llvm-project/commit/aee3a9f5bcdc13de4bb1b3eb04845b172fffb23c.diff
LOG: [libc++][NFC] clang-format new_handler.cpp
Added:
Modified:
libcxx/src/new_handler.cpp
libcxx/utils/data/ignore_format.txt
Removed:
################################################################################
diff --git a/libcxx/src/new_handler.cpp b/libcxx/src/new_handler.cpp
index 37cde7a8f149b..49c21d85f5908 100644
--- a/libcxx/src/new_handler.cpp
+++ b/libcxx/src/new_handler.cpp
@@ -11,17 +11,17 @@
#include "include/atomic_support.h"
#if defined(_LIBCPP_ABI_MICROSOFT)
-# if !defined(_LIBCPP_ABI_VCRUNTIME)
-# define _LIBPCPP_DEFINE_NEW_HANDLER
-# endif
+# if !defined(_LIBCPP_ABI_VCRUNTIME)
+# define _LIBPCPP_DEFINE_NEW_HANDLER
+# endif
#elif defined(LIBCXX_BUILDING_LIBCXXABI)
- // nothing to do, we use the one from libc++abi
+// nothing to do, we use the one from libc++abi
#elif defined(LIBCXXRT)
-# define _LIBPCPP_DEFINE_NEW_HANDLER
+# define _LIBPCPP_DEFINE_NEW_HANDLER
#elif defined(__GLIBCXX__)
- // nothing to do, we use the one from libstdc++/libsupc++
+// nothing to do, we use the one from libstdc++/libsupc++
#else
-# define _LIBPCPP_DEFINE_NEW_HANDLER
+# define _LIBPCPP_DEFINE_NEW_HANDLER
#endif
#if defined(_LIBPCPP_DEFINE_NEW_HANDLER)
@@ -30,17 +30,9 @@ namespace std { // purposefully not versioned
static constinit std::new_handler __new_handler = nullptr;
-new_handler
-set_new_handler(new_handler handler) noexcept
-{
- return __libcpp_atomic_exchange(&__new_handler, handler);
-}
-
-new_handler
-get_new_handler() noexcept
-{
- return __libcpp_atomic_load(&__new_handler);
-}
+new_handler set_new_handler(new_handler handler) noexcept { return __libcpp_atomic_exchange(&__new_handler, handler); }
+
+new_handler get_new_handler() noexcept { return __libcpp_atomic_load(&__new_handler); }
} // namespace std
diff --git a/libcxx/utils/data/ignore_format.txt b/libcxx/utils/data/ignore_format.txt
index 48d7bebf343ff..7e6760b38ec4e 100644
--- a/libcxx/utils/data/ignore_format.txt
+++ b/libcxx/utils/data/ignore_format.txt
@@ -809,7 +809,6 @@ libcxx/src/memory.cpp
libcxx/src/mutex.cpp
libcxx/src/mutex_destructor.cpp
libcxx/src/new.cpp
-libcxx/src/new_handler.cpp
libcxx/src/optional.cpp
libcxx/src/random.cpp
libcxx/src/random_shuffle.cpp
More information about the libcxx-commits
mailing list