[libcxx-commits] [libcxx] [libc++] Apply `[[gnu::pure]]` to `get_new_handler` (PR #220847)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 3 02:25:32 PDT 2026


================
@@ -20,7 +20,7 @@ _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
 
 typedef void (*new_handler)();
 _LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
+[[__nodiscard__]] _LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
----------------
frederick-vs-ja wrote:

Changed. Thanks!

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


More information about the libcxx-commits mailing list