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: I1d204ff0a167c43688f2217e9dee5504c71cd4f0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/attn/attention.cpp b/attn/attention.cpp
index 28e7dc7..4aabca0 100644
--- a/attn/attention.cpp
+++ b/attn/attention.cpp
@@ -7,8 +7,8 @@
 /** @brief Main constructor. */
 Attention::Attention(AttentionType i_type, int (*i_handler)(Attention*),
                      pdbg_target* i_target, Config* i_config) :
-    iv_type(i_type),
-    iv_handler(i_handler), iv_target(i_target), iv_config(i_config)
+    iv_type(i_type), iv_handler(i_handler), iv_target(i_target),
+    iv_config(i_config)
 
 {}
 
diff --git a/attn/attn_common.cpp b/attn/attn_common.cpp
index f11d739..5446331 100644
--- a/attn/attn_common.cpp
+++ b/attn/attn_common.cpp
@@ -185,8 +185,8 @@
                 {
                     // log cfam read error
                     trace::err("cfam read 0x1007 FAILED");
-                    eventAttentionFail((int)AttnSection::attnHandler |
-                                       ATTN_PDBG_CFAM);
+                    eventAttentionFail(
+                        (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                 }
                 // check for invalid/stale value
                 else if (0xffffffff == isr_val)
@@ -201,8 +201,8 @@
                     break;
                 }
             } // fsi target enabled
-        }     // pib target enabled
-    }         // next processor
+        } // pib target enabled
+    } // next processor
 
     return recoverableErrors;
 }
diff --git a/attn/attn_dbus.cpp b/attn/attn_dbus.cpp
index c0a5200..7314397 100644
--- a/attn/attn_dbus.cpp
+++ b/attn/attn_dbus.cpp
@@ -26,9 +26,9 @@
         if (0 == util::dbus::findService(i_interface, i_path, service))
         {
             // return the method
-            o_method = bus.new_method_call(service.c_str(), i_path.c_str(),
-                                           i_interface.c_str(),
-                                           i_function.c_str());
+            o_method =
+                bus.new_method_call(service.c_str(), i_path.c_str(),
+                                    i_interface.c_str(), i_function.c_str());
 
             rc = RC_SUCCESS;
         }
diff --git a/attn/attn_handler.cpp b/attn/attn_handler.cpp
index 73a8f8f..9ff65d7 100644
--- a/attn/attn_handler.cpp
+++ b/attn/attn_handler.cpp
@@ -129,8 +129,8 @@
                 {
                     // log cfam read error
                     trace::err("cfam read 0x1007 FAILED");
-                    eventAttentionFail((int)AttnSection::attnHandler |
-                                       ATTN_PDBG_CFAM);
+                    eventAttentionFail(
+                        (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                 }
                 else if (0xffffffff == isr_val)
                 {
@@ -149,8 +149,8 @@
                     {
                         // log cfam read error
                         trace::err("cfam read 0x100d FAILED");
-                        eventAttentionFail((int)AttnSection::attnHandler |
-                                           ATTN_PDBG_CFAM);
+                        eventAttentionFail(
+                            (int)AttnSection::attnHandler | ATTN_PDBG_CFAM);
                     }
                     else if (0xffffffff == isr_mask)
                     {
@@ -187,10 +187,10 @@
                                                            target, i_config);
                         }
                     } // cfam 0x100d valid
-                }     // cfam 0x1007 valid
-            }         // fsi target enabled
-        }             // pib target enabled
-    }                 // next processor
+                } // cfam 0x1007 valid
+            } // fsi target enabled
+        } // pib target enabled
+    } // next processor
 
     // convert to heap, highest priority is at front
     if (!std::is_heap(active_attentions.begin(), active_attentions.end()))
diff --git a/attn/attn_logging.cpp b/attn/attn_logging.cpp
index 34f3735..a2ee0e3 100644
--- a/attn/attn_logging.cpp
+++ b/attn/attn_logging.cpp
@@ -71,8 +71,8 @@
  * @param   i_buffer - raw data (if creating raw dump ffdc entry in log)
  * @return  vector of FFDCFile objects
  */
-std::vector<util::FFDCFile> createFFDCFiles(char* i_buffer = nullptr,
-                                            size_t i_size = 0)
+std::vector<util::FFDCFile>
+    createFFDCFiles(char* i_buffer = nullptr, size_t i_size = 0)
 {
     std::vector<util::FFDCFile> files{};
 
@@ -175,8 +175,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key SrcAscii does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
@@ -234,8 +234,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key SrcAscii does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
@@ -405,8 +405,8 @@
                 // return.
                 trace::err(
                     "Error the key Subsystem does not exist in the map.");
-                eventAttentionFail((int)AttnSection::attnLogging |
-                                   ATTN_INVALID_KEY);
+                eventAttentionFail(
+                    (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
                 return 0;
             }
 
@@ -456,8 +456,8 @@
             // The entry with key "Subsystem" does not exist in the additional
             // map. Log the error, create failure event, and return.
             trace::err("Error the key Subsystem does not exist in the map.");
-            eventAttentionFail((int)AttnSection::attnLogging |
-                               ATTN_INVALID_KEY);
+            eventAttentionFail(
+                (int)AttnSection::attnLogging | ATTN_INVALID_KEY);
             return;
         }
 
diff --git a/attn/attn_monitor.cpp b/attn/attn_monitor.cpp
index afd99d1..a3ecfac 100644
--- a/attn/attn_monitor.cpp
+++ b/attn/attn_monitor.cpp
@@ -13,17 +13,17 @@
     iv_gpioEventDescriptor.async_wait(
         boost::asio::posix::stream_descriptor::wait_read,
         [this](const boost::system::error_code& ec) {
-        if (ec)
-        {
-            trace::err("GPIO Async wait error: %s", ec.message().c_str());
-        }
-        else
-        {
-            trace::inf("Attention GPIO active");
-            handleGPIOEvent(); // gpio trigger detected
-        }
-        return;
-    }); // register async callback
+            if (ec)
+            {
+                trace::err("GPIO Async wait error: %s", ec.message().c_str());
+            }
+            else
+            {
+                trace::inf("Attention GPIO active");
+                handleGPIOEvent(); // gpio trigger detected
+            }
+            return;
+        }); // register async callback
 }
 
 /** @brief Handle the GPIO state change event */
diff --git a/attn/attn_monitor.hpp b/attn/attn_monitor.hpp
index f9f13e4..b2034bb 100644
--- a/attn/attn_monitor.hpp
+++ b/attn/attn_monitor.hpp
@@ -30,8 +30,7 @@
      */
     AttnMonitor(gpiod_line* line, gpiod_line_request_config& config,
                 boost::asio::io_context& io, Config* i_attnConfig) :
-        iv_gpioLine(line),
-        iv_gpioConfig(config), iv_gpioEventDescriptor(io),
+        iv_gpioLine(line), iv_gpioConfig(config), iv_gpioEventDescriptor(io),
         iv_config(i_attnConfig)
     {
         requestGPIOEvent(); // registers the event handler
diff --git a/attn/pel/section_header.hpp b/attn/pel/section_header.hpp
index ae0a2c5..d81e268 100644
--- a/attn/pel/section_header.hpp
+++ b/attn/pel/section_header.hpp
@@ -58,8 +58,8 @@
      */
     SectionHeader(uint16_t id, uint16_t size, uint8_t version, uint8_t subType,
                   uint16_t componentID) :
-        id(id),
-        size(size), version(version), subType(subType), componentID(componentID)
+        id(id), size(size), version(version), subType(subType),
+        componentID(componentID)
     {}
 
     /**
diff --git a/attn/ti_handler.cpp b/attn/ti_handler.cpp
index 3c93c3a..692cdad 100644
--- a/attn/ti_handler.cpp
+++ b/attn/ti_handler.cpp
@@ -175,8 +175,8 @@
             std::map<std::string, std::string> tiAdditionalData;
 
             // make note of recoverable errors present
-            tiAdditionalData["recoverables"] = recoverableErrors() ? "true"
-                                                                   : "false";
+            tiAdditionalData["recoverables"] =
+                recoverableErrors() ? "true" : "false";
 
             parseHbTiInfo(tiAdditionalData, i_tiDataArea);
 
@@ -259,8 +259,8 @@
         return;
     }
 
-    i_map["0x00 TI Area Valid"] = std::format("{:02x}",
-                                              i_tiDataArea->tiAreaValid);
+    i_map["0x00 TI Area Valid"] =
+        std::format("{:02x}", i_tiDataArea->tiAreaValid);
     i_map["0x01 Command"] = std::format("{:02x}", i_tiDataArea->command);
     i_map["0x02 Num. Data Bytes"] =
         std::format("{:04x}", be16toh(i_tiDataArea->numDataBytes));
@@ -269,12 +269,12 @@
         std::format("{:04x}", be16toh(i_tiDataArea->hardwareDumpType));
     i_map["0x08 SRC Format"] = std::format("{:02x}", i_tiDataArea->srcFormat);
     i_map["0x09 SRC Flags"] = std::format("{:02x}", i_tiDataArea->srcFlags);
-    i_map["0x0a Num. ASCII Words"] = std::format("{:02x}",
-                                                 i_tiDataArea->numAsciiWords);
-    i_map["0x0b Num. Hex Words"] = std::format("{:02x}",
-                                               i_tiDataArea->numHexWords);
-    i_map["0x0e Length of SRC"] = std::format("{:04x}",
-                                              be16toh(i_tiDataArea->lenSrc));
+    i_map["0x0a Num. ASCII Words"] =
+        std::format("{:02x}", i_tiDataArea->numAsciiWords);
+    i_map["0x0b Num. Hex Words"] =
+        std::format("{:02x}", i_tiDataArea->numHexWords);
+    i_map["0x0e Length of SRC"] =
+        std::format("{:04x}", be16toh(i_tiDataArea->lenSrc));
     i_map["0x10 SRC Word 12"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord12HbWord0));
     i_map["0x14 SRC Word 13"] =
@@ -291,29 +291,29 @@
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
     i_map["0x2c SRC Word 19"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
-    i_map["0x30 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData0));
-    i_map["0x34 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData1));
-    i_map["0x38 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData2));
-    i_map["0x3c ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData3));
-    i_map["0x40 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData4));
-    i_map["0x44 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData5));
-    i_map["0x48 ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData6));
-    i_map["0x4c ASCII Data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData7));
+    i_map["0x30 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
+    i_map["0x34 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
+    i_map["0x38 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData2));
+    i_map["0x3c ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData3));
+    i_map["0x40 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData4));
+    i_map["0x44 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData5));
+    i_map["0x48 ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData6));
+    i_map["0x4c ASCII Data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData7));
     i_map["0x50 Location"] = std::format("{:02x}", i_tiDataArea->location);
-    i_map["0x51 Code Sections"] = std::format("{:02x}",
-                                              i_tiDataArea->codeSection);
-    i_map["0x52 Additional Size"] = std::format("{:02x}",
-                                                i_tiDataArea->additionalSize);
-    i_map["0x53 Additional Data"] = std::format("{:02x}",
-                                                i_tiDataArea->andData);
+    i_map["0x51 Code Sections"] =
+        std::format("{:02x}", i_tiDataArea->codeSection);
+    i_map["0x52 Additional Size"] =
+        std::format("{:02x}", i_tiDataArea->additionalSize);
+    i_map["0x53 Additional Data"] =
+        std::format("{:02x}", i_tiDataArea->andData);
 }
 
 /** @brief Parse the TI info data area into map as hostboot data */
@@ -325,11 +325,11 @@
         return;
     }
 
-    i_map["0x00 TI Area Valid"] = std::format("{:02x}",
-                                              i_tiDataArea->tiAreaValid);
+    i_map["0x00 TI Area Valid"] =
+        std::format("{:02x}", i_tiDataArea->tiAreaValid);
     i_map["0x04 Reserved"] = std::format("{:02x}", i_tiDataArea->reserved1);
-    i_map["0x05 HB_Term. Type"] = std::format("{:02x}",
-                                              i_tiDataArea->hbTerminateType);
+    i_map["0x05 HB_Term. Type"] =
+        std::format("{:02x}", i_tiDataArea->hbTerminateType);
     i_map["0x0c HB Flags"] = std::format("{:02x}", i_tiDataArea->hbFlags);
     i_map["0x0d Source"] = std::format("{:02x}", i_tiDataArea->source);
     i_map["0x10 HB Word 0"] =
@@ -348,10 +348,10 @@
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord18HbWord7));
     i_map["0x2c HB Word 8"] =
         std::format("{:08x}", be32toh(i_tiDataArea->srcWord19HbWord8));
-    i_map["0x30 error_data"] = std::format("{:08x}",
-                                           be32toh(i_tiDataArea->asciiData0));
-    i_map["0x34 EID"] = std::format("{:08x}",
-                                    be32toh(i_tiDataArea->asciiData1));
+    i_map["0x30 error_data"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData0));
+    i_map["0x34 EID"] =
+        std::format("{:08x}", be32toh(i_tiDataArea->asciiData1));
 }
 
 } // namespace attn