[libcxx-commits] [libcxx] [libc++] __uglify non-conforming member typedef `base` (PR #112843)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Oct 17 23:08:26 PDT 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 6bb63002fca8a7cfa9ff8ffd86da4c2ca3d98a3b 019792c920f1b0750f7c3488d117cba6c7983c3c --extensions ,cpp -- libcxx/include/bitset libcxx/include/forward_list libcxx/include/list libcxx/test/std/containers/sequences/forwardlist/types.pass.cpp libcxx/test/std/containers/sequences/list/types.pass.cpp libcxx/test/std/utilities/template.bitset/bitset.members/nonstdmem.uglified.compile.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index a66c670c21..c649c4bea3 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -615,8 +615,8 @@ public:
typedef __bitset<__n_words, _Size> __base;
public:
- using typename __base::reference;
using typename __base::const_reference;
+ using typename __base::reference;
// 23.3.5.1 constructors:
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
@@ -683,9 +683,13 @@ public:
#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool operator[](size_t __p) const { return __base::__make_ref(__p); }
#else
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const { return __base::__make_ref(__p); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const {
+ return __base::__make_ref(__p);
+ }
#endif
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator[](size_t __p) { return __base::__make_ref(__p); }
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 reference operator[](size_t __p) {
+ return __base::__make_ref(__p);
+ }
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long to_ulong() const;
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long to_ullong() const;
template <class _CharT, class _Traits, class _Allocator>
diff --git a/libcxx/include/list b/libcxx/include/list
index 265269427f..1859667168 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -666,13 +666,13 @@ void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
class _LIBCPP_TEMPLATE_VIS list : private __list_imp<_Tp, _Alloc> {
typedef __list_imp<_Tp, _Alloc> __base;
- using typename __base::__node_type;
- using typename __base::__node_allocator;
- using typename __base::__node_pointer;
+ using typename __base::__base_pointer;
using typename __base::__node_alloc_traits;
+ using typename __base::__node_allocator;
using typename __base::__node_base;
using typename __base::__node_base_pointer;
- using typename __base::__base_pointer;
+ using typename __base::__node_pointer;
+ using typename __base::__node_type;
public:
typedef _Tp value_type;
@@ -682,12 +682,12 @@ public:
"Allocator::value_type must be same type as value_type");
typedef value_type& reference;
typedef const value_type& const_reference;
- using typename __base::pointer;
+ using typename __base::const_iterator;
using typename __base::const_pointer;
- using typename __base::size_type;
using typename __base::difference_type;
using typename __base::iterator;
- using typename __base::const_iterator;
+ using typename __base::pointer;
+ using typename __base::size_type;
typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
#if _LIBCPP_STD_VER >= 20
``````````
</details>
https://github.com/llvm/llvm-project/pull/112843
More information about the libcxx-commits
mailing list