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: I4f63258febea27dae710c252033b9151e02be7e8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/async/context.cpp b/src/async/context.cpp
index ad45c4d..96535fa 100644
--- a/src/async/context.cpp
+++ b/src/async/context.cpp
@@ -9,8 +9,8 @@
context::context(bus_t&& b) : bus(std::move(b))
{
- dbus_source = event_loop.add_io(bus.get_fd(), EPOLLIN, dbus_event_handle,
- this);
+ dbus_source =
+ event_loop.add_io(bus.get_fd(), EPOLLIN, dbus_event_handle, this);
}
namespace details
@@ -84,9 +84,9 @@
explicit wait_process_sender(context& ctx) : context_ref(ctx) {}
- friend auto tag_invoke(execution::get_completion_signatures_t,
- const wait_process_sender&, auto)
- -> execution::completion_signatures<execution::set_value_t()>;
+ friend auto tag_invoke(
+ execution::get_completion_signatures_t, const wait_process_sender&,
+ auto) -> execution::completion_signatures<execution::set_value_t()>;
template <execution::receiver R>
friend auto tag_invoke(execution::connect_t, wait_process_sender&& self,
diff --git a/src/async/match.cpp b/src/async/match.cpp
index 9ac3cd0..bedce38 100644
--- a/src/async/match.cpp
+++ b/src/async/match.cpp
@@ -6,15 +6,15 @@
slot_t match::makeMatch(context& ctx, const std::string_view& pattern)
{
// C-style callback to redirect into this::handle_match.
- static auto match_cb = [](message::msgp_t msg, void* ctx,
- sd_bus_error*) noexcept {
- static_cast<match*>(ctx)->handle_match(message_t{msg});
- return 0;
- };
+ static auto match_cb =
+ [](message::msgp_t msg, void* ctx, sd_bus_error*) noexcept {
+ static_cast<match*>(ctx)->handle_match(message_t{msg});
+ return 0;
+ };
sd_bus_slot* s;
- auto r = sd_bus_add_match(get_busp(ctx), &s, pattern.data(), match_cb,
- this);
+ auto r =
+ sd_bus_add_match(get_busp(ctx), &s, pattern.data(), match_cb, this);
if (r < 0)
{
throw exception::SdBusError(-r, "sd_bus_add_match (async::match)");
diff --git a/src/event.cpp b/src/event.cpp
index a16f25a..729bb62 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -153,9 +153,9 @@
source s{*this};
- auto rc = sd_event_add_time_relative(eventp, &s.sourcep, CLOCK_BOOTTIME,
- time.count(), accuracy.count(),
- handler, data);
+ auto rc = sd_event_add_time_relative(
+ eventp, &s.sourcep, CLOCK_BOOTTIME, time.count(), accuracy.count(),
+ handler, data);
if (rc < 0)
{
diff --git a/src/exception.cpp b/src/exception.cpp
index 1bfd890..c03e2bf 100644
--- a/src/exception.cpp
+++ b/src/exception.cpp
@@ -28,8 +28,7 @@
SdBusError::SdBusError(int error_in, std::string&& prefix,
SdBusInterface* intf_in) :
- error(SD_BUS_ERROR_NULL),
- intf(intf_in)
+ error(SD_BUS_ERROR_NULL), intf(intf_in)
{
// We can't check the output of intf->sd_bus_error_set_errno() because
// it returns the input errorcode. We don't want to try and guess
@@ -46,8 +45,7 @@
SdBusError::SdBusError(sd_bus_error* error_in, const char* prefix,
SdBusInterface* intf_in) :
- error(*error_in),
- intf(intf_in)
+ error(*error_in), intf(intf_in)
{
// We own the error so remove the caller's reference
*error_in = SD_BUS_ERROR_NULL;
@@ -159,8 +157,7 @@
UnpackPropertyError::UnpackPropertyError(std::string_view propertyNameIn,
const UnpackErrorReason reasonIn) :
- propertyName(propertyNameIn),
- reason(reasonIn),
+ propertyName(propertyNameIn), reason(reasonIn),
errWhatDetailed(std::string(errWhat) + " PropertyName: '" + propertyName +
"', Reason: '" + unpackErrorReasonToString(reason) + "'.")
{}
diff --git a/src/server/interface.cpp b/src/server/interface.cpp
index d3a975f..f0af3ea 100644
--- a/src/server/interface.cpp
+++ b/src/server/interface.cpp
@@ -26,8 +26,8 @@
interface::interface(sdbusplus::bus_t& bus, const char* path,
const char* interf, const sdbusplus::vtable_t* vtable,
void* context) :
- _bus(get_busp(bus), bus.getInterface()),
- _path(path), _interf(interf), _interface_added(false),
+ _bus(get_busp(bus), bus.getInterface()), _path(path), _interf(interf),
+ _interface_added(false),
_slot(makeObjVtable(_bus.getInterface(), get_busp(_bus), _path.c_str(),
_interf.c_str(), vtable, context))
{}