Update clang-format

Update to the latest OpenBMC clang-format.

Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Change-Id: I54010d3c756af4c85786285644038d449730612b
diff --git a/.clang-format b/.clang-format
index ea71ad6..52ac0a1 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,13 +14,13 @@
 AllowShortFunctionsOnASingleLine: None
 AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterDefinitionReturnType: None
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: true
+AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
 BraceWrapping:
+  AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
@@ -29,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
@@ -51,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
@@ -83,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
@@ -92,7 +108,7 @@
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
 SpacesInSquareBrackets: false
-Standard:        Cpp11
+Standard:        Latest
 TabWidth:        4
 UseTab:          Never
 ...
diff --git a/bmc_dump_entry.hpp b/bmc_dump_entry.hpp
index f227641..67209f3 100644
--- a/bmc_dump_entry.hpp
+++ b/bmc_dump_entry.hpp
@@ -6,10 +6,11 @@
 #include "xyz/openbmc_project/Object/Delete/server.hpp"
 #include "xyz/openbmc_project/Time/EpochTime/server.hpp"
 
-#include <filesystem>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 
+#include <filesystem>
+
 namespace phosphor
 {
 namespace dump
diff --git a/core_manager.cpp b/core_manager.cpp
index 9dfaa9b..aa069a7 100644
--- a/core_manager.cpp
+++ b/core_manager.cpp
@@ -2,11 +2,12 @@
 
 #include "core_manager.hpp"
 
-#include <filesystem>
 #include <phosphor-logging/log.hpp>
-#include <regex>
 #include <sdbusplus/exception.hpp>
 
+#include <filesystem>
+#include <regex>
+
 namespace phosphor
 {
 namespace dump
diff --git a/core_manager.hpp b/core_manager.hpp
index b184dae..ee887ed 100644
--- a/core_manager.hpp
+++ b/core_manager.hpp
@@ -51,8 +51,7 @@
                   std::bind(std::mem_fn(
                                 &phosphor::dump::core::Manager::watchCallback),
                             this, std::placeholders::_1))
-    {
-    }
+    {}
 
   private:
     /** @brief Helper function for initiating dump request using
diff --git a/dump-extensions/default/default.cpp b/dump-extensions/default/default.cpp
index 4c56897..184ab14 100644
--- a/dump-extensions/default/default.cpp
+++ b/dump-extensions/default/default.cpp
@@ -5,7 +5,6 @@
 namespace dump
 {
 void loadExtensions(sdbusplus::bus::bus&, DumpManagerList&)
-{
-}
+{}
 } // namespace dump
 } // namespace phosphor
diff --git a/dump-extensions/openpower-dumps/dump_manager_resource.hpp b/dump-extensions/openpower-dumps/dump_manager_resource.hpp
index c0b4666..45ee1bf 100644
--- a/dump-extensions/openpower-dumps/dump_manager_resource.hpp
+++ b/dump-extensions/openpower-dumps/dump_manager_resource.hpp
@@ -27,8 +27,9 @@
  *  xyz.openbmc_project.Dump.Notify and
  *  xyz.openbmc_project.Dump.Create  DBus APIs
  */
-class Manager : virtual public NotifyIface,
-                virtual public phosphor::dump::Manager
+class Manager :
+    virtual public NotifyIface,
+    virtual public phosphor::dump::Manager
 {
   public:
     Manager() = delete;
@@ -47,8 +48,7 @@
             const std::string& baseEntryPath) :
         NotifyIface(bus, path),
         phosphor::dump::Manager(bus, path, baseEntryPath)
-    {
-    }
+    {}
 
     void restore() override
     {
diff --git a/dump-extensions/openpower-dumps/dump_manager_system.hpp b/dump-extensions/openpower-dumps/dump_manager_system.hpp
index b690203..a59b692 100644
--- a/dump-extensions/openpower-dumps/dump_manager_system.hpp
+++ b/dump-extensions/openpower-dumps/dump_manager_system.hpp
@@ -25,8 +25,9 @@
  *  @details A concrete implementation for the
  *  xyz.openbmc_project.Dump.Notify DBus API
  */
-class Manager : virtual public NotifyIface,
-                virtual public phosphor::dump::Manager
+class Manager :
+    virtual public NotifyIface,
+    virtual public phosphor::dump::Manager
 {
   public:
     Manager() = delete;
@@ -46,8 +47,7 @@
             const std::string& baseEntryPath) :
         NotifyIface(bus, path),
         phosphor::dump::Manager(bus, path, baseEntryPath)
-    {
-    }
+    {}
 
     void restore() override
     {
diff --git a/dump-extensions/openpower-dumps/resource_dump_entry.hpp b/dump-extensions/openpower-dumps/resource_dump_entry.hpp
index c68d90a..19d2674 100644
--- a/dump-extensions/openpower-dumps/resource_dump_entry.hpp
+++ b/dump-extensions/openpower-dumps/resource_dump_entry.hpp
@@ -3,10 +3,11 @@
 #include "com/ibm/Dump/Entry/Resource/server.hpp"
 #include "dump_entry.hpp"
 
-#include <chrono>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 
+#include <chrono>
+
 namespace openpower
 {
 namespace dump
diff --git a/dump_entry.hpp b/dump_entry.hpp
index 98502b4..cbeb012 100644
--- a/dump_entry.hpp
+++ b/dump_entry.hpp
@@ -5,10 +5,11 @@
 #include "xyz/openbmc_project/Object/Delete/server.hpp"
 #include "xyz/openbmc_project/Time/EpochTime/server.hpp"
 
-#include <filesystem>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 
+#include <filesystem>
+
 namespace phosphor
 {
 namespace dump
diff --git a/dump_manager.hpp b/dump_manager.hpp
index 967813a..e4ba730 100644
--- a/dump_manager.hpp
+++ b/dump_manager.hpp
@@ -41,8 +41,7 @@
             const std::string& baseEntryPath) :
         Iface(bus, path, true),
         bus(bus), lastEntryId(0), baseEntryPath(baseEntryPath)
-    {
-    }
+    {}
 
     /** @brief Construct dump d-bus objects from their persisted
      *        representations.
diff --git a/dump_manager_bmc.cpp b/dump_manager_bmc.cpp
index 4ffcd14..931c0eb 100644
--- a/dump_manager_bmc.cpp
+++ b/dump_manager_bmc.cpp
@@ -10,9 +10,10 @@
 #include <sys/inotify.h>
 #include <unistd.h>
 
-#include <ctime>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
+
+#include <ctime>
 #include <regex>
 
 namespace phosphor
diff --git a/dump_manager_bmc.hpp b/dump_manager_bmc.hpp
index 762f945..7a94889 100644
--- a/dump_manager_bmc.hpp
+++ b/dump_manager_bmc.hpp
@@ -5,9 +5,10 @@
 #include "watch.hpp"
 #include "xyz/openbmc_project/Dump/Internal/Create/server.hpp"
 
-#include <filesystem>
 #include <xyz/openbmc_project/Dump/Create/server.hpp>
 
+#include <filesystem>
+
 namespace phosphor
 {
 namespace dump
@@ -43,8 +44,9 @@
  *  @details A concrete implementation for the
  *  xyz.openbmc_project.Dump.Create DBus API
  */
-class Manager : virtual public CreateIface,
-                virtual public phosphor::dump::Manager
+class Manager :
+    virtual public CreateIface,
+    virtual public phosphor::dump::Manager
 {
     friend class internal::Manager;
 
@@ -74,8 +76,7 @@
             std::bind(std::mem_fn(&phosphor::dump::bmc::Manager::watchCallback),
                       this, std::placeholders::_1)),
         dumpDir(filePath)
-    {
-    }
+    {}
 
     /** @brief Implementation of dump watch call back
      *  @param [in] fileInfo - map of file info  path:event
diff --git a/dump_manager_main.cpp b/dump_manager_main.cpp
index e38a521..207de53 100644
--- a/dump_manager_main.cpp
+++ b/dump_manager_main.cpp
@@ -8,9 +8,10 @@
 #include "watch.hpp"
 #include "xyz/openbmc_project/Common/error.hpp"
 
-#include <memory>
 #include <phosphor-logging/elog-errors.hpp>
 #include <sdbusplus/bus.hpp>
+
+#include <memory>
 #include <vector>
 
 int main()
diff --git a/dump_offload.cpp b/dump_offload.cpp
index 8089d75..374a657 100644
--- a/dump_offload.cpp
+++ b/dump_offload.cpp
@@ -8,12 +8,13 @@
 #include <unistd.h>
 
 #include <dump_utils.hpp>
-#include <fstream>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/elog.hpp>
 #include <xyz/openbmc_project/Common/File/error.hpp>
 #include <xyz/openbmc_project/Common/error.hpp>
 
+#include <fstream>
+
 namespace phosphor
 {
 namespace dump
diff --git a/dump_serialize.cpp b/dump_serialize.cpp
index 89c74c8..823cc4c 100644
--- a/dump_serialize.cpp
+++ b/dump_serialize.cpp
@@ -2,9 +2,10 @@
 
 #include <cereal/archives/binary.hpp>
 #include <cereal/types/set.hpp>
-#include <fstream>
 #include <phosphor-logging/log.hpp>
 
+#include <fstream>
+
 namespace phosphor
 {
 namespace dump
diff --git a/dump_utils.hpp b/dump_utils.hpp
index 40891ea..4a6b419 100644
--- a/dump_utils.hpp
+++ b/dump_utils.hpp
@@ -3,10 +3,11 @@
 #include <systemd/sd-event.h>
 #include <unistd.h>
 
-#include <memory>
 #include <sdbusplus/bus.hpp>
 #include <xyz/openbmc_project/State/Boot/Progress/server.hpp>
 
+#include <memory>
+
 namespace phosphor
 {
 namespace dump
@@ -47,8 +48,7 @@
      *  @param[in] fd - File descriptor
      */
     CustomFd(int fd) : fd(fd)
-    {
-    }
+    {}
 
     ~CustomFd()
     {
diff --git a/elog_watch.cpp b/elog_watch.cpp
index 6b92dee..764cd33 100644
--- a/elog_watch.cpp
+++ b/elog_watch.cpp
@@ -8,10 +8,11 @@
 #include "xyz/openbmc_project/Dump/Create/error.hpp"
 
 #include <cereal/cereal.hpp>
-#include <fstream>
 #include <phosphor-logging/elog.hpp>
 #include <sdbusplus/exception.hpp>
 
+#include <fstream>
+
 // Register class version with Cereal
 CEREAL_CLASS_VERSION(phosphor::dump::elog::Watch, CLASS_VERSION)
 
diff --git a/elog_watch.hpp b/elog_watch.hpp
index b04c54c..252cdcf 100644
--- a/elog_watch.hpp
+++ b/elog_watch.hpp
@@ -5,9 +5,10 @@
 #include "dump_manager_bmc.hpp"
 
 #include <cereal/access.hpp>
-#include <filesystem>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server.hpp>
+
+#include <filesystem>
 #include <set>
 
 namespace phosphor
diff --git a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
index 13df7e4..ef344d1 100644
--- a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
+++ b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
@@ -24,11 +24,12 @@
 #include <libpldm/platform.h>
 #include <unistd.h>
 
-#include <fstream>
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
 #include <sdbusplus/bus.hpp>
 
+#include <fstream>
+
 namespace phosphor
 {
 namespace dump
diff --git a/test/debug_inif_test.cpp b/test/debug_inif_test.cpp
index 04fb6cf..0bb26ec 100644
--- a/test/debug_inif_test.cpp
+++ b/test/debug_inif_test.cpp
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: Apache-2.0
-#include <cstdlib>
 #include <dump_serialize.hpp>
+
+#include <cstdlib>
 #include <exception>
 #include <filesystem>
 #include <set>
@@ -14,8 +15,7 @@
 {
   public:
     TestDumpSerial()
-    {
-    }
+    {}
 
     void SetUp()
     {