clang-format: sync from docs master .clang-format

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8077816a5ddf7a067bdf537cb46e4e32f5c4ef65
diff --git a/.clang-format b/.clang-format
index 692faa2..ef6f54e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -5,7 +5,7 @@
 AlignAfterOpenBracket: Align
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: false
+AlignEscapedNewlines: Right
 AlignOperands:   true
 AlignTrailingComments: true
 AllowAllParametersOfDeclarationOnNextLine: true
@@ -14,10 +14,9 @@
 AllowShortFunctionsOnASingleLine: None
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterDefinitionReturnType: None
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
+AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
 BraceWrapping:
@@ -30,15 +29,22 @@
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
+  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
   IndentBraces:    false
+  SplitEmptyFunction:   false
+  SplitEmptyRecord:     false
+  SplitEmptyNamespace:  false
 BreakBeforeBinaryOperators: None
 BreakBeforeBraces: Custom
 BreakBeforeTernaryOperators: true
 BreakConstructorInitializers: AfterColon
+BreakInheritanceList: AfterColon
+BreakStringLiterals: true
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
+CompactNamespaces: false
 ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
@@ -52,17 +58,21 @@
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
-    Priority:        5
+    Priority:        7
   - Regex:           '^"config.h"'
     Priority:        -1
-  - Regex:           '^".*\.hpp"'
+  - Regex:           '^".*\.h"'
     Priority:        1
-  - Regex:           '^<.*\.h>'
+  - Regex:           '^".*\.hpp"'
     Priority:        2
-  - Regex:           '^<.*'
+  - Regex:           '^<.*\.h>'
     Priority:        3
-  - Regex:           '.*'
+  - Regex:           '^<.*\.hpp>'
     Priority:        4
+  - Regex:           '^<.*'
+    Priority:        5
+  - Regex:           '.*'
+    Priority:        6
 IndentCaseLabels: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -84,8 +94,13 @@
 SortIncludes:    true
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
 SpaceBeforeAssignmentOperators: true
+SpaceBeforeCpp11BracedList: false
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
 SpaceBeforeParens: ControlStatements
+SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
 SpacesInAngles:  false
diff --git a/example/asio-example.cpp b/example/asio-example.cpp
index f17d285..b1e1132 100644
--- a/example/asio-example.cpp
+++ b/example/asio-example.cpp
@@ -1,8 +1,5 @@
 #include <boost/asio.hpp>
 #include <boost/asio/spawn.hpp>
-#include <chrono>
-#include <ctime>
-#include <iostream>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/asio/object_server.hpp>
 #include <sdbusplus/asio/sd_event.hpp>
@@ -10,6 +7,10 @@
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/server.hpp>
 #include <sdbusplus/timer.hpp>
+
+#include <chrono>
+#include <ctime>
+#include <iostream>
 #include <variant>
 
 using variant = std::variant<int, std::string>;
diff --git a/example/calculator-server.cpp b/example/calculator-server.cpp
index 2c7f3e4..c089d91 100644
--- a/example/calculator-server.cpp
+++ b/example/calculator-server.cpp
@@ -1,8 +1,9 @@
-#include <iostream>
 #include <net/poettering/Calculator/client.hpp>
 #include <net/poettering/Calculator/error.hpp>
 #include <net/poettering/Calculator/server.hpp>
 #include <sdbusplus/server.hpp>
+
+#include <iostream>
 #include <string_view>
 
 using Calculator_inherit =
@@ -14,8 +15,7 @@
     /** Constructor */
     Calculator(sdbusplus::bus::bus& bus, const char* path) :
         Calculator_inherit(bus, path)
-    {
-    }
+    {}
 
     /** Multiply (x*y), update lastResult */
     int64_t multiply(int64_t x, int64_t y) override
diff --git a/example/list-users.cpp b/example/list-users.cpp
index 3995f5c..23913b0 100644
--- a/example/list-users.cpp
+++ b/example/list-users.cpp
@@ -1,6 +1,7 @@
+#include <sdbusplus/bus.hpp>
+
 #include <cstdint>
 #include <iostream>
-#include <sdbusplus/bus.hpp>
 
 /** An example dbus client application.
  *  Calls org.freedesktop.login1's ListUsers interface to find all active
diff --git a/sdbusplus/asio/connection.hpp b/sdbusplus/asio/connection.hpp
index 9ab3f58..b3ff4fd 100644
--- a/sdbusplus/asio/connection.hpp
+++ b/sdbusplus/asio/connection.hpp
@@ -24,11 +24,12 @@
 #include <boost/asio.hpp>
 #include <boost/asio/spawn.hpp>
 #include <boost/callable_traits.hpp>
-#include <chrono>
 #include <sdbusplus/asio/detail/async_send_handler.hpp>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/utility/read_into_tuple.hpp>
 #include <sdbusplus/utility/type_traits.hpp>
+
+#include <chrono>
 #include <string>
 #include <tuple>
 
diff --git a/sdbusplus/asio/detail/async_send_handler.hpp b/sdbusplus/asio/detail/async_send_handler.hpp
index 332e463..bb896ad 100644
--- a/sdbusplus/asio/detail/async_send_handler.hpp
+++ b/sdbusplus/asio/detail/async_send_handler.hpp
@@ -32,11 +32,9 @@
 {
     Handler handler_;
     async_send_handler(Handler&& handler) : handler_(std::move(handler))
-    {
-    }
+    {}
     async_send_handler(Handler& handler) : handler_(handler)
-    {
-    }
+    {}
     void operator()(sd_bus* conn, message::message& mesg)
     {
         async_send_handler* context = new async_send_handler(std::move(*this));
diff --git a/sdbusplus/asio/object_server.hpp b/sdbusplus/asio/object_server.hpp
index 7b2e930..d0e18d9 100644
--- a/sdbusplus/asio/object_server.hpp
+++ b/sdbusplus/asio/object_server.hpp
@@ -9,8 +9,6 @@
 #include <boost/any.hpp>
 #include <boost/asio/spawn.hpp>
 #include <boost/container/flat_map.hpp>
-#include <list>
-#include <optional>
 #include <sdbusplus/asio/connection.hpp>
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/message/read.hpp>
@@ -18,6 +16,9 @@
 #include <sdbusplus/server.hpp>
 #include <sdbusplus/utility/tuple_to_array.hpp>
 #include <sdbusplus/utility/type_traits.hpp>
+
+#include <list>
+#include <optional>
 #include <set>
 
 namespace sdbusplus
@@ -114,8 +115,7 @@
 {
   public:
     callback_method_instance(CallbackType&& func) : func_(std::move(func))
-    {
-    }
+    {}
     int call(message::message& m) override
     {
         return expandCall(m);
@@ -195,8 +195,7 @@
                               CallbackType&& func) :
         io_(io),
         func_(std::move(func))
-    {
-    }
+    {}
     int call(message::message& m) override
     {
         // make a copy of m to move into the coroutine
@@ -294,8 +293,7 @@
                           CallbackType&& func) :
         value_(value),
         func_(std::move(func))
-    {
-    }
+    {}
     int call(message::message& m) override
     {
         auto r = func_(*value_);
@@ -316,8 +314,7 @@
                           CallbackType&& func) :
         value_(value),
         func_(std::move(func))
-    {
-    }
+    {}
     SetPropertyReturnValue call(message::message& m) override
     {
         PropertyType input;
diff --git a/sdbusplus/bus.hpp b/sdbusplus/bus.hpp
index c0d57f4..e6b80d6 100644
--- a/sdbusplus/bus.hpp
+++ b/sdbusplus/bus.hpp
@@ -3,13 +3,14 @@
 #include <systemd/sd-bus.h>
 #include <systemd/sd-event.h>
 
+#include <sdbusplus/exception.hpp>
+#include <sdbusplus/message.hpp>
+#include <sdbusplus/sdbus.hpp>
+
 #include <algorithm>
 #include <climits>
 #include <memory>
 #include <optional>
-#include <sdbusplus/exception.hpp>
-#include <sdbusplus/message.hpp>
-#include <sdbusplus/sdbus.hpp>
 #include <string>
 #include <vector>
 
@@ -68,8 +69,7 @@
 {
     BusDeleter() = delete;
     explicit BusDeleter(SdBusInterface* interface) : m_interface(interface)
-    {
-    }
+    {}
 
     void operator()(sd_bus* ptr) const
     {
diff --git a/sdbusplus/bus/match.hpp b/sdbusplus/bus/match.hpp
index 228b86b..8420244 100644
--- a/sdbusplus/bus/match.hpp
+++ b/sdbusplus/bus/match.hpp
@@ -1,10 +1,11 @@
 #pragma once
 
-#include <functional>
-#include <memory>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/slot.hpp>
+
+#include <functional>
+#include <memory>
 #include <string>
 
 namespace sdbusplus
@@ -52,8 +53,7 @@
     match(sdbusplus::bus::bus& bus, const std::string& _match,
           sd_bus_message_handler_t handler, void* context = nullptr) :
         match(bus, _match.c_str(), handler, context)
-    {
-    }
+    {}
 
     using callback_t = std::function<void(sdbusplus::message::message&)>;
 
@@ -76,8 +76,7 @@
     match(sdbusplus::bus::bus& bus, const std::string& _match,
           callback_t callback) :
         match(bus, _match.c_str(), callback)
-    {
-    }
+    {}
 
   private:
     slot::slot _slot;
diff --git a/sdbusplus/exception.cpp b/sdbusplus/exception.cpp
index 3727122..c13c5dd 100644
--- a/sdbusplus/exception.cpp
+++ b/sdbusplus/exception.cpp
@@ -1,4 +1,5 @@
 #include <sdbusplus/exception.hpp>
+
 #include <stdexcept>
 #include <utility>
 
diff --git a/sdbusplus/exception.hpp b/sdbusplus/exception.hpp
index 5e49113..98dc2da 100644
--- a/sdbusplus/exception.hpp
+++ b/sdbusplus/exception.hpp
@@ -2,8 +2,9 @@
 
 #include <systemd/sd-bus.h>
 
-#include <exception>
 #include <sdbusplus/sdbus.hpp>
+
+#include <exception>
 #include <string>
 
 namespace sdbusplus
@@ -22,8 +23,7 @@
 
 /** base exception class for all errors generated by sdbusplus itself. */
 struct internal_exception : public exception
-{
-};
+{};
 
 /** Exception for when an underlying sd_bus method call fails. */
 class SdBusError final : public internal_exception
diff --git a/sdbusplus/message.hpp b/sdbusplus/message.hpp
index 2e15374..95d61ec 100644
--- a/sdbusplus/message.hpp
+++ b/sdbusplus/message.hpp
@@ -2,11 +2,12 @@
 
 #include <systemd/sd-bus.h>
 
-#include <memory>
 #include <sdbusplus/message/append.hpp>
 #include <sdbusplus/message/native_types.hpp>
 #include <sdbusplus/message/read.hpp>
 #include <sdbusplus/sdbus.hpp>
+
+#include <memory>
 #include <type_traits>
 
 namespace sdbusplus
@@ -62,8 +63,7 @@
 
     message(msgp_t m, sdbusplus::SdBusInterface* intf) :
         _intf(std::move(intf)), _msg(_intf->sd_bus_message_ref(m))
-    {
-    }
+    {}
 
     /** @brief Conversion constructor for 'msgp_t'.
      *
@@ -71,21 +71,18 @@
      *  destructed.
      */
     explicit message(msgp_t m = nullptr) : message(m, &sdbus_impl)
-    {
-    }
+    {}
 
     message(msgp_t m, sdbusplus::SdBusInterface* intf, std::false_type) :
         _intf(intf), _msg(m)
-    {
-    }
+    {}
 
     /** @brief Constructor for 'msgp_t'.
      *
      *  Takes ownership of the msg-pointer and releases it when done.
      */
     message(msgp_t m, std::false_type) : _intf(&sdbus_impl), _msg(m)
-    {
-    }
+    {}
 
     /** @brief Copy constructor for 'message'.
      *
@@ -93,8 +90,7 @@
      */
     message(const message& other) :
         _intf(other._intf), _msg(sd_bus_message_ref(other._msg.get()))
-    {
-    }
+    {}
 
     /** @brief Assignment operator for 'message'.
      *
diff --git a/sdbusplus/message/append.hpp b/sdbusplus/message/append.hpp
index cc34322..fbd99bf 100644
--- a/sdbusplus/message/append.hpp
+++ b/sdbusplus/message/append.hpp
@@ -7,6 +7,7 @@
 #include <sdbusplus/utility/container_traits.hpp>
 #include <sdbusplus/utility/tuple_to_array.hpp>
 #include <sdbusplus/utility/type_traits.hpp>
+
 #include <tuple>
 #include <type_traits>
 #include <variant>
@@ -23,8 +24,7 @@
  *   variadic template reasons.)
  */
 inline void append(sdbusplus::SdBusInterface* /*intf*/, sd_bus_message* /*m*/)
-{
-}
+{}
 /** @brief Append data into an sdbus message.
  *
  *  @param[in] msg - The message to append to.
@@ -62,57 +62,47 @@
  *  Enums are converted to strings, so must be done one at a time.
  */
 template <typename T, typename Enable = void>
-struct can_append_multiple
-    : std::conditional_t<std::is_enum_v<T>, std::false_type, std::true_type>
-{
-};
+struct can_append_multiple :
+    std::conditional_t<std::is_enum_v<T>, std::false_type, std::true_type>
+{};
 // unix_fd's int needs to be wrapped.
 template <>
 struct can_append_multiple<unix_fd> : std::false_type
-{
-};
+{};
 // std::string needs a c_str() call.
 template <>
 struct can_append_multiple<std::string> : std::false_type
-{
-};
+{};
 // object_path needs a c_str() call.
 template <>
 struct can_append_multiple<object_path> : std::false_type
-{
-};
+{};
 // signature needs a c_str() call.
 template <>
 struct can_append_multiple<signature> : std::false_type
-{
-};
+{};
 // bool needs to be resized to int, per sdbus documentation.
 template <>
 struct can_append_multiple<bool> : std::false_type
-{
-};
+{};
 // std::vector/map/unordered_map/set need loops
 template <typename T>
 struct can_append_multiple<
-    T, typename std::enable_if<utility::has_const_iterator<T>::value>::type>
-    : std::false_type
-{
-};
+    T, typename std::enable_if<utility::has_const_iterator<T>::value>::type> :
+    std::false_type
+{};
 // std::pair needs to be broken down into components.
 template <typename T1, typename T2>
 struct can_append_multiple<std::pair<T1, T2>> : std::false_type
-{
-};
+{};
 // std::tuple needs to be broken down into components.
 template <typename... Args>
 struct can_append_multiple<std::tuple<Args...>> : std::false_type
-{
-};
+{};
 // variant needs to be broken down into components.
 template <typename... Args>
 struct can_append_multiple<std::variant<Args...>> : std::false_type
-{
-};
+{};
 
 /** @struct append_single
  *  @brief Utility to append a single C++ element into a sd_bus_message.
@@ -199,8 +189,7 @@
 {
     template <typename T>
     static void sanitize(const T& s)
-    {
-    }
+    {}
 
     template <typename T>
     static void sanitize(T& s)
@@ -419,8 +408,7 @@
 template <typename Tuple>
 std::enable_if_t<0 == std::tuple_size<Tuple>::value> inline append_tuple(
     sdbusplus::SdBusInterface* /*intf*/, sd_bus_message* /*m*/, Tuple&& /*t*/)
-{
-}
+{}
 
 /** @brief Group a sequence of C++ types for appending into an sd_bus_message.
  *  @tparam Tuple - A tuple of previously analyzed types.
diff --git a/sdbusplus/message/native_types.hpp b/sdbusplus/message/native_types.hpp
index c44d2f8..5a0c6c2 100644
--- a/sdbusplus/message/native_types.hpp
+++ b/sdbusplus/message/native_types.hpp
@@ -26,11 +26,9 @@
     ~string_wrapper() = default;
 
     string_wrapper(const std::string& str) : str(str)
-    {
-    }
+    {}
     string_wrapper(std::string&& str) : str(std::move(str))
-    {
-    }
+    {}
 
     operator const std::string &() const volatile&
     {
@@ -70,12 +68,10 @@
 
 /** Typename for sdbus OBJECT_PATH types. */
 struct object_path_type
-{
-};
+{};
 /** Typename for sdbus SIGNATURE types. */
 struct signature_type
-{
-};
+{};
 /** Typename for sdbus UNIX_FD types. */
 struct unix_fd_type
 {
@@ -83,8 +79,7 @@
 
     unix_fd_type() = default;
     unix_fd_type(int f) : fd(f)
-    {
-    }
+    {}
 
     operator int() const
     {
diff --git a/sdbusplus/message/read.hpp b/sdbusplus/message/read.hpp
index 3872e4c..9f58182 100644
--- a/sdbusplus/message/read.hpp
+++ b/sdbusplus/message/read.hpp
@@ -6,6 +6,7 @@
 #include <sdbusplus/message/types.hpp>
 #include <sdbusplus/utility/tuple_to_array.hpp>
 #include <sdbusplus/utility/type_traits.hpp>
+
 #include <string>
 #include <tuple>
 #include <type_traits>
@@ -24,8 +25,7 @@
  *   variadic template reasons.)
  */
 inline void read(sdbusplus::SdBusInterface* /*intf*/, sd_bus_message* /*m*/)
-{
-}
+{}
 /** @brief Read data from an sdbus message.
  *
  *  @param[in] msg - The message to read from.
@@ -64,62 +64,52 @@
  *
  */
 template <typename T, typename Enable = void>
-struct can_read_multiple
-    : std::conditional_t<std::is_enum_v<T>, std::false_type, std::true_type>
-{
-};
+struct can_read_multiple :
+    std::conditional_t<std::is_enum_v<T>, std::false_type, std::true_type>
+{};
 // unix_fd's int needs to be wrapped
 template <>
 struct can_read_multiple<unix_fd> : std::false_type
-{
-};
+{};
 // std::string needs a char* conversion.
 template <>
 struct can_read_multiple<std::string> : std::false_type
-{
-};
+{};
 // object_path needs a char* conversion.
 template <>
 struct can_read_multiple<object_path> : std::false_type
-{
-};
+{};
 // signature needs a char* conversion.
 template <>
 struct can_read_multiple<signature> : std::false_type
-{
-};
+{};
 // bool needs to be resized to int, per sdbus documentation.
 template <>
 struct can_read_multiple<bool> : std::false_type
-{
-};
+{};
 
 // std::vector/map/unordered_vector/set need loops
 template <typename T>
 struct can_read_multiple<
     T,
     typename std::enable_if<utility::has_emplace_method<T>::value ||
-                            utility::has_emplace_back_method<T>::value>::type>
-    : std::false_type
-{
-};
+                            utility::has_emplace_back_method<T>::value>::type> :
+    std::false_type
+{};
 
 // std::pair needs to be broken down into components.
 template <typename T1, typename T2>
 struct can_read_multiple<std::pair<T1, T2>> : std::false_type
-{
-};
+{};
 
 // std::tuple needs to be broken down into components.
 template <typename... Args>
 struct can_read_multiple<std::tuple<Args...>> : std::false_type
-{
-};
+{};
 // variant needs to be broken down into components.
 template <typename... Args>
 struct can_read_multiple<std::variant<Args...>> : std::false_type
-{
-};
+{};
 
 /** @struct read_single
  *  @brief Utility to read a single C++ element from a sd_bus_message.
@@ -534,8 +524,7 @@
 template <typename Tuple>
 std::enable_if_t<0 == std::tuple_size<Tuple>::value> inline read_tuple(
     sdbusplus::SdBusInterface* /*intf*/, sd_bus_message* /*m*/, Tuple&& /*t*/)
-{
-}
+{}
 
 /** @brief Group a sequence of C++ types for reading from an sd_bus_message.
  *  @tparam Tuple - A tuple of previously analyzed types.
diff --git a/sdbusplus/message/types.hpp b/sdbusplus/message/types.hpp
index d00fb65..5b3c8e9 100644
--- a/sdbusplus/message/types.hpp
+++ b/sdbusplus/message/types.hpp
@@ -2,10 +2,11 @@
 
 #include <systemd/sd-bus.h>
 
-#include <map>
 #include <sdbusplus/message/native_types.hpp>
 #include <sdbusplus/utility/container_traits.hpp>
 #include <sdbusplus/utility/type_traits.hpp>
+
+#include <map>
 #include <string>
 #include <tuple>
 #include <variant>
@@ -171,78 +172,62 @@
  *  routines.
  */
 template <typename T, typename Enable = void>
-struct type_id : public std::conditional_t<std::is_enum_v<T>,
-                                           tuple_type_id<SD_BUS_TYPE_STRING>,
-                                           undefined_type_id>
-{
-};
+struct type_id :
+    public std::conditional_t<
+        std::is_enum_v<T>, tuple_type_id<SD_BUS_TYPE_STRING>, undefined_type_id>
+{};
 // Specializations for built-in types.
 template <>
 struct type_id<bool> : tuple_type_id<SD_BUS_TYPE_BOOLEAN>
-{
-};
+{};
 template <>
 struct type_id<uint8_t> : tuple_type_id<SD_BUS_TYPE_BYTE>
-{
-};
+{};
 // int8_t isn't supported by dbus.
 template <>
 struct type_id<uint16_t> : tuple_type_id<SD_BUS_TYPE_UINT16>
-{
-};
+{};
 template <>
 struct type_id<int16_t> : tuple_type_id<SD_BUS_TYPE_INT16>
-{
-};
+{};
 template <>
 struct type_id<uint32_t> : tuple_type_id<SD_BUS_TYPE_UINT32>
-{
-};
+{};
 template <>
 struct type_id<int32_t> : tuple_type_id<SD_BUS_TYPE_INT32>
-{
-};
+{};
 template <>
 struct type_id<uint64_t> : tuple_type_id<SD_BUS_TYPE_UINT64>
-{
-};
+{};
 template <>
 struct type_id<int64_t> : tuple_type_id<SD_BUS_TYPE_INT64>
-{
-};
+{};
 // float isn't supported by dbus.
 template <>
 struct type_id<double> : tuple_type_id<SD_BUS_TYPE_DOUBLE>
-{
-};
+{};
 template <>
 struct type_id<const char*> : tuple_type_id<SD_BUS_TYPE_STRING>
-{
-};
+{};
 template <>
 struct type_id<char*> : tuple_type_id<SD_BUS_TYPE_STRING>
-{
-};
+{};
 template <>
 struct type_id<unix_fd> : tuple_type_id<SD_BUS_TYPE_UNIX_FD>
-{
-};
+{};
 template <>
 struct type_id<std::string> : tuple_type_id<SD_BUS_TYPE_STRING>
-{
-};
+{};
 template <>
 struct type_id<object_path> : tuple_type_id<SD_BUS_TYPE_OBJECT_PATH>
-{
-};
+{};
 template <>
 struct type_id<signature> : tuple_type_id<SD_BUS_TYPE_SIGNATURE>
-{
-};
+{};
 
 template <typename T>
-struct type_id<T, std::enable_if_t<utility::has_const_iterator<T>::value>>
-    : std::false_type
+struct type_id<T, std::enable_if_t<utility::has_const_iterator<T>::value>> :
+    std::false_type
 {
     static constexpr auto value = std::tuple_cat(
         tuple_type_id<SD_BUS_TYPE_ARRAY>::value,
@@ -270,8 +255,7 @@
 
 template <typename... Args>
 struct type_id<std::variant<Args...>> : tuple_type_id<SD_BUS_TYPE_VARIANT>
-{
-};
+{};
 
 template <>
 struct type_id<void>
diff --git a/sdbusplus/server/interface.hpp b/sdbusplus/server/interface.hpp
index 7dd4284..36e89de 100644
--- a/sdbusplus/server/interface.hpp
+++ b/sdbusplus/server/interface.hpp
@@ -6,6 +6,7 @@
 #include <sdbusplus/sdbus.hpp>
 #include <sdbusplus/slot.hpp>
 #include <sdbusplus/vtable.hpp>
+
 #include <string>
 
 namespace sdbusplus
diff --git a/sdbusplus/server/object.hpp b/sdbusplus/server/object.hpp
index 2926a6d..5481f79 100644
--- a/sdbusplus/server/object.hpp
+++ b/sdbusplus/server/object.hpp
@@ -2,6 +2,7 @@
 
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/sdbus.hpp>
+
 #include <type_traits>
 
 namespace sdbusplus
@@ -45,8 +46,7 @@
 {
     compose_impl(bus::bus& bus, const char* path) :
         T(bus, path), compose_impl<Rest...>(bus, path)
-    {
-    }
+    {}
 };
 
 /** Specialization for single element. */
@@ -54,8 +54,7 @@
 struct compose_impl<T> : T
 {
     compose_impl(bus::bus& bus, const char* path) : T(bus, path)
-    {
-    }
+    {}
 };
 
 /** Default compose operation for variadic arguments. */
@@ -63,8 +62,7 @@
 struct compose : compose_impl<Args...>
 {
     compose(bus::bus& bus, const char* path) : compose_impl<Args...>(bus, path)
-    {
-    }
+    {}
 };
 
 /** Specialization for zero variadic arguments. */
@@ -72,8 +70,7 @@
 struct compose<>
 {
     compose(bus::bus& /*bus*/, const char* /*path*/)
-    {
-    }
+    {}
 };
 
 } // namespace details
diff --git a/sdbusplus/server/transaction.hpp b/sdbusplus/server/transaction.hpp
index 4f717ea..0cdea88 100644
--- a/sdbusplus/server/transaction.hpp
+++ b/sdbusplus/server/transaction.hpp
@@ -2,8 +2,9 @@
 
 #include <systemd/sd-bus.h>
 
-#include <chrono>
 #include <sdbusplus/bus.hpp>
+
+#include <chrono>
 #include <stdexcept>
 #include <thread>
 
@@ -22,8 +23,7 @@
 struct Transaction
 {
     Transaction() : time(std::time(nullptr)), thread(std::this_thread::get_id())
-    {
-    }
+    {}
 
     int time;
     std::thread::id thread;
@@ -35,8 +35,7 @@
 {
     Transaction(sdbusplus::bus::bus& bus, sdbusplus::message::message& msg) :
         bus(bus), msg(msg)
-    {
-    }
+    {}
 
     sdbusplus::bus::bus& bus;
     sdbusplus::message::message& msg;
diff --git a/sdbusplus/slot.hpp b/sdbusplus/slot.hpp
index 557d0e3..27f4a70 100644
--- a/sdbusplus/slot.hpp
+++ b/sdbusplus/slot.hpp
@@ -54,8 +54,7 @@
      *  Takes ownership of the slot-pointer and releases it when done.
      */
     explicit slot(slotp_t s) : _slot(s)
-    {
-    }
+    {}
 
     /** @brief Release ownership of the stored slot-pointer. */
     slotp_t release()
diff --git a/sdbusplus/utility/container_traits.hpp b/sdbusplus/utility/container_traits.hpp
index 8783097..92b9dba 100644
--- a/sdbusplus/utility/container_traits.hpp
+++ b/sdbusplus/utility/container_traits.hpp
@@ -41,8 +41,7 @@
 {
   private:
     struct dummy
-    {
-    };
+    {};
 
     template <typename C, typename P>
     static constexpr auto test(P* p)
@@ -68,8 +67,7 @@
 {
   private:
     struct dummy
-    {
-    };
+    {};
 
     template <typename C, typename P>
     static constexpr auto test(P* p)
diff --git a/sdbusplus/utility/read_into_tuple.hpp b/sdbusplus/utility/read_into_tuple.hpp
index e2875b6..ae225ba 100644
--- a/sdbusplus/utility/read_into_tuple.hpp
+++ b/sdbusplus/utility/read_into_tuple.hpp
@@ -16,6 +16,7 @@
 
 #pragma once
 #include <sdbusplus/message.hpp>
+
 #include <tuple>
 
 namespace sdbusplus
diff --git a/sdbusplus/utility/type_traits.hpp b/sdbusplus/utility/type_traits.hpp
index 2ab21c5..0d4f954 100644
--- a/sdbusplus/utility/type_traits.hpp
+++ b/sdbusplus/utility/type_traits.hpp
@@ -32,10 +32,9 @@
 struct strip_first_n_args;
 
 template <std::size_t N, typename FirstArg, typename... Rest>
-struct strip_first_n_args<N, std::tuple<FirstArg, Rest...>>
-    : strip_first_n_args<N - 1, std::tuple<Rest...>>
-{
-};
+struct strip_first_n_args<N, std::tuple<FirstArg, Rest...>> :
+    strip_first_n_args<N - 1, std::tuple<Rest...>>
+{};
 
 template <typename FirstArg, typename... Rest>
 struct strip_first_n_args<0, std::tuple<FirstArg, Rest...>>
@@ -69,8 +68,7 @@
 // helper class to remove const and reference from types
 template <typename T>
 struct decay_tuple
-{
-};
+{};
 
 template <typename... Args>
 struct decay_tuple<std::tuple<Args...>>
diff --git a/test/exception/sdbus_error.cpp b/test/exception/sdbus_error.cpp
index fde0a85..c7ab862 100644
--- a/test/exception/sdbus_error.cpp
+++ b/test/exception/sdbus_error.cpp
@@ -1,8 +1,9 @@
 #include <systemd/sd-bus.h>
 
-#include <cstdlib>
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
+
+#include <cstdlib>
 #include <stdexcept>
 #include <string>
 #include <utility>
diff --git a/test/message/append.cpp b/test/message/append.cpp
index edae342..c6eb152 100644
--- a/test/message/append.cpp
+++ b/test/message/append.cpp
@@ -1,9 +1,10 @@
 #include <systemd/sd-bus-protocol.h>
 
-#include <array>
-#include <map>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
+
+#include <array>
+#include <map>
 #include <set>
 #include <string>
 #include <tuple>
diff --git a/test/message/native_types.cpp b/test/message/native_types.cpp
index 3c9d20a..bcee315 100644
--- a/test/message/native_types.cpp
+++ b/test/message/native_types.cpp
@@ -1,5 +1,6 @@
-#include <map>
 #include <sdbusplus/message.hpp>
+
+#include <map>
 #include <string>
 #include <unordered_map>
 #include <vector>
diff --git a/test/message/read.cpp b/test/message/read.cpp
index b973ba4..1d99940 100644
--- a/test/message/read.cpp
+++ b/test/message/read.cpp
@@ -1,10 +1,11 @@
 #include <systemd/sd-bus-protocol.h>
 
-#include <cerrno>
-#include <map>
 #include <sdbusplus/exception.hpp>
 #include <sdbusplus/message.hpp>
 #include <sdbusplus/test/sdbus_mock.hpp>
+
+#include <cerrno>
+#include <map>
 #include <set>
 #include <string>
 #include <tuple>
diff --git a/test/timer.cpp b/test/timer.cpp
index f27fc6e..8621967 100644
--- a/test/timer.cpp
+++ b/test/timer.cpp
@@ -1,6 +1,7 @@
+#include <sdbusplus/timer.hpp>
+
 #include <chrono>
 #include <iostream>
-#include <sdbusplus/timer.hpp>
 
 #include <gtest/gtest.h>
 
diff --git a/test/utility/type_traits.cpp b/test/utility/type_traits.cpp
index 6e15201..58ade36 100644
--- a/test/utility/type_traits.cpp
+++ b/test/utility/type_traits.cpp
@@ -1,4 +1,5 @@
 #include <sdbusplus/utility/type_traits.hpp>
+
 #include <type_traits>
 
 #include <gtest/gtest.h>
diff --git a/test/vtable/vtable.cpp b/test/vtable/vtable.cpp
index bab3da4..9b563a6 100644
--- a/test/vtable/vtable.cpp
+++ b/test/vtable/vtable.cpp
@@ -2,17 +2,19 @@
 
 #include <gtest/gtest.h>
 
-extern "C" {
-int test_handler(sd_bus_message* m, void* userdata, sd_bus_error* ret_error);
-int test_get(sd_bus* bus, const char* path, const char* interface,
-             const char* property, sd_bus_message* reply, void* userdata,
-             sd_bus_error* ret_error);
-int test_set(sd_bus* bus, const char* path, const char* interface,
-             const char* property, sd_bus_message* value, void* userdata,
-             sd_bus_error* ret_error);
+extern "C"
+{
+    int test_handler(sd_bus_message* m, void* userdata,
+                     sd_bus_error* ret_error);
+    int test_get(sd_bus* bus, const char* path, const char* interface,
+                 const char* property, sd_bus_message* reply, void* userdata,
+                 sd_bus_error* ret_error);
+    int test_set(sd_bus* bus, const char* path, const char* interface,
+                 const char* property, sd_bus_message* value, void* userdata,
+                 sd_bus_error* ret_error);
 
-extern const sd_bus_vtable example2[];
-extern const size_t example2_size;
+    extern const sd_bus_vtable example2[];
+    extern const size_t example2_size;
 }
 
 static const sdbusplus::vtable::vtable_t example[] = {