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: Id2036ab746164981596b3ee36259f3ca5d3f1334
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/include/biosxml.hpp b/include/biosxml.hpp
index 8881fdf..1e69454 100644
--- a/include/biosxml.hpp
+++ b/include/biosxml.hpp
@@ -92,8 +92,7 @@
          std::string descriptionStr, std::string defaultStr,
          std::string promptStr, std::string depexStr,
          std::string& setupTypeStr) :
-        depex(false),
-        readOnly(("ReadOnly" == setupTypeStr) ? true : false),
+        depex(false), readOnly(("ReadOnly" == setupTypeStr) ? true : false),
         currentVal(currentVal), nameStr(std::move(nameStr)),
         currentValStr(std::move(currentValStr)),
         descriptionStr(std::move(descriptionStr)),
@@ -177,8 +176,8 @@
     {
         return !s.empty() &&
                std::find_if(s.begin(), s.end(), [](unsigned char c) {
-            return !std::isdigit(c);
-        }) == s.end();
+                   return !std::isdigit(c);
+               }) == s.end();
     }
 
     /* Returns 'true' if the argument string is hex representation of a number.
@@ -203,8 +202,8 @@
             }
         }
 
-        std::string error = "Unable to find knob: " + variableName +
-                            " in knob list\n";
+        std::string error =
+            "Unable to find knob: " + variableName + " in knob list\n";
         phosphor::logging::log<phosphor::logging::level::ERR>(error.c_str());
 
         return false;
@@ -676,8 +675,8 @@
     {
         if (!getKnobs(filePath))
         {
-            std::string error = "Unable to get knobs in file: " +
-                                std::string(filePath);
+            std::string error =
+                "Unable to get knobs in file: " + std::string(filePath);
             throw std::runtime_error(error);
         }
     }
diff --git a/include/bridgingcommands.hpp b/include/bridgingcommands.hpp
index 9123174..8fbbc8d 100644
--- a/include/bridgingcommands.hpp
+++ b/include/bridgingcommands.hpp
@@ -74,9 +74,9 @@
 constexpr size_t ipmbChecksum2StartOffset = 3;
 constexpr size_t ipmbChecksumSize = 1;
 constexpr size_t ipmbMinFrameLength = 7;
-constexpr size_t ipmbMaxFrameLength = ipmbConnectionHeaderLength +
-                                      ipmbResponseDataHeaderLength +
-                                      ipmbChecksumSize + ipmbMaxDataSize;
+constexpr size_t ipmbMaxFrameLength =
+    ipmbConnectionHeaderLength + ipmbResponseDataHeaderLength +
+    ipmbChecksumSize + ipmbMaxDataSize;
 
 /**
  * @brief Channel types
diff --git a/include/commandutils.hpp b/include/commandutils.hpp
index 7ed49c8..12d8b2b 100644
--- a/include/commandutils.hpp
+++ b/include/commandutils.hpp
@@ -37,10 +37,9 @@
     }
 }
 
-inline static void ipmiPrintAndRegister(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
-                                        ipmi_context_t context,
-                                        ipmid_callback_t handler,
-                                        ipmi_cmd_privilege_t priv)
+inline static void ipmiPrintAndRegister(
+    ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_context_t context,
+    ipmid_callback_t handler, ipmi_cmd_privilege_t priv)
 {
     printRegistration(netfn, cmd);
     ipmi_register_callback(netfn, cmd, context, handler, priv);
diff --git a/include/ipmi_to_redfish_hooks.hpp b/include/ipmi_to_redfish_hooks.hpp
index aefc85c..76f8b92 100644
--- a/include/ipmi_to_redfish_hooks.hpp
+++ b/include/ipmi_to_redfish_hooks.hpp
@@ -82,8 +82,8 @@
     // Log the record as a default Redfish message instead of a SEL record
 
     static const std::string openBMCMessageRegistryVersion("0.1");
-    std::string messageID = "OpenBMC." + openBMCMessageRegistryVersion +
-                            ".SELEntryAdded";
+    std::string messageID =
+        "OpenBMC." + openBMCMessageRegistryVersion + ".SELEntryAdded";
 
     std::vector<std::string> messageArgs;
     messageArgs.push_back(ipmiRaw);
diff --git a/include/manufacturingcommands.hpp b/include/manufacturingcommands.hpp
index f8eae09..7c85219 100644
--- a/include/manufacturingcommands.hpp
+++ b/include/manufacturingcommands.hpp
@@ -270,8 +270,8 @@
     {
         auto it = std::find_if(ledPropertyList.begin(), ledPropertyList.end(),
                                [&signal](const LedProperty& led) {
-            return led.getSignal() == signal;
-        });
+                                   return led.getSignal() == signal;
+                               });
         if (it != ledPropertyList.end())
         {
             return &(*it);
diff --git a/include/sdrutils.hpp b/include/sdrutils.hpp
index 9ec1611..ed28314 100644
--- a/include/sdrutils.hpp
+++ b/include/sdrutils.hpp
@@ -119,9 +119,8 @@
         if ((numStreakRead == 0) && (numReadings != 0))
         {
             std::cerr << "IPMI sensor " << sensorName
-                      << ": Recovered reading, value=" << reading
-                      << " byte=" << raw
-                      << ", Reading counts good=" << numReadings
+                      << ": Recovered reading, value=" << reading << " byte="
+                      << raw << ", Reading counts good=" << numReadings
                       << " miss=" << numMissings
                       << ", Prior miss streak=" << numStreakMiss << "\n";
         }
@@ -249,10 +248,10 @@
 
     sensorTreePtr = std::make_shared<SensorSubTree>();
 
-    auto mapperCall = dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
-                                           "/xyz/openbmc_project/object_mapper",
-                                           "xyz.openbmc_project.ObjectMapper",
-                                           "GetSubTree");
+    auto mapperCall =
+        dbus.new_method_call("xyz.openbmc_project.ObjectMapper",
+                             "/xyz/openbmc_project/object_mapper",
+                             "xyz.openbmc_project.ObjectMapper", "GetSubTree");
     static constexpr const auto depth = 2;
     static constexpr std::array<const char*, 3> interfaces = {
         "xyz.openbmc_project.Sensor.Value",
@@ -539,10 +538,9 @@
 
 // Follow Association properties for Sensor back to the Board dbus object to
 // check for an EntityId and EntityInstance property.
-static inline void updateIpmiFromAssociation(const std::string& path,
-                                             const SensorMap& sensorMap,
-                                             uint8_t& entityId,
-                                             uint8_t& entityInstance)
+static inline void updateIpmiFromAssociation(
+    const std::string& path, const SensorMap& sensorMap, uint8_t& entityId,
+    uint8_t& entityInstance)
 {
     namespace fs = std::filesystem;
 
diff --git a/include/sensorutils.hpp b/include/sensorutils.hpp
index c7ce53e..e06b2e1 100644
--- a/include/sensorutils.hpp
+++ b/include/sensorutils.hpp
@@ -155,10 +155,9 @@
 // To use with Wolfram Alpha, make all variables single letters
 // bExp becomes E, rExp becomes R
 // https://www.wolframalpha.com/input/?i=y%3D%28%28M*x%29%2B%28B*%2810%5EE%29%29%29*%2810%5ER%29
-static inline bool getSensorAttributes(const double max, const double min,
-                                       int16_t& mValue, int8_t& rExp,
-                                       int16_t& bValue, int8_t& bExp,
-                                       bool& bSigned)
+static inline bool getSensorAttributes(
+    const double max, const double min, int16_t& mValue, int8_t& rExp,
+    int16_t& bValue, int8_t& bExp, bool& bSigned)
 {
     if (!(std::isfinite(min)))
     {
@@ -249,9 +248,8 @@
     // Step 4: Constrain B, and set bExp accordingly
     if (!(scaleFloatExp(dB, bExp)))
     {
-        std::cerr << "getSensorAttributes: Offset (B=" << dB
-                  << ", bExp=" << (int)bExp
-                  << ") exceeds multiplier scale (M=" << dM
+        std::cerr << "getSensorAttributes: Offset (B=" << dB << ", bExp="
+                  << (int)bExp << ") exceeds multiplier scale (M=" << dM
                   << ", rExp=" << (int)rExp << ")\n";
         return false;
     }
@@ -264,10 +262,9 @@
     return true;
 }
 
-static inline uint8_t
-    scaleIPMIValueFromDouble(const double value, const int16_t mValue,
-                             const int8_t rExp, const int16_t bValue,
-                             const int8_t bExp, const bool bSigned)
+static inline uint8_t scaleIPMIValueFromDouble(
+    const double value, const int16_t mValue, const int8_t rExp,
+    const int16_t bValue, const int8_t bExp, const bool bSigned)
 {
     // Avoid division by zero below
     if (mValue == 0)
@@ -322,8 +319,8 @@
     int8_t bExp = 0;
     bool bSigned = false;
 
-    bool result = getSensorAttributes(max, min, mValue, rExp, bValue, bExp,
-                                      bSigned);
+    bool result =
+        getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned);
     if (!result)
     {
         throw std::runtime_error("Illegal sensor attributes");
diff --git a/include/smbiosmdrv2handler.hpp b/include/smbiosmdrv2handler.hpp
index 99e6bb6..bcd18c9 100644
--- a/include/smbiosmdrv2handler.hpp
+++ b/include/smbiosmdrv2handler.hpp
@@ -277,39 +277,40 @@
                                ipmi::DbusVariant& value,
                                const std::string& service);
 
-    Mdr2DirStruct smbiosDir{smbiosAgentVersion,
-                            1,
-                            1,
-                            1,
-                            0,
-                            0,
-                            {40,
-                             41,
-                             42,
-                             43,
-                             44,
-                             45,
-                             46,
-                             47,
-                             48,
-                             49,
-                             50,
-                             51,
-                             52,
-                             53,
-                             54,
-                             0x42,
-                             0,
-                             smbiosTableStorageSize,
-                             smbiosTableVersion,
-                             smbiosTableTimestamp,
-                             MDR2SMBIOSStatusEnum::mdr2Init,
-                             MDR2DirLockEnum::mdr2DirUnlock,
-                             0,
-                             smbiosSMMemoryOffset,
-                             smbiosSMMemorySize,
-                             smbiosTableStorageSize,
-                             smbiosTableStorage}};
+    Mdr2DirStruct smbiosDir{
+        smbiosAgentVersion,
+        1,
+        1,
+        1,
+        0,
+        0,
+        {40,
+         41,
+         42,
+         43,
+         44,
+         45,
+         46,
+         47,
+         48,
+         49,
+         50,
+         51,
+         52,
+         53,
+         54,
+         0x42,
+         0,
+         smbiosTableStorageSize,
+         smbiosTableVersion,
+         smbiosTableTimestamp,
+         MDR2SMBIOSStatusEnum::mdr2Init,
+         MDR2DirLockEnum::mdr2DirUnlock,
+         0,
+         smbiosSMMemoryOffset,
+         smbiosSMMemorySize,
+         smbiosTableStorageSize,
+         smbiosTableStorage}};
     std::unique_ptr<SharedMemoryArea> area;
     std::unique_ptr<sdbusplus::Timer> timer;
 
diff --git a/include/storagecommands.hpp b/include/storagecommands.hpp
index c359702..221cecc 100644
--- a/include/storagecommands.hpp
+++ b/include/storagecommands.hpp
@@ -272,8 +272,8 @@
                  uint8_t pwrStateNotification, uint8_t capabilities,
                  uint8_t eid, uint8_t entityInst, uint8_t mfrDefined,
                  const std::string& sensorname) :
-        targetAddress(address),
-        channelNumber(chNumber), powerStateNotification(pwrStateNotification),
+        targetAddress(address), channelNumber(chNumber),
+        powerStateNotification(pwrStateNotification),
         deviceCapabilities(capabilities), reserved{}, entityID(eid),
         entityInstance(entityInst), oem(mfrDefined)
     {
@@ -281,9 +281,9 @@
         header.sdr_version = ipmiSdrVersion;
         header.record_type = 0x12;
         size_t nameLen = std::min(sensorname.size(), sizeof(name));
-        header.record_length = sizeof(Type12Record) -
-                               sizeof(get_sdr::SensorDataRecordHeader) -
-                               sizeof(name) + nameLen;
+        header.record_length =
+            sizeof(Type12Record) - sizeof(get_sdr::SensorDataRecordHeader) -
+            sizeof(name) + nameLen;
         typeLengthCode = 0xc0 | nameLen;
         std::copy(sensorname.begin(), sensorname.begin() + nameLen, name);
     }