[libc-commits] [libc] [libc] Mark internal __llvm_libc_errno as noexcept (PR #98760)

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Sat Jul 13 11:27:48 PDT 2024


https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/98760

The declaration must match the previous declaration in errno.h.

>From bbbe2b2a1f36859457c543261cbb70f808c88cbc Mon Sep 17 00:00:00 2001
From: Petr Hosek <phosek at google.com>
Date: Sat, 13 Jul 2024 11:26:33 -0700
Subject: [PATCH] [libc] Mark internal __llvm_libc_errno as noexcept

The declaration must match the previous declaration in errno.h.
---
 libc/src/errno/libc_errno.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/errno/libc_errno.h b/libc/src/errno/libc_errno.h
index 82c65f5a0b7f..44ee2714843b 100644
--- a/libc/src/errno/libc_errno.h
+++ b/libc/src/errno/libc_errno.h
@@ -33,7 +33,7 @@
 
 namespace LIBC_NAMESPACE_DECL {
 
-extern "C" int *__llvm_libc_errno();
+extern "C" int *__llvm_libc_errno() noexcept;
 
 struct Errno {
   void operator=(int);



More information about the libc-commits mailing list