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: I21d2ca8065f24fd73509229c517f5caf48934b60
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/extensions/openpower-pels/fapi_data_process.cpp b/extensions/openpower-pels/fapi_data_process.cpp
index 252068c..a7cd1b4 100644
--- a/extensions/openpower-pels/fapi_data_process.cpp
+++ b/extensions/openpower-pels/fapi_data_process.cpp
@@ -251,9 +251,8 @@
  * @return NULL
  *
  **/
-void processClockInfoErrorHelper(const FFDC& ffdc,
-                                 json& pelJSONFmtCalloutDataList,
-                                 FFDCData& ffdcUserData)
+void processClockInfoErrorHelper(
+    const FFDC& ffdc, json& pelJSONFmtCalloutDataList, FFDCData& ffdcUserData)
 {
     lg2::info("processClockInfoErrorHelper: FFDC Message[{FFDC_MSG}]",
               "FFDC_MSG", ffdc.message);
@@ -267,11 +266,11 @@
              ffdc.hwp_errorinfo.ffdcs_data.cend(),
              [&ffdcUserData](
                  const std::pair<std::string, std::string>& ele) -> void {
-        std::string keyWithPrefix("HWP_FFDC_");
-        keyWithPrefix.append(ele.first);
+                 std::string keyWithPrefix("HWP_FFDC_");
+                 keyWithPrefix.append(ele.first);
 
-        ffdcUserData.emplace_back(keyWithPrefix, ele.second);
-    });
+                 ffdcUserData.emplace_back(keyWithPrefix, ele.second);
+             });
     // get clock position information
     auto clk_pos = 0xFF; // Invalid position.
     for (auto& hwCallout : ffdc.hwp_errorinfo.hwcallouts)
@@ -288,14 +287,15 @@
              ffdc.hwp_errorinfo.cdg_targets.end(),
              [&ffdcUserData, &pelJSONFmtCalloutDataList,
               clk_pos](const CDG_Target& cdg_tgt) -> void {
-        json jsonCalloutData;
-        std::string pelPriority = "H";
-        jsonCalloutData["Priority"] = pelPriority; // Not used
-        jsonCalloutData["SymbolicFRU"] = "REFCLK" + std::to_string(clk_pos);
-        jsonCalloutData["Deconfigured"] = cdg_tgt.deconfigure;
-        jsonCalloutData["EntityPath"] = cdg_tgt.target_entity_path;
-        pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
-    });
+                 json jsonCalloutData;
+                 std::string pelPriority = "H";
+                 jsonCalloutData["Priority"] = pelPriority; // Not used
+                 jsonCalloutData["SymbolicFRU"] =
+                     "REFCLK" + std::to_string(clk_pos);
+                 jsonCalloutData["Deconfigured"] = cdg_tgt.deconfigure;
+                 jsonCalloutData["EntityPath"] = cdg_tgt.target_entity_path;
+                 pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
+             });
 }
 
 void convertFAPItoPELformat(FFDC& ffdc, json& pelJSONFmtCalloutDataList,
@@ -319,119 +319,126 @@
             ffdc.hwp_errorinfo.ffdcs_data.begin(),
             ffdc.hwp_errorinfo.ffdcs_data.end(),
             [&ffdcUserData](std::pair<std::string, std::string>& ele) -> void {
-            std::string keyWithPrefix("HWP_FFDC_");
-            keyWithPrefix.append(ele.first);
+                std::string keyWithPrefix("HWP_FFDC_");
+                keyWithPrefix.append(ele.first);
 
-            ffdcUserData.emplace_back(keyWithPrefix, ele.second);
-        });
+                ffdcUserData.emplace_back(keyWithPrefix, ele.second);
+            });
 
         // Adding hardware callout details
         int calloutCount = 0;
-        for_each(ffdc.hwp_errorinfo.hwcallouts.begin(),
-                 ffdc.hwp_errorinfo.hwcallouts.end(),
-                 [&ffdcUserData, &calloutCount, &pelJSONFmtCalloutDataList](
-                     const HWCallout& hwCallout) -> void {
-            calloutCount++;
-            std::stringstream keyPrefix;
-            keyPrefix << "HWP_HW_CO_" << std::setfill('0') << std::setw(2)
-                      << calloutCount << "_";
+        for_each(
+            ffdc.hwp_errorinfo.hwcallouts.begin(),
+            ffdc.hwp_errorinfo.hwcallouts.end(),
+            [&ffdcUserData, &calloutCount,
+             &pelJSONFmtCalloutDataList](const HWCallout& hwCallout) -> void {
+                calloutCount++;
+                std::stringstream keyPrefix;
+                keyPrefix << "HWP_HW_CO_" << std::setfill('0') << std::setw(2)
+                          << calloutCount << "_";
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("HW_ID"), hwCallout.hwid);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("HW_ID"),
+                    hwCallout.hwid);
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("PRIORITY"),
-                hwCallout.callout_priority);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("PRIORITY"),
+                    hwCallout.callout_priority);
 
-            phal::TargetInfo targetInfo;
-            phal::getTgtReqAttrsVal(hwCallout.target_entity_path, targetInfo);
+                phal::TargetInfo targetInfo;
+                phal::getTgtReqAttrsVal(hwCallout.target_entity_path,
+                                        targetInfo);
 
-            std::string locationCode = std::string(targetInfo.locationCode);
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("LOC_CODE"), locationCode);
+                std::string locationCode = std::string(targetInfo.locationCode);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("LOC_CODE"),
+                    locationCode);
 
-            std::string physPath = std::string(targetInfo.physDevPath);
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("PHYS_PATH"), physPath);
+                std::string physPath = std::string(targetInfo.physDevPath);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("PHYS_PATH"), physPath);
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("CLK_POS"),
-                std::to_string(hwCallout.clkPos));
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("CLK_POS"),
+                    std::to_string(hwCallout.clkPos));
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("CALLOUT_PLANAR"),
-                (hwCallout.isPlanarCallout == true ? "true" : "false"));
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("CALLOUT_PLANAR"),
+                    (hwCallout.isPlanarCallout == true ? "true" : "false"));
 
-            std::string pelPriority =
-                getPelPriority(hwCallout.callout_priority);
+                std::string pelPriority =
+                    getPelPriority(hwCallout.callout_priority);
 
-            if (hwCallout.isPlanarCallout)
-            {
-                addPlanarCallout(pelJSONFmtCalloutDataList, pelPriority);
-            }
-        });
+                if (hwCallout.isPlanarCallout)
+                {
+                    addPlanarCallout(pelJSONFmtCalloutDataList, pelPriority);
+                }
+            });
 
         // Adding CDG (callout, deconfigure and guard) targets details
         calloutCount = 0;
-        for_each(ffdc.hwp_errorinfo.cdg_targets.begin(),
-                 ffdc.hwp_errorinfo.cdg_targets.end(),
-                 [&ffdcUserData, &calloutCount, &pelJSONFmtCalloutDataList](
-                     const CDG_Target& cdg_tgt) -> void {
-            calloutCount++;
-            std::stringstream keyPrefix;
-            keyPrefix << "HWP_CDG_TGT_" << std::setfill('0') << std::setw(2)
-                      << calloutCount << "_";
+        for_each(
+            ffdc.hwp_errorinfo.cdg_targets.begin(),
+            ffdc.hwp_errorinfo.cdg_targets.end(),
+            [&ffdcUserData, &calloutCount,
+             &pelJSONFmtCalloutDataList](const CDG_Target& cdg_tgt) -> void {
+                calloutCount++;
+                std::stringstream keyPrefix;
+                keyPrefix << "HWP_CDG_TGT_" << std::setfill('0') << std::setw(2)
+                          << calloutCount << "_";
 
-            phal::TargetInfo targetInfo;
-            targetInfo.deconfigure = cdg_tgt.deconfigure;
+                phal::TargetInfo targetInfo;
+                targetInfo.deconfigure = cdg_tgt.deconfigure;
 
-            phal::getTgtReqAttrsVal(cdg_tgt.target_entity_path, targetInfo);
+                phal::getTgtReqAttrsVal(cdg_tgt.target_entity_path, targetInfo);
 
-            std::string locationCode = std::string(targetInfo.locationCode);
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("LOC_CODE"), locationCode);
-            std::string physPath = std::string(targetInfo.physDevPath);
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("PHYS_PATH"), physPath);
+                std::string locationCode = std::string(targetInfo.locationCode);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("LOC_CODE"),
+                    locationCode);
+                std::string physPath = std::string(targetInfo.physDevPath);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("PHYS_PATH"), physPath);
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("CO_REQ"),
-                (cdg_tgt.callout == true ? "true" : "false"));
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("CO_REQ"),
+                    (cdg_tgt.callout == true ? "true" : "false"));
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("CO_PRIORITY"),
-                cdg_tgt.callout_priority);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("CO_PRIORITY"),
+                    cdg_tgt.callout_priority);
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("DECONF_REQ"),
-                (cdg_tgt.deconfigure == true ? "true" : "false"));
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("DECONF_REQ"),
+                    (cdg_tgt.deconfigure == true ? "true" : "false"));
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("GUARD_REQ"),
-                (cdg_tgt.guard == true ? "true" : "false"));
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("GUARD_REQ"),
+                    (cdg_tgt.guard == true ? "true" : "false"));
 
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("GUARD_TYPE"),
-                cdg_tgt.guard_type);
+                ffdcUserData.emplace_back(
+                    std::string(keyPrefix.str()).append("GUARD_TYPE"),
+                    cdg_tgt.guard_type);
 
-            json jsonCalloutData;
-            jsonCalloutData["LocationCode"] = locationCode;
-            std::string pelPriority = getPelPriority(cdg_tgt.callout_priority);
-            jsonCalloutData["Priority"] = pelPriority;
+                json jsonCalloutData;
+                jsonCalloutData["LocationCode"] = locationCode;
+                std::string pelPriority =
+                    getPelPriority(cdg_tgt.callout_priority);
+                jsonCalloutData["Priority"] = pelPriority;
 
-            if (targetInfo.mruId != 0)
-            {
-                jsonCalloutData["MRUs"] = json::array({
-                    {{"ID", targetInfo.mruId}, {"Priority", pelPriority}},
-                });
-            }
-            jsonCalloutData["Deconfigured"] = cdg_tgt.deconfigure;
-            jsonCalloutData["Guarded"] = cdg_tgt.guard;
-            jsonCalloutData["GuardType"] = cdg_tgt.guard_type;
-            jsonCalloutData["EntityPath"] = cdg_tgt.target_entity_path;
+                if (targetInfo.mruId != 0)
+                {
+                    jsonCalloutData["MRUs"] = json::array({
+                        {{"ID", targetInfo.mruId}, {"Priority", pelPriority}},
+                    });
+                }
+                jsonCalloutData["Deconfigured"] = cdg_tgt.deconfigure;
+                jsonCalloutData["Guarded"] = cdg_tgt.guard;
+                jsonCalloutData["GuardType"] = cdg_tgt.guard_type;
+                jsonCalloutData["EntityPath"] = cdg_tgt.target_entity_path;
 
-            pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
-        });
+                pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
+            });
 
         // Adding procedure callout
         calloutCount = 0;
@@ -439,23 +446,23 @@
                  ffdc.hwp_errorinfo.procedures_callout.end(),
                  [&ffdcUserData, &calloutCount, &pelJSONFmtCalloutDataList](
                      const ProcedureCallout& procCallout) -> void {
-            calloutCount++;
-            std::stringstream keyPrefix;
-            keyPrefix << "HWP_PROC_CO_" << std::setfill('0') << std::setw(2)
-                      << calloutCount << "_";
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("PRIORITY"),
-                procCallout.callout_priority);
-            ffdcUserData.emplace_back(
-                std::string(keyPrefix.str()).append("MAINT_PROCEDURE"),
-                procCallout.proc_callout);
-            json jsonCalloutData;
-            jsonCalloutData["Procedure"] = procCallout.proc_callout;
-            std::string pelPriority =
-                getPelPriority(procCallout.callout_priority);
-            jsonCalloutData["Priority"] = pelPriority;
-            pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
-        });
+                     calloutCount++;
+                     std::stringstream keyPrefix;
+                     keyPrefix << "HWP_PROC_CO_" << std::setfill('0')
+                               << std::setw(2) << calloutCount << "_";
+                     ffdcUserData.emplace_back(
+                         std::string(keyPrefix.str()).append("PRIORITY"),
+                         procCallout.callout_priority);
+                     ffdcUserData.emplace_back(
+                         std::string(keyPrefix.str()).append("MAINT_PROCEDURE"),
+                         procCallout.proc_callout);
+                     json jsonCalloutData;
+                     jsonCalloutData["Procedure"] = procCallout.proc_callout;
+                     std::string pelPriority =
+                         getPelPriority(procCallout.callout_priority);
+                     jsonCalloutData["Priority"] = pelPriority;
+                     pelJSONFmtCalloutDataList.emplace_back(jsonCalloutData);
+                 });
     }
     else if ((ffdc.ffdc_type != FFDC_TYPE_NONE) &&
              (ffdc.ffdc_type != FFDC_TYPE_UNSUPPORTED))