[libcxx-commits] [libcxx] [libc++] Move more attributes to the C++11 syntax (PR #133718)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 31 06:34:12 PDT 2025
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 HEAD~1 HEAD --extensions ,h -- libcxx/include/__algorithm/simd_utils.h libcxx/include/__config libcxx/include/__functional/function.h libcxx/include/__functional/hash.h libcxx/include/__hash_table libcxx/include/__memory/addressof.h libcxx/include/__memory/shared_ptr.h libcxx/include/__memory/temp_value.h libcxx/include/__memory/unique_temporary_buffer.h libcxx/include/__new/allocate.h libcxx/include/__new/global_new_delete.h libcxx/include/__numeric/midpoint.h libcxx/include/__random/mersenne_twister_engine.h libcxx/include/__random/uniform_int_distribution.h libcxx/include/__utility/is_pointer_in_range.h libcxx/include/__utility/is_valid_range.h libcxx/include/__vector/vector.h libcxx/include/future libcxx/include/string
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__numeric/midpoint.h b/libcxx/include/__numeric/midpoint.h
index e148da4f2..a28d6c874 100644
--- a/libcxx/include/__numeric/midpoint.h
+++ b/libcxx/include/__numeric/midpoint.h
@@ -37,7 +37,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
_LIBCPP_HIDE_FROM_ABI constexpr enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_Tp>,
- _Tp> midpoint(_Tp __a, _Tp __b) noexcept {
+ _Tp>
+ midpoint(_Tp __a, _Tp __b) noexcept {
using _Up = make_unsigned_t<_Tp>;
constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1;
``````````
</details>
https://github.com/llvm/llvm-project/pull/133718
More information about the libcxx-commits
mailing list