[libcxx-commits] [libcxx] [libc++][format] P2637R3: Member `visit` (PR #76449)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 27 07:53:41 PST 2023
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 886655869cef2e0f11da8981da30d70ad7892ff9 91348f1a93bff67867e483cffbc7bac5ff2560d9 -- libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp libcxx/test/std/utilities/format/format.arguments/format.arg/visit_format_arg.deprecated.verify.cpp libcxx/include/__config libcxx/include/__format/format_arg.h libcxx/include/format libcxx/test/std/utilities/format/format.arguments/format.arg/visit.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index 1724c7c1dd..bc9e13eb90 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -159,21 +159,21 @@ _LIBCPP_HIDE_FROM_ABI _Rp __visit_format_arg(_Visitor&& __vis, basic_format_arg<
case __format::__arg_t::__long_long:
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
case __format::__arg_t::__i128:
-# ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__i128_);
-# else
+# else
__libcpp_unreachable();
-# endif
+# endif
case __format::__arg_t::__unsigned:
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
case __format::__arg_t::__unsigned_long_long:
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
case __format::__arg_t::__u128:
-# ifndef _LIBCPP_HAS_NO_INT128
+# ifndef _LIBCPP_HAS_NO_INT128
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__u128_);
-# else
+# else
__libcpp_unreachable();
-# endif
+# endif
case __format::__arg_t::__float:
return std::invoke_r<_Rp>(std::forward<_Visitor>(__vis), __arg.__value_.__float_);
case __format::__arg_t::__double:
diff --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp
index 86a09fee20..470df35ef9 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp
@@ -77,7 +77,7 @@ void test_handle(T value, ExpectedR expectedValue) {
std::same_as<ExpectedR> decltype(auto) result = format_args.get(0).template visit<ExpectedR>([](auto a) -> ExpectedR {
// TODO: This check fails
- (void) a;
+ (void)a;
// assert((std::is_same_v<decltype(a), typename std::basic_format_arg<Context>::handle>));
return make_expected_result<ExpectedR>();
``````````
</details>
https://github.com/llvm/llvm-project/pull/76449
More information about the libcxx-commits
mailing list