Skip to content

Commit b2468d7

Browse files
authored
[libc] Mark all __llvm_libc_errno definitions as noexcept (#98762)
The definitions must match the previous declaration in errno.h.
1 parent 8802c9f commit b2468d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/errno/libc_errno.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace {
5757
LIBC_THREAD_LOCAL int thread_errno;
5858
}
5959

60-
extern "C" int *__llvm_libc_errno() { return &thread_errno; }
60+
extern "C" int *__llvm_libc_errno() noexcept { return &thread_errno; }
6161

6262
void Errno::operator=(int a) { thread_errno = a; }
6363
Errno::operator int() { return thread_errno; }
@@ -68,7 +68,7 @@ namespace {
6868
int shared_errno;
6969
}
7070

71-
extern "C" int *__llvm_libc_errno() { return &shared_errno; }
71+
extern "C" int *__llvm_libc_errno() noexcept { return &shared_errno; }
7272

7373
void Errno::operator=(int a) { shared_errno = a; }
7474
Errno::operator int() { return shared_errno; }

0 commit comments

Comments
 (0)