[libc-commits] [PATCH] D156950: [libc][cleanup] Fix most conversion warnings

Roland McGrath via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Aug 4 14:14:02 PDT 2023


mcgrathr accepted this revision.
mcgrathr added a comment.
This revision is now accepted and ready to land.

lgtm with a couple nits



================
Comment at: libc/src/__support/CPP/bit.h:52
+template <class To, class From>
+constexpr To bit_or_static_cast(const From &from) {
+  if constexpr (sizeof(To) == sizeof(From)) {
----------------
missing LIBC_INLINE


================
Comment at: libc/src/__support/OSUtil/linux/syscall.h:28
 
-template <typename... Ts>
-LIBC_INLINE long syscall_impl(long __number, Ts... ts) {
+template <typename RET_TYPE, typename... Ts>
+LIBC_INLINE RET_TYPE syscall_impl(long __number, Ts... ts) {
----------------
I'm not familiar with a style that uses all-caps for template parameters that aren't single letters.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156950



More information about the libc-commits mailing list