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: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/tools/test/tools_bt_unittest.cpp b/tools/test/tools_bt_unittest.cpp
index e1a091b..3d2c181 100644
--- a/tools/test/tools_bt_unittest.cpp
+++ b/tools/test/tools_bt_unittest.cpp
@@ -58,10 +58,11 @@
 
     EXPECT_CALL(sysMock, read(fd, NotNull(), _))
         .WillOnce(Invoke([&](int, void* buf, std::size_t count) {
-        EXPECT_TRUE(count > bytes.size());
-        std::memcpy(buf, bytes.data(), bytes.size());
-        return bytes.size();
-    })).WillOnce(Return(0));
+            EXPECT_TRUE(count > bytes.size());
+            std::memcpy(buf, bytes.data(), bytes.size());
+            return bytes.size();
+        }))
+        .WillOnce(Return(0));
 
     EXPECT_CALL(progMock, updateProgress(bytes.size()));
 
@@ -99,10 +100,10 @@
 
     EXPECT_CALL(sysMock, read(fd, NotNull(), _))
         .WillOnce(Invoke([&](int, void* buf, std::size_t count) {
-        EXPECT_TRUE(count > bytes.size());
-        std::memcpy(buf, bytes.data(), bytes.size());
-        return bytes.size();
-    }));
+            EXPECT_TRUE(count > bytes.size());
+            std::memcpy(buf, bytes.data(), bytes.size());
+            return bytes.size();
+        }));
 
     EXPECT_CALL(blobMock, writeBytes(session, 0, ContainerEq(bytes)))
         .WillOnce(Throw(ipmiblob::BlobException("failure")));
diff --git a/tools/test/tools_helper_unittest.cpp b/tools/test/tools_helper_unittest.cpp
index 572e136..cfe5208 100644
--- a/tools/test/tools_helper_unittest.cpp
+++ b/tools/test/tools_helper_unittest.cpp
@@ -51,8 +51,8 @@
 {
     ipmiblob::StatResponse blobResponse = {};
     /* the other details of the response are ignored, and should be. */
-    blobResponse.blob_state = blobs::StateFlags::open_read |
-                              blobs::StateFlags::committed;
+    blobResponse.blob_state =
+        blobs::StateFlags::open_read | blobs::StateFlags::committed;
 
     EXPECT_CALL(blobMock, getStat(TypedEq<std::uint16_t>(session)))
         .WillOnce(Return(blobResponse));
diff --git a/tools/test/tools_lpc_unittest.cpp b/tools/test/tools_lpc_unittest.cpp
index 2ecbaf0..b180df5 100644
--- a/tools/test/tools_lpc_unittest.cpp
+++ b/tools/test/tools_lpc_unittest.cpp
@@ -56,16 +56,17 @@
         .WillOnce(Return(fakeFileSize));
     EXPECT_CALL(sysMock, read(_, NotNull(), Gt(data.size())))
         .WillOnce(Invoke([&data](int, void* buf, std::size_t) {
-        std::memcpy(buf, data.data(), data.size());
-        return data.size();
-    })).WillOnce(Return(0));
+            std::memcpy(buf, data.data(), data.size());
+            return data.size();
+        }))
+        .WillOnce(Return(0));
 
     EXPECT_CALL(ioMock, write(_, data.size(), _))
         .WillOnce(Invoke([&data](const std::size_t, const std::size_t,
                                  const void* const source) {
-        EXPECT_THAT(std::memcmp(source, data.data(), data.size()), 0);
-        return true;
-    }));
+            EXPECT_THAT(std::memcmp(source, data.data(), data.size()), 0);
+            return true;
+        }));
 
     EXPECT_CALL(blobMock, writeBytes(session, 0, _));
 
diff --git a/tools/test/tools_net_unittest.cpp b/tools/test/tools_net_unittest.cpp
index cb8776f..8c88ba9 100644
--- a/tools/test/tools_net_unittest.cpp
+++ b/tools/test/tools_net_unittest.cpp
@@ -134,9 +134,9 @@
     EXPECT_CALL(sysMock, socket(AF_INET6, SOCK_STREAM, 0))
         .WillOnce(Return(connFd));
     EXPECT_CALL(sysMock, close(connFd)).WillOnce(Return(0));
-    EXPECT_CALL(
-        sysMock,
-        connect(connFd, reinterpret_cast<struct sockaddr*>(&sa), sizeof(sa)))
+    EXPECT_CALL(sysMock,
+                connect(connFd, reinterpret_cast<struct sockaddr*>(&sa),
+                        sizeof(sa)))
         .WillOnce(SetErrnoAndReturn(ECONNREFUSED, -1));
 
     EXPECT_FALSE(handler.sendContents(filePath, session));
@@ -232,9 +232,9 @@
         InSequence seq;
         EXPECT_CALL(sysMock, sendfile(connFd, inFd, _, _))
             .WillOnce([](int, int, off_t*, size_t) {
-            errno = EINVAL;
-            return -1;
-        });
+                errno = EINVAL;
+                return -1;
+            });
 
         std::vector<uint8_t> chunk(chunkSize);
         for (std::uint32_t offset = 0; offset < fakeFileSize;
@@ -246,16 +246,16 @@
             }
             EXPECT_CALL(sysMock, read(inFd, _, Ge(chunkSize)))
                 .WillOnce([chunk](int, void* buf, size_t) {
-                memcpy(buf, chunk.data(), chunkSize);
-                return chunkSize;
-            });
+                    memcpy(buf, chunk.data(), chunkSize);
+                    return chunkSize;
+                });
             EXPECT_CALL(sysMock, send(connFd, _, chunkSize, 0))
                 .WillOnce([chunk](int, const void* data, size_t len, int) {
-                std::vector<uint8_t> dcopy(len);
-                memcpy(dcopy.data(), data, len);
-                EXPECT_THAT(dcopy, ContainerEq(chunk));
-                return chunkSize;
-            });
+                    std::vector<uint8_t> dcopy(len);
+                    memcpy(dcopy.data(), data, len);
+                    EXPECT_THAT(dcopy, ContainerEq(chunk));
+                    return chunkSize;
+                });
             EXPECT_CALL(blobMock,
                         writeBytes(session, offset, ContainerEq(chunkBytes)));
             EXPECT_CALL(progMock, updateProgress(chunkSize));
diff --git a/tools/test/tools_pci_unittest.cpp b/tools/test/tools_pci_unittest.cpp
index 96a204a..c3ce610 100644
--- a/tools/test/tools_pci_unittest.cpp
+++ b/tools/test/tools_pci_unittest.cpp
@@ -338,8 +338,8 @@
 INSTANTIATE_TEST_SUITE_P(Default, PciSetupTest,
                          ::testing::Values(&nuvotonDevice, &aspeedDevice),
                          [](const testing::TestParamInfo<Device*>& info) {
-    return info.param->getName();
-});
+                             return info.param->getName();
+                         });
 
 TEST(NuvotonWriteTest, TooLarge)
 {
@@ -660,8 +660,8 @@
 
     {
         std::vector<std::uint8_t> enabledRegion(mockRegionSize);
-        enabledRegion[AspeedDevice::config] = defaultVal |
-                                              AspeedDevice::bridgeEnabled;
+        enabledRegion[AspeedDevice::config] =
+            defaultVal | AspeedDevice::bridgeEnabled;
         EXPECT_THAT(region, ContainerEq(enabledRegion));
     }
 
@@ -689,13 +689,13 @@
     expectSetup(pciMock, dev, &aspeedDevice, region.data());
 
     /* Setting skipBridgeDisable to true */
-    std::unique_ptr<PciBridgeIntf> bridge = aspeedDevice.getBridge(&pciMock,
-                                                                   true);
+    std::unique_ptr<PciBridgeIntf> bridge =
+        aspeedDevice.getBridge(&pciMock, true);
 
     {
         std::vector<std::uint8_t> enabledRegion(mockRegionSize);
-        enabledRegion[AspeedDevice::config] = defaultVal |
-                                              AspeedDevice::bridgeEnabled;
+        enabledRegion[AspeedDevice::config] =
+            defaultVal | AspeedDevice::bridgeEnabled;
         EXPECT_THAT(region, ContainerEq(enabledRegion));
     }
 
@@ -703,8 +703,8 @@
 
     {
         std::vector<std::uint8_t> disabledRegion(mockRegionSize);
-        disabledRegion[AspeedDevice::config] = defaultVal |
-                                               AspeedDevice::bridgeEnabled;
+        disabledRegion[AspeedDevice::config] =
+            defaultVal | AspeedDevice::bridgeEnabled;
         EXPECT_THAT(region, ContainerEq(disabledRegion));
     }
 }
@@ -726,8 +726,8 @@
 
     {
         std::vector<std::uint8_t> enabledRegion(mockRegionSize);
-        enabledRegion[AspeedDevice::config] = defaultVal |
-                                              AspeedDevice::bridgeEnabled;
+        enabledRegion[AspeedDevice::config] =
+            defaultVal | AspeedDevice::bridgeEnabled;
         EXPECT_THAT(region, ContainerEq(enabledRegion));
     }
 
diff --git a/tools/test/tools_updater_unittest.cpp b/tools/test/tools_updater_unittest.cpp
index acaaee7..fd795ee 100644
--- a/tools/test/tools_updater_unittest.cpp
+++ b/tools/test/tools_updater_unittest.cpp
@@ -235,8 +235,8 @@
     EXPECT_CALL(blobMock, openBlob(ipmi_flash::biosVersionBlobId, _))
         .WillOnce(Return(session));
     ipmiblob::StatResponse readVersionResponse = {};
-    readVersionResponse.blob_state = blobs::StateFlags::open_read |
-                                     blobs::StateFlags::committed;
+    readVersionResponse.blob_state =
+        blobs::StateFlags::open_read | blobs::StateFlags::committed;
     readVersionResponse.size = 10;
     EXPECT_CALL(blobMock, getStat(TypedEq<std::uint16_t>(session)))
         .WillOnce(Return(readVersionResponse));
@@ -253,8 +253,8 @@
     EXPECT_CALL(blobMock, openBlob(ipmi_flash::biosVersionBlobId, _))
         .WillOnce(Return(session));
     ipmiblob::StatResponse readVersionResponse = {};
-    readVersionResponse.blob_state = blobs::StateFlags::open_read |
-                                     blobs::StateFlags::committed;
+    readVersionResponse.blob_state =
+        blobs::StateFlags::open_read | blobs::StateFlags::committed;
     readVersionResponse.size = 10;
     EXPECT_CALL(blobMock, getStat(TypedEq<std::uint16_t>(session)))
         .WillOnce(Return(readVersionResponse));
@@ -288,8 +288,8 @@
         .Times(3)
         .WillRepeatedly(Return(session));
     ipmiblob::StatResponse readVersionResponse = {};
-    readVersionResponse.blob_state = blobs::StateFlags::open_read |
-                                     blobs::StateFlags::committed;
+    readVersionResponse.blob_state =
+        blobs::StateFlags::open_read | blobs::StateFlags::committed;
     readVersionResponse.size = 10;
     EXPECT_CALL(blobMock, getStat(TypedEq<std::uint16_t>(session)))
         .Times(3)