Skip to content

Commit 19b04b6

Browse files
committed
clang-format
1 parent f732515 commit 19b04b6

File tree

4 files changed

+22
-25
lines changed

4 files changed

+22
-25
lines changed

libcxx/test/libcxx/containers/views/mdspan/extents/assert.ctor_from_array.pass.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,27 +43,18 @@ int main(int, char**) {
4343
}
4444
// mismatch of static extent
4545
{
46-
TEST_LIBCPP_ASSERT_FAILURE(
47-
([] {
48-
[[maybe_unused]] std::extents<int, D, 5> e1(std::array{1000, 3});
49-
}()),
50-
"extents construction: mismatch of provided arguments with static extents.");
46+
TEST_LIBCPP_ASSERT_FAILURE(([] { [[maybe_unused]] std::extents<int, D, 5> e1(std::array{1000, 3}); }()),
47+
"extents construction: mismatch of provided arguments with static extents.");
5148
}
5249
// value out of range
5350
{
54-
TEST_LIBCPP_ASSERT_FAILURE(
55-
([] {
56-
[[maybe_unused]] std::extents<signed char, D, 5> e1(std::array{1000, 5});
57-
}()),
58-
"extents ctor: arguments must be representable as index_type and nonnegative");
51+
TEST_LIBCPP_ASSERT_FAILURE(([] { [[maybe_unused]] std::extents<signed char, D, 5> e1(std::array{1000, 5}); }()),
52+
"extents ctor: arguments must be representable as index_type and nonnegative");
5953
}
6054
// negative value
6155
{
62-
TEST_LIBCPP_ASSERT_FAILURE(
63-
([] {
64-
[[maybe_unused]] std::extents<signed char, D, 5> e1(std::array{-1, 5});
65-
}()),
66-
"extents ctor: arguments must be representable as index_type and nonnegative");
56+
TEST_LIBCPP_ASSERT_FAILURE(([] { [[maybe_unused]] std::extents<signed char, D, 5> e1(std::array{-1, 5}); }()),
57+
"extents ctor: arguments must be representable as index_type and nonnegative");
6758
}
6859
return 0;
6960
}

libcxx/test/libcxx/containers/views/mdspan/layout_stride/assert.conversion.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ int main(int, char**) {
5858
{
5959
std::extents<int, D, D> arg_exts{100, 5};
6060
std::layout_stride::mapping<std::extents<int, D, D>> arg(arg_exts, std::array<int, 2>{1, 100});
61-
TEST_LIBCPP_ASSERT_FAILURE(([=] { [[maybe_unused]] std::layout_stride::mapping<std::extents<int, D, 3>> m(arg); }()),
62-
"extents construction: mismatch of provided arguments with static extents.");
61+
TEST_LIBCPP_ASSERT_FAILURE(
62+
([=] { [[maybe_unused]] std::layout_stride::mapping<std::extents<int, D, 3>> m(arg); }()),
63+
"extents construction: mismatch of provided arguments with static extents.");
6364
}
6465
// non-representability of extents itself
6566
{

libcxx/test/support/check_assertion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ MatchResult MatchAssertionMessage(const std::string& text, std::string_view expe
6565
std::stringstream matching_error;
6666
matching_error //
6767
<< "Failed to parse the assertion message.\n" //
68-
<< "Using marker: " << use_marker << "\n" //
68+
<< "Using marker: " << use_marker << "\n" //
6969
<< "Expected message: '" << expected_message.data() << "'\n" //
7070
<< "Stderr contents: '" << text.c_str() << "'\n";
7171
return MatchResult(/*success=*/false, matching_error.str());

libcxxabi/src/demangle/DemangleConfig.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
#endif
2121

2222
#ifndef _LIBCPP_LOG_ERROR
23-
// Libc++abi does not have any functionality to log and continue, so we drop error messages when we build the demangler
24-
// with `observe` assertion semantic. Once the layering with libc++ is improved, this could use the libc++ functionality
25-
// to log hardening failures.
23+
// Libc++abi does not have any functionality to log and continue, so we drop
24+
// error messages when we build the demangler with `observe` assertion semantic.
25+
// Once the layering with libc++ is improved, this could use the libc++
26+
// functionality to log hardening failures.
2627
#define _LIBCPP_LOG_ERROR(reason, message) ((void)0)
2728
#endif
2829

@@ -53,11 +54,11 @@
5354

5455
#ifndef DEMANGLE_GNUC_PREREQ
5556
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
56-
#define DEMANGLE_GNUC_PREREQ(maj, min, patch) \
57+
#define DEMANGLE_GNUC_PREREQ(maj, min, patch) \
5758
((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) + __GNUC_PATCHLEVEL__ >= \
5859
((maj) << 20) + ((min) << 10) + (patch))
5960
#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
60-
#define DEMANGLE_GNUC_PREREQ(maj, min, patch) \
61+
#define DEMANGLE_GNUC_PREREQ(maj, min, patch) \
6162
((__GNUC__ << 20) + (__GNUC_MINOR__ << 10) >= ((maj) << 20) + ((min) << 10))
6263
#else
6364
#define DEMANGLE_GNUC_PREREQ(maj, min, patch) 0
@@ -111,7 +112,11 @@
111112
#define DEMANGLE_ASSERT(__expr, __msg) assert((__expr) && (__msg))
112113
#endif
113114

114-
#define DEMANGLE_NAMESPACE_BEGIN namespace { namespace itanium_demangle {
115-
#define DEMANGLE_NAMESPACE_END } }
115+
#define DEMANGLE_NAMESPACE_BEGIN \
116+
namespace { \
117+
namespace itanium_demangle {
118+
#define DEMANGLE_NAMESPACE_END \
119+
} \
120+
}
116121

117122
#endif // LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H

0 commit comments

Comments
 (0)