[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 13:54:40 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe0b8f98b1f48: Add some missing [[noreturn]] attributes (authored by goldstein.w.n).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151143/new/

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.524479.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230522/8727663c/attachment-0001.bin>


More information about the libc-commits mailing list