[libc-commits] [PATCH] D114302: [libc] apply new lint rules
Guillaume Chatelet via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Dec 2 08:00:45 PST 2021
gchatelet added inline comments.
================
Comment at: libc/src/string/memory_utils/elements.h:89
template <typename Element, size_t ElementCount> struct Repeated {
- static constexpr size_t kSize = ElementCount * Element::kSize;
+ static constexpr size_t K_SIZE = ElementCount * Element::K_SIZE;
----------------
Actually, now that it's uppercased there's no need for the `K_`, it could just be `SIZE`.
I'm a bit concerned that the `constexpr` variable really look and feel like a MACRO now.
I liked the visual hint that it was a typed variable and not something that the preprocessor might control.
@sivachandra WDYT?
================
Comment at: libc/src/string/memory_utils/memcpy_implementations.h:49
// Whether to use only rep;movsb.
- constexpr bool kUseOnlyRepMovsb =
+ constexpr bool K_USE_ONLY_REP_MOVSB =
LLVM_LIBC_IS_DEFINED(LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB);
----------------
Same here in this file, no need for the `K_`.
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