[libcxx-commits] [libcxx] Make __libcpp_verbose_abort() noexcept like std::terminate() (PR #109151)
Doug Wyatt via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 18 07:53:19 PDT 2024
https://github.com/dougsonos created https://github.com/llvm/llvm-project/pull/109151
Make __libcpp_verbose_abort() noexcept (it is already noreturn), to match std::terminate(). Clang's function effect analysis can use this to ignore such functions as being beyond its scope. (See https://github.com/llvm/llvm-project/pull/99656)
>From 44b6614333dd611d057d56988c315f13752303f6 Mon Sep 17 00:00:00 2001
From: Doug Wyatt <dwyatt at apple.com>
Date: Wed, 18 Sep 2024 07:19:02 -0700
Subject: [PATCH] Make __libcpp_verbose_abort() noexcept (it is already
noreturn), to match std::terminate(). Clang's function effect analysis can
use this to ignore such functions as being beyond its scope.
---
libcxx/include/__verbose_abort | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort
index 244278aec652d2..45a0add493c17d 100644
--- a/libcxx/include/__verbose_abort
+++ b/libcxx/include/__verbose_abort
@@ -21,7 +21,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// This function should never be called directly from the code -- it should only be called through
// the _LIBCPP_VERBOSE_ABORT macro.
[[__noreturn__]] _LIBCPP_AVAILABILITY_VERBOSE_ABORT _LIBCPP_OVERRIDABLE_FUNC_VIS
-_LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...);
+_LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...)
+_NOEXCEPT;
// _LIBCPP_VERBOSE_ABORT(format, args...)
//
More information about the libcxx-commits
mailing list