[libc-commits] [libc] [libc] rename cpp::count_ones to cpp::popcount to better mirror std:: (PR #84388)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 7 13:54:33 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 167b90d0401d0fe488195c7e3d6fc1edc8fc5d94 64c92d1485979ad40bbd477ae556985b50854d5c -- libc/src/__support/CPP/bit.h libc/src/stdbit/stdc_count_ones_uc.cpp libc/src/stdbit/stdc_count_ones_ui.cpp libc/src/stdbit/stdc_count_ones_ul.cpp libc/src/stdbit/stdc_count_ones_ull.cpp libc/src/stdbit/stdc_count_ones_us.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h
index 015a55cc53..9c74a34694 100644
--- a/libc/src/__support/CPP/bit.h
+++ b/libc/src/__support/CPP/bit.h
@@ -283,7 +283,7 @@ popcount(T value) {
}
#define ADD_SPECIALIZATION(TYPE, BUILTIN) \
template <> \
- [[nodiscard]] LIBC_INLINE constexpr int popcount<TYPE>(TYPE value) { \
+ [[nodiscard]] LIBC_INLINE constexpr int popcount<TYPE>(TYPE value) { \
return BUILTIN(value); \
}
ADD_SPECIALIZATION(unsigned char, __builtin_popcount)
``````````
</details>
https://github.com/llvm/llvm-project/pull/84388
More information about the libc-commits
mailing list