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: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/redfish-core/lib/trigger.hpp b/redfish-core/lib/trigger.hpp
index 02885d2..8bfd632 100644
--- a/redfish-core/lib/trigger.hpp
+++ b/redfish-core/lib/trigger.hpp
@@ -322,9 +322,8 @@
     }
 };
 
-inline bool parseNumericThresholds(crow::Response& res,
-                                   NumericThresholds& numericThresholds,
-                                   Context& ctx)
+inline bool parseNumericThresholds(
+    crow::Response& res, NumericThresholds& numericThresholds, Context& ctx)
 {
     std::vector<NumericThresholdParams> parsedParams;
     if (numericThresholds.upperCritical)
@@ -576,8 +575,8 @@
             return false;
         }
 
-        std::string sensorPath = "/xyz/openbmc_project/sensors/" + split.first +
-                                 '/' + split.second;
+        std::string sensorPath =
+            "/xyz/openbmc_project/sensors/" + split.first + '/' + split.second;
 
         ctx.sensors.emplace_back(sensorPath, uriStr);
         uriIdx++;
@@ -957,8 +956,8 @@
     crow::connections::systemBus->async_method_call(
         [asyncResp, id = ctx.id](const boost::system::error_code& ec,
                                  const std::string& dbusPath) {
-        afterCreateTrigger(ec, dbusPath, asyncResp, id);
-    },
+            afterCreateTrigger(ec, dbusPath, asyncResp, id);
+        },
         service, "/xyz/openbmc_project/Telemetry/Triggers",
         "xyz.openbmc_project.Telemetry.TriggerManager", "AddTrigger",
         "TelemetryService/" + ctx.id, ctx.name, ctx.actions, ctx.sensors,
@@ -974,23 +973,23 @@
         .methods(boost::beast::http::verb::get)(
             [&app](const crow::Request& req,
                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
-        if (!redfish::setUpRedfishRoute(app, req, asyncResp))
-        {
-            return;
-        }
-        asyncResp->res.jsonValue["@odata.type"] =
-            "#TriggersCollection.TriggersCollection";
-        asyncResp->res.jsonValue["@odata.id"] =
-            "/redfish/v1/TelemetryService/Triggers";
-        asyncResp->res.jsonValue["Name"] = "Triggers Collection";
-        constexpr std::array<std::string_view, 1> interfaces{
-            telemetry::triggerInterface};
-        collection_util::getCollectionMembers(
-            asyncResp,
-            boost::urls::url("/redfish/v1/TelemetryService/Triggers"),
-            interfaces,
-            "/xyz/openbmc_project/Telemetry/Triggers/TelemetryService");
-    });
+                if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+                {
+                    return;
+                }
+                asyncResp->res.jsonValue["@odata.type"] =
+                    "#TriggersCollection.TriggersCollection";
+                asyncResp->res.jsonValue["@odata.id"] =
+                    "/redfish/v1/TelemetryService/Triggers";
+                asyncResp->res.jsonValue["Name"] = "Triggers Collection";
+                constexpr std::array<std::string_view, 1> interfaces{
+                    telemetry::triggerInterface};
+                collection_util::getCollectionMembers(
+                    asyncResp,
+                    boost::urls::url("/redfish/v1/TelemetryService/Triggers"),
+                    interfaces,
+                    "/xyz/openbmc_project/Telemetry/Triggers/TelemetryService");
+            });
 
     BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/Triggers/")
         .privileges(redfish::privileges::postTriggersCollection)
@@ -1006,36 +1005,40 @@
             [&app](const crow::Request& req,
                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    const std::string& id) {
-        if (!redfish::setUpRedfishRoute(app, req, asyncResp))
-        {
-            return;
-        }
-        sdbusplus::asio::getAllProperties(
-            *crow::connections::systemBus, telemetry::service,
-            telemetry::getDbusTriggerPath(id), telemetry::triggerInterface,
-            [asyncResp,
-             id](const boost::system::error_code& ec,
-                 const std::vector<std::pair<
-                     std::string, telemetry::TriggerGetParamsVariant>>& ret) {
-            if (ec.value() == EBADR ||
-                ec == boost::system::errc::host_unreachable)
-            {
-                messages::resourceNotFound(asyncResp->res, "Triggers", id);
-                return;
-            }
-            if (ec)
-            {
-                BMCWEB_LOG_ERROR("respHandler DBus error {}", ec);
-                messages::internalError(asyncResp->res);
-                return;
-            }
+                if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+                {
+                    return;
+                }
+                sdbusplus::asio::getAllProperties(
+                    *crow::connections::systemBus, telemetry::service,
+                    telemetry::getDbusTriggerPath(id),
+                    telemetry::triggerInterface,
+                    [asyncResp,
+                     id](const boost::system::error_code& ec,
+                         const std::vector<std::pair<
+                             std::string, telemetry::TriggerGetParamsVariant>>&
+                             ret) {
+                        if (ec.value() == EBADR ||
+                            ec == boost::system::errc::host_unreachable)
+                        {
+                            messages::resourceNotFound(asyncResp->res,
+                                                       "Triggers", id);
+                            return;
+                        }
+                        if (ec)
+                        {
+                            BMCWEB_LOG_ERROR("respHandler DBus error {}", ec);
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
 
-            if (!telemetry::fillTrigger(asyncResp->res.jsonValue, id, ret))
-            {
-                messages::internalError(asyncResp->res);
-            }
-        });
-    });
+                        if (!telemetry::fillTrigger(asyncResp->res.jsonValue,
+                                                    id, ret))
+                        {
+                            messages::internalError(asyncResp->res);
+                        }
+                    });
+            });
 
     BMCWEB_ROUTE(app, "/redfish/v1/TelemetryService/Triggers/<str>/")
         .privileges(redfish::privileges::deleteTriggers)
@@ -1043,32 +1046,35 @@
             [&app](const crow::Request& req,
                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                    const std::string& id) {
-        if (!redfish::setUpRedfishRoute(app, req, asyncResp))
-        {
-            return;
-        }
-        const std::string triggerPath = telemetry::getDbusTriggerPath(id);
+                if (!redfish::setUpRedfishRoute(app, req, asyncResp))
+                {
+                    return;
+                }
+                const std::string triggerPath =
+                    telemetry::getDbusTriggerPath(id);
 
-        crow::connections::systemBus->async_method_call(
-            [asyncResp, id](const boost::system::error_code& ec) {
-            if (ec.value() == EBADR)
-            {
-                messages::resourceNotFound(asyncResp->res, "Triggers", id);
-                return;
-            }
+                crow::connections::systemBus->async_method_call(
+                    [asyncResp, id](const boost::system::error_code& ec) {
+                        if (ec.value() == EBADR)
+                        {
+                            messages::resourceNotFound(asyncResp->res,
+                                                       "Triggers", id);
+                            return;
+                        }
 
-            if (ec)
-            {
-                BMCWEB_LOG_ERROR("respHandler DBus error {}", ec);
-                messages::internalError(asyncResp->res);
-                return;
-            }
+                        if (ec)
+                        {
+                            BMCWEB_LOG_ERROR("respHandler DBus error {}", ec);
+                            messages::internalError(asyncResp->res);
+                            return;
+                        }
 
-            asyncResp->res.result(boost::beast::http::status::no_content);
-        },
-            telemetry::service, triggerPath,
-            "xyz.openbmc_project.Object.Delete", "Delete");
-    });
+                        asyncResp->res.result(
+                            boost::beast::http::status::no_content);
+                    },
+                    telemetry::service, triggerPath,
+                    "xyz.openbmc_project.Object.Delete", "Delete");
+            });
 }
 
 } // namespace redfish