Skip to content

Commit 27f2bfe

Browse files
clang-format
1 parent 2ff98ea commit 27f2bfe

File tree

81 files changed

+486
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+486
-359
lines changed

libcxx/include/__iterator/erase_if_container.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ _LIBCPP_PUSH_MACROS
2222
_LIBCPP_BEGIN_NAMESPACE_STD
2323

2424
template <class _Container, class _Predicate>
25-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 typename _Container::size_type __libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
25+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 typename _Container::size_type
26+
__libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
2627
typename _Container::size_type __old_size = __c.size();
2728

2829
const typename _Container::iterator __last = __c.end();

libcxx/include/__node_handle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ private:
112112
}
113113
}
114114

115-
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 __basic_node_handle(__node_pointer_type __ptr, allocator_type const& __alloc)
115+
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26
116+
__basic_node_handle(__node_pointer_type __ptr, allocator_type const& __alloc)
116117
: __ptr_(__ptr), __alloc_(__alloc) {}
117118

118119
public:

libcxx/include/__tree

Lines changed: 193 additions & 112 deletions
Large diffs are not rendered by default.

libcxx/include/map

Lines changed: 90 additions & 43 deletions
Large diffs are not rendered by default.

libcxx/test/std/containers/associative/map/compare.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ TEST_CONSTEXPR_CXX26 bool test() {
5050
assert(!result2.second);
5151
assert(map[Key(0)] == 42);
5252
}
53-
return true;
53+
return true;
5454
}
5555

5656
int main(int, char**) {
57-
assert(test());
57+
assert(test());
5858
#if TEST_STD_VER >= 26
5959
static_assert(test());
6060
#endif

libcxx/test/std/containers/associative/map/get_allocator.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ TEST_CONSTEXPR_CXX26 bool test() {
3131
const std::map<int, std::string, std::less<int>, other_allocator<ValueType> > m(alloc);
3232
assert(m.get_allocator() == alloc);
3333
}
34-
return true;
34+
return true;
3535
}
3636

3737
int main(int, char**) {
38-
assert(test());
38+
assert(test());
3939
#if TEST_STD_VER >= 26
4040
static_assert(test());
4141
#endif

libcxx/test/std/containers/associative/map/incomplete_type.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ inline bool operator==(A const& L, A const& R) { return &L == &R; }
2929
inline bool operator<(A const& L, A const& R) { return L.data < R.data; }
3030
TEST_CONSTEXPR_CXX26 bool test() {
3131
A a;
32-
return true;
32+
return true;
3333
}
3434

3535
int main(int, char**) {
36-
assert(test());
36+
assert(test());
3737
#if TEST_STD_VER >= 26
3838
static_assert(test());
3939
#endif

libcxx/test/std/containers/associative/map/map.access/at.pass.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ TEST_CONSTEXPR_CXX26 bool test() {
4545
#ifndef TEST_HAS_NO_EXCEPTIONS
4646

4747
// throwing is not allowed in constexpr
48-
#if TEST_STD_VER < 26
48+
# if TEST_STD_VER < 26
4949
try {
5050
TEST_IGNORE_NODISCARD m.at(6);
5151
assert(false);
5252
} catch (std::out_of_range&) {
5353
}
54-
#endif
54+
# endif
5555

5656
#endif
5757
assert(m.at(7) == 7.5);
@@ -90,7 +90,7 @@ TEST_CONSTEXPR_CXX26 bool test() {
9090
assert(m.size() == 7);
9191
}
9292
#if TEST_STD_VER >= 11
93-
// #ifdef VINAY_DISABLE_FOR_NOW
93+
// #ifdef VINAY_DISABLE_FOR_NOW
9494
{
9595
typedef std::pair<const int, double> V;
9696
V ar[] = {
@@ -107,21 +107,18 @@ TEST_CONSTEXPR_CXX26 bool test() {
107107
// std::__tree_node_base<min_pointer<void>> b = d;
108108
using Base = std::__tree_node_base<min_pointer<void>>;
109109

110-
using Derived = std::__tree_node<std::__value_type<int,double>, min_pointer<void>> ;
110+
using Derived = std::__tree_node<std::__value_type<int, double>, min_pointer<void>>;
111111
static_assert(std::is_base_of_v<Base, Derived>);
112112

113-
114113
// using BaseP = min_pointer<Base>;
115114
// using DerivedP = min_pointer<Derived>;
116115
// static_assert(std::is_base_of_v<BaseP, DerivedP>);
117116
// DerivedP dp(nullptr);
118117
// (void)dp;
119118

120-
// BaseP bp =static_cast<BaseP>(dp);
119+
// BaseP bp =static_cast<BaseP>(dp);
121120
// (void)bp;
122121

123-
124-
125122
std::map<int, double, std::less<int>, min_allocator<V>> m(ar, ar + sizeof(ar) / sizeof(ar[0]));
126123
assert(m.size() == 7);
127124
assert(m.at(1) == 1.5);
@@ -134,13 +131,13 @@ TEST_CONSTEXPR_CXX26 bool test() {
134131
# ifndef TEST_HAS_NO_EXCEPTIONS
135132

136133
// throwing is not allowed in constexpr
137-
# if TEST_STD_VER < 26
134+
# if TEST_STD_VER < 26
138135
try {
139136
TEST_IGNORE_NODISCARD m.at(6);
140137
assert(false);
141138
} catch (std::out_of_range&) {
142139
}
143-
# endif
140+
# endif
144141
# endif
145142
assert(m.at(7) == 7.5);
146143
assert(m.at(8) == 8.5);
@@ -166,13 +163,13 @@ TEST_CONSTEXPR_CXX26 bool test() {
166163
assert(m.at(5) == 5.5);
167164
# ifndef TEST_HAS_NO_EXCEPTIONS
168165
// throwing is not allowed in constexpr
169-
# if TEST_STD_VER < 26
166+
# if TEST_STD_VER < 26
170167
try {
171168
TEST_IGNORE_NODISCARD m.at(6);
172169
assert(false);
173170
} catch (std::out_of_range&) {
174171
}
175-
# endif
172+
# endif
176173
# endif
177174
assert(m.at(7) == 7.5);
178175
assert(m.at(8) == 8.5);

libcxx/test/std/containers/associative/map/map.access/empty.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ TEST_CONSTEXPR_CXX26 bool test() {
3939
assert(m.empty());
4040
}
4141
#endif
42-
return true;
42+
return true;
4343
}
4444

4545
int main(int, char**) {

libcxx/test/std/containers/associative/map/map.access/index_key.pass.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ TEST_CONSTEXPR_CXX26 bool test() {
7474
assert(m[6] == 6.5);
7575
assert(m.size() == 8);
7676
}
77-
if(!TEST_IS_CONSTANT_EVALUATED)
78-
{
77+
if (!TEST_IS_CONSTANT_EVALUATED) {
7978
// Use "container_test_types.h" to check what arguments get passed
8079
// to the allocator for operator[]
8180
using Container = TCT::map<>;
@@ -136,7 +135,7 @@ TEST_CONSTEXPR_CXX26 bool test() {
136135
assert(m.size() == 8);
137136
}
138137
#endif
139-
return true;
138+
return true;
140139
}
141140

142141
int main(int, char**) {

0 commit comments

Comments
 (0)