[libc-commits] [PATCH] D151143: [LIBC] Add some missing [[noreturn]] attributes
Noah Goldstein via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon May 22 12:43:35 PDT 2023
goldstein.w.n created this revision.
goldstein.w.n added reviewers: sivachandra, michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
goldstein.w.n requested review of this revision.
Missing in header for `pthread_exit` and `exit`.
Missing in spec file for `pthread_exit`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151143
Files:
libc/spec/posix.td
libc/src/pthread/pthread_exit.h
libc/src/stdlib/exit.h
Index: libc/src/stdlib/exit.h
===================================================================
--- libc/src/stdlib/exit.h
+++ libc/src/stdlib/exit.h
@@ -13,7 +13,7 @@
namespace __llvm_libc {
-void exit(int status);
+[[noreturn]] void exit(int status);
} // namespace __llvm_libc
Index: libc/src/pthread/pthread_exit.h
===================================================================
--- libc/src/pthread/pthread_exit.h
+++ libc/src/pthread/pthread_exit.h
@@ -13,7 +13,7 @@
namespace __llvm_libc {
-void pthread_exit(void *retval);
+[[noreturn]] void pthread_exit(void *retval);
} // namespace __llvm_libc
Index: libc/spec/posix.td
===================================================================
--- libc/spec/posix.td
+++ libc/spec/posix.td
@@ -984,7 +984,7 @@
>,
FunctionSpec<
"pthread_exit",
- RetValSpec<VoidType>,
+ RetValSpec<NoReturn>,
[ArgSpec<VoidPtr>]
>,
FunctionSpec<
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151143.524439.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230522/abccf621/attachment-0001.bin>
More information about the libc-commits
mailing list