[libc-commits] [PATCH] D134074: [libc] add strerror

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Sep 20 11:40:55 PDT 2022


sivachandra accepted this revision.
sivachandra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/__support/error_to_string.cpp:27
+constexpr size_t BUFFER_SIZE = max_buff_size();
+thread_local char error_buffer[BUFFER_SIZE];
+
----------------
Add a comment somewhere explaining why this is present at all.


================
Comment at: libc/src/__support/error_to_string.cpp:229
+    } else {
+      const char *unknown_err_str = "Unknown error";
+      constexpr size_t unknown_str_len = sizeof("Unknown error");
----------------
Can we use https://github.com/llvm/llvm-project/blob/main/libc/src/__support/CPP/stringstream.h to simply this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134074



More information about the libc-commits mailing list