clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version.  The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/test/http/http2_connection_test.cpp b/test/http/http2_connection_test.cpp
index 0385ed6..de77d7e 100644
--- a/test/http/http2_connection_test.cpp
+++ b/test/http/http2_connection_test.cpp
@@ -68,8 +68,8 @@
         nghttp2_nv nv;
         int inflateFlags = 0;
         const uint8_t* data = std::bit_cast<const uint8_t*>(dataField.data());
-        ssize_t parsed = inflater.hd2(&nv, &inflateFlags, data,
-                                      dataField.size(), 1);
+        ssize_t parsed =
+            inflater.hd2(&nv, &inflateFlags, data, dataField.size(), 1);
 
         ASSERT_GT(parsed, 0);
         dataField.remove_prefix(static_cast<size_t>(parsed));
diff --git a/test/http/http_response_test.cpp b/test/http/http_response_test.cpp
index 3bc0c9c..6aa40ee 100644
--- a/test/http/http_response_test.cpp
+++ b/test/http/http_response_test.cpp
@@ -37,13 +37,13 @@
     boost::beast::http::response_serializer<bmcweb::HttpBody> sr{m};
     sr.split(true);
     // Reads buffers into ret
-    auto reader = [&sr, &ret](const boost::system::error_code& ec2,
-                              const auto& buffer) {
-        EXPECT_FALSE(ec2);
-        std::string ret2 = boost::beast::buffers_to_string(buffer);
-        sr.consume(ret2.size());
-        ret += ret2;
-    };
+    auto reader =
+        [&sr, &ret](const boost::system::error_code& ec2, const auto& buffer) {
+            EXPECT_FALSE(ec2);
+            std::string ret2 = boost::beast::buffers_to_string(buffer);
+            sr.consume(ret2.size());
+            ret += ret2;
+        };
     boost::system::error_code ec;
 
     // Read headers
diff --git a/test/http/mutual_tls.cpp b/test/http/mutual_tls.cpp
index 9d964bf..e354466 100644
--- a/test/http/mutual_tls.cpp
+++ b/test/http/mutual_tls.cpp
@@ -120,8 +120,8 @@
 
     boost::asio::ip::address ip;
     boost::asio::ssl::verify_context ctx(x509Store.get());
-    std::shared_ptr<persistent_data::UserSession> session = verifyMtlsUser(ip,
-                                                                           ctx);
+    std::shared_ptr<persistent_data::UserSession> session =
+        verifyMtlsUser(ip, ctx);
     ASSERT_THAT(session, NotNull());
     EXPECT_THAT(session->username, "user");
 }
@@ -134,8 +134,8 @@
         OSSLX509 x509;
         x509.setSubjectName();
 
-        X509_EXTENSION* ex = X509V3_EXT_conf_nid(nullptr, nullptr,
-                                                 NID_key_usage, usageString);
+        X509_EXTENSION* ex =
+            X509V3_EXT_conf_nid(nullptr, nullptr, NID_key_usage, usageString);
 
         ASSERT_THAT(ex, NotNull());
         ASSERT_EQ(X509_add_ext(x509.get(), ex, -1), 1);
@@ -164,8 +164,8 @@
 
     boost::asio::ip::address ip;
     boost::asio::ssl::verify_context ctx(x509Store.get());
-    std::shared_ptr<persistent_data::UserSession> session = verifyMtlsUser(ip,
-                                                                           ctx);
+    std::shared_ptr<persistent_data::UserSession> session =
+        verifyMtlsUser(ip, ctx);
     ASSERT_THAT(session, IsNull());
 }
 } // namespace
diff --git a/test/http/router_test.cpp b/test/http/router_test.cpp
index 2372541..e0e5b7a 100644
--- a/test/http/router_test.cpp
+++ b/test/http/router_test.cpp
@@ -30,8 +30,8 @@
 TEST(Router, AllowHeader)
 {
     // Callback handler that does nothing
-    auto nullCallback = [](const Request&,
-                           const std::shared_ptr<bmcweb::AsyncResp>&) {};
+    auto nullCallback =
+        [](const Request&, const std::shared_ptr<bmcweb::AsyncResp>&) {};
 
     Router router;
     std::error_code ec;
@@ -65,17 +65,17 @@
 TEST(Router, OverlapingRoutes)
 {
     // Callback handler that does nothing
-    auto fooCallback = [](const Request&,
-                          const std::shared_ptr<bmcweb::AsyncResp>&) {
-        EXPECT_FALSE(true);
-    };
+    auto fooCallback =
+        [](const Request&, const std::shared_ptr<bmcweb::AsyncResp>&) {
+            EXPECT_FALSE(true);
+        };
     bool barCalled = false;
     auto foobarCallback =
         [&barCalled](const Request&, const std::shared_ptr<bmcweb::AsyncResp>&,
                      const std::string& bar) {
-        barCalled = true;
-        EXPECT_EQ(bar, "bar");
-    };
+            barCalled = true;
+            EXPECT_EQ(bar, "bar");
+        };
 
     Router router;
     std::error_code ec;
@@ -105,8 +105,8 @@
     auto nullCallback =
         [&notFoundCalled](const Request&,
                           const std::shared_ptr<bmcweb::AsyncResp>&) {
-        notFoundCalled = true;
-    };
+            notFoundCalled = true;
+        };
 
     Router router;
     std::error_code ec;
@@ -131,13 +131,13 @@
 TEST(Router, 405)
 {
     // Callback handler that does nothing
-    auto nullCallback = [](const Request&,
-                           const std::shared_ptr<bmcweb::AsyncResp>&) {};
+    auto nullCallback =
+        [](const Request&, const std::shared_ptr<bmcweb::AsyncResp>&) {};
     bool called = false;
     auto notAllowedCallback =
         [&called](const Request&, const std::shared_ptr<bmcweb::AsyncResp>&) {
-        called = true;
-    };
+            called = true;
+        };
 
     Router router;
     std::error_code ec;
diff --git a/test/http/server_sent_event_test.cpp b/test/http/server_sent_event_test.cpp
index d8d8836..4d86f56 100644
--- a/test/http/server_sent_event_test.cpp
+++ b/test/http/server_sent_event_test.cpp
@@ -31,10 +31,10 @@
     Request req;
 
     bool openCalled = false;
-    auto openHandler = [&openCalled](Connection&,
-                                     const Request& /*handedReq*/) {
-        openCalled = true;
-    };
+    auto openHandler =
+        [&openCalled](Connection&, const Request& /*handedReq*/) {
+            openCalled = true;
+        };
     bool closeCalled = false;
     auto closeHandler = [&closeCalled](Connection&) { closeCalled = true; };
 
@@ -86,10 +86,11 @@
     // Send second event
     {
         conn->sendEvent("TestEventId2", "TestEvent\nContent2");
-        constexpr std::string_view expected = "id: TestEventId2\n"
-                                              "data: TestEvent\n"
-                                              "data: Content2\n"
-                                              "\n";
+        constexpr std::string_view expected =
+            "id: TestEventId2\n"
+            "data: TestEvent\n"
+            "data: Content2\n"
+            "\n";
 
         while (out.str().size() < expected.size())
         {