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: I75bbf0de40859a5e507455a52ceaef9be5b686c7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/user_mgr.cpp b/user_mgr.cpp
index de4b570..09d82b1 100644
--- a/user_mgr.cpp
+++ b/user_mgr.cpp
@@ -109,8 +109,8 @@
 {
 
 // The hardcoded groups in OpenBMC projects
-constexpr std::array<const char*, 4> predefinedGroups = {"redfish", "ipmi",
-                                                         "ssh", "hostconsole"};
+constexpr std::array<const char*, 4> predefinedGroups = {
+    "redfish", "ipmi", "ssh", "hostconsole"};
 
 // These prefixes are for Dynamic Redfish authorization. See
 // https://github.com/openbmc/docs/blob/master/designs/redfish-authorization.md
@@ -154,10 +154,10 @@
     }
     return std::accumulate(std::next(vec.begin()), vec.end(), vec[0],
                            [](std::string&& val, std::string_view element) {
-        val += ',';
-        val += element;
-        return val;
-    });
+                               val += ',';
+                               val += element;
+                               return val;
+                           });
 }
 
 bool removeStringFromCSV(std::string& csvStr, const std::string& delStr)
@@ -894,8 +894,8 @@
         buflen = 1024;
     }
     std::vector<char> buffer(buflen);
-    auto status = getspnam_r(userName.c_str(), &spwd, buffer.data(), buflen,
-                             &spwdPtr);
+    auto status =
+        getspnam_r(userName.c_str(), &spwd, buffer.data(), buflen, &spwdPtr);
     // On success, getspnam_r() returns zero, and sets *spwdPtr to spwd.
     // If no matching password record was found, these functions return 0
     // and store NULL in *spwdPtr
@@ -1042,8 +1042,8 @@
         std::string basePath = "/xyz/openbmc_project/user/ldap/openldap";
         std::string interface = "xyz.openbmc_project.User.Ldap.Config";
 
-        auto ldapMgmtService = getServiceName(std::move(basePath),
-                                              std::move(interface));
+        auto ldapMgmtService =
+            getServiceName(std::move(basePath), std::move(interface));
         auto method = bus.new_method_call(
             ldapMgmtService.c_str(), ldapMgrObjBasePath,
             "org.freedesktop.DBus.ObjectManager", "GetManagedObjects");