[libc-commits] [PATCH] D114302: [libc] apply new lint rules

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Dec 1 05:00:14 PST 2021


gchatelet added a comment.

Quick comments after glancing at the change



================
Comment at: libc/src/__support/CPP/TypeTraits.h:46-53
+  static constexpr bool VALUE =
+      IS_SAME_V<char, TypeNoCV> || IS_SAME_V<signed char, TypeNoCV> ||
+      IS_SAME_V<unsigned char, TypeNoCV> || IS_SAME_V<short, TypeNoCV> ||
+      IS_SAME_V<unsigned short, TypeNoCV> || IS_SAME_V<int, TypeNoCV> ||
+      IS_SAME_V<unsigned int, TypeNoCV> || IS_SAME_V<long, TypeNoCV> ||
+      IS_SAME_V<unsigned long, TypeNoCV> || IS_SAME_V<long long, TypeNoCV> ||
+      IS_SAME_V<unsigned long long, TypeNoCV> || IS_SAME_V<bool, TypeNoCV> ||
----------------
Uppercase template member fields is very counter intuitive. I don't think I've seen this in any of the llvm projects.


================
Comment at: libc/src/string/memmove.cpp:43
   // Call `memcpy` if `src_c` and `dest_c` do not overlap.
-  if (__llvm_libc::integerAbs(src_c - dest_c) >=
+  if (__llvm_libc::integer_abs(src_c - dest_c) >=
       static_cast<ptrdiff_t>(count)) {
----------------
This memmove implementation is stale (it's been updated)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114302



More information about the libc-commits mailing list