[Lldb-commits] [clang-tools-extra] [compiler-rt] [libc] [lldb] [llvm] [libcxx] [clang] [flang] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2023-12-29 Thread via lldb-commits

github-actions[bot] wrote:




:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:



You can test this locally with the following command:


``bash
git-clang-format --diff 886655869cef2e0f11da8981da30d70ad7892ff9 
4d3ff8bd92f92404db1d1dd56e8ff4a5b5226dbb -- 
libcxx/test/std/utilities/variant/variant.visit/member.visit.pass.cpp 
libcxx/test/std/utilities/variant/variant.visit/member.visit.robust_against_adl.pass.cpp
 
libcxx/test/std/utilities/variant/variant.visit/member.visit_return_type.pass.cpp
 libcxx/include/variant 
libcxx/test/std/utilities/variant/variant.visit/visit.return_type.pass.cpp 
libcxx/test/std/utilities/variant/variant.visit/visit.robust_against_adl.pass.cpp
``





View the diff from clang-format here.


``diff
diff --git 
a/libcxx/test/std/utilities/variant/variant.visit/visit.return_type.pass.cpp 
b/libcxx/test/std/utilities/variant/variant.visit/visit.return_type.pass.cpp
index eb425c07f9..246b01a68f 100644
--- a/libcxx/test/std/utilities/variant/variant.visit/visit.return_type.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.visit/visit.return_type.pass.cpp
@@ -26,7 +26,7 @@ template 
 void test_call_operator_forwarding() {
   using Fn = ForwardingCallObject;
   Fn obj{};
-  const Fn &cobj = obj;
+  const Fn& cobj = obj;
   { // test call operator forwarding - no variant
 std::visit(obj);
 assert(Fn::check_call<>(CT_NonConst | CT_LValue));
@@ -41,63 +41,63 @@ void test_call_operator_forwarding() {
 using V = std::variant;
 V v(42);
 std::visit(obj, v);
-assert(Fn::check_call(CT_NonConst | CT_LValue));
+assert(Fn::check_call(CT_NonConst | CT_LValue));
 std::visit(cobj, v);
-assert(Fn::check_call(CT_Const | CT_LValue));
+assert(Fn::check_call(CT_Const | CT_LValue));
 std::visit(std::move(obj), v);
-assert(Fn::check_call(CT_NonConst | CT_RValue));
+assert(Fn::check_call(CT_NonConst | CT_RValue));
 std::visit(std::move(cobj), v);
-assert(Fn::check_call(CT_Const | CT_RValue));
+assert(Fn::check_call(CT_Const | CT_RValue));
   }
   { // test call operator forwarding - single variant, multi arg
 using V = std::variant;
 V v(42l);
 std::visit(obj, v);
-assert(Fn::check_call(CT_NonConst | CT_LValue));
+assert(Fn::check_call(CT_NonConst | CT_LValue));
 std::visit(cobj, v);
-assert(Fn::check_call(CT_Const | CT_LValue));
+assert(Fn::check_call(CT_Const | CT_LValue));
 std::visit(std::move(obj), v);
-assert(Fn::check_call(CT_NonConst | CT_RValue));
+assert(Fn::check_call(CT_NonConst | CT_RValue));
 std::visit(std::move(cobj), v);
-assert(Fn::check_call(CT_Const | CT_RValue));
+assert(Fn::check_call(CT_Const | CT_RValue));
   }
   { // test call operator forwarding - multi variant, multi arg
-using V = std::variant;
-using V2 = std::variant;
+using V  = std::variant;
+using V2 = std::variant;
 V v(42l);
 V2 v2("hello");
 std::visit(obj, v, v2);
-assert((Fn::check_call(CT_NonConst | CT_LValue)));
+assert((Fn::check_call(CT_NonConst | CT_LValue)));
 std::visit(cobj, v, v2);
-assert((Fn::check_call(CT_Const | CT_LValue)));
+assert((Fn::check_call(CT_Const | CT_LValue)));
 std::visit(std::move(obj), v, v2);
-assert((Fn::check_call(CT_NonConst | CT_RValue)));
+assert((Fn::check_call(CT_NonConst | CT_RValue)));
 std::visit(std::move(cobj), v, v2);
-assert((Fn::check_call(CT_Const | CT_RValue)));
+assert((Fn::check_call(CT_Const | CT_RValue)));
   }
   {
 using V = std::variant;
 V v1(42l), v2("hello"), v3(101), v4(1.1);
 std::visit(obj, v1, v2, v3, v4);
-assert((Fn::check_call(CT_NonConst 
| CT_LValue)));
+assert((Fn::check_call(CT_NonConst | 
CT_LValue)));
 std::visit(cobj, v1, v2, v3, v4);
-assert((Fn::check_call(CT_Const | 
CT_LValue)));
+assert((Fn::check_call(CT_Const | 
CT_LValue)));
 std::visit(std::move(obj), v1, v2, v3, v4);
-assert((Fn::check_call(CT_NonConst 
| CT_RValue)));
+assert((Fn::check_call(CT_NonConst | 
CT_RValue)));
 std::visit(std::move(cobj), v1, v2, v3, v4);
-assert((Fn::check_call(CT_Const | 
CT_RValue)));
+assert((Fn::check_call(CT_Const | 
CT_RValue)));
   }
   {
 using V = std::variant;
 V v1(42l), v2("hello"), v3(nullptr), v4(1.1);
 std::visit(obj, v1, v2, v3, v4);
-assert((Fn::check_call(CT_NonConst | CT_LValue)));
+assert((Fn::check_call(CT_NonConst | 
CT_LValue)));
 std::visit(cobj, v1, v2, v3, v4);
-assert((Fn::check_call(CT_Const | 
CT_LValue)));
+assert((Fn::check_call(CT_Const | 
CT_LValue)));
 std::visit(std::move(obj), v1, v2, v3, v4);
-assert((Fn::check_call(CT_NonConst | CT_RValue)));
+assert((Fn::check_call(CT_NonConst | 
CT_RValue)));
 std::visit(std::move(cobj), v1, v2, v3, v4);
-assert((Fn::check_call(CT_Const | 
CT_RValue)));
+assert((Fn::check_call(CT_Const | 
CT_RValue)));
   }
 }
 
@@ -109,69

[Lldb-commits] [compiler-rt] [clang] [libc] [lldb] [libcxx] [clang-tools-extra] [llvm] [flang] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2023-12-29 Thread Hristo Hristov via lldb-commits

https://github.com/H-G-Hristov edited 
https://github.com/llvm/llvm-project/pull/76447
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [compiler-rt] [clang] [libc] [lldb] [libcxx] [clang-tools-extra] [llvm] [flang] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

2023-12-29 Thread Hristo Hristov via lldb-commits

https://github.com/H-G-Hristov edited 
https://github.com/llvm/llvm-project/pull/76447
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits