clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ib52f953657f0c75fcf0ea191a7eadfbd8b94c917
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index d92a3f1..d43e884 100755
--- a/.clang-format
+++ b/.clang-format
@@ -14,26 +14,30 @@
 AllowShortBlocksOnASingleLine: Empty
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: Empty
-AllowShortIfStatementsOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLambdasOnASingleLine: true
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
 AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: true
+BitFieldColonSpacing: None
 BraceWrapping:
   AfterCaseLabel:  true
   AfterClass:      true
   AfterControlStatement: true
   AfterEnum:       true
+  AfterExternBlock: true
   AfterFunction:   true
   AfterNamespace:  true
   AfterObjCDeclaration: true
   AfterStruct:     true
   AfterUnion:      true
-  AfterExternBlock: true
   BeforeCatch:     true
   BeforeElse:      true
+  BeforeLambdaBody: false
+  BeforeWhile:     false
   IndentBraces:    false
   SplitEmptyFunction:   false
   SplitEmptyRecord:     false
@@ -48,17 +52,16 @@
 ColumnLimit:     80
 CommentPragmas:  '^ IWYU pragma:'
 CompactNamespaces: false
-ConstructorInitializerAllOnOneLineOrOnePerLine: false
 ConstructorInitializerIndentWidth: 4
 ContinuationIndentWidth: 4
 Cpp11BracedListStyle: true
-DeriveLineEnding: false
 DerivePointerAlignment: false
-PointerAlignment: Left
 DisableFormat:   false
-ExperimentalAutoDetectBinPacking: false
 FixNamespaceComments: true
-ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
+ForEachMacros:
+  - foreach
+  - Q_FOREACH
+  - BOOST_FOREACH
 IncludeBlocks: Regroup
 IncludeCategories:
   - Regex:           '^[<"](gtest|gmock)'
@@ -78,6 +81,7 @@
   - Regex:           '.*'
     Priority:        6
 IndentCaseLabels: true
+IndentExternBlock: NoIndent
 IndentRequiresClause: true
 IndentWidth:     4
 IndentWrappedFunctionNames: true
@@ -92,6 +96,7 @@
 ObjCBlockIndentWidth: 2
 ObjCSpaceAfterProperty: false
 ObjCSpaceBeforeProtocolList: true
+PackConstructorInitializers: BinPack
 PenaltyBreakAssignment: 25
 PenaltyBreakBeforeFirstCallParameter: 19
 PenaltyBreakComment: 300
@@ -100,12 +105,13 @@
 PenaltyExcessCharacter: 1000000
 PenaltyReturnTypeOnItsOwnLine: 60
 PenaltyIndentedWhitespace: 0
+PointerAlignment: Left
 QualifierAlignment: Left
 ReferenceAlignment: Left
 ReflowComments:  true
 RequiresClausePosition: OwnLine
 RequiresExpressionIndentation: Keyword
-SortIncludes:    true
+SortIncludes: CaseSensitive
 SortUsingDeclarations: true
 SpaceAfterCStyleCast: false
 SpaceAfterTemplateKeyword: true
@@ -117,7 +123,7 @@
 SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
-SpacesInAngles:  false
+SpacesInAngles: Never
 SpacesInContainerLiterals: true
 SpacesInCStyleCastParentheses: false
 SpacesInParentheses: false
diff --git a/src/cpuinfo_main.cpp b/src/cpuinfo_main.cpp
index c54cdb6..51ae848 100644
--- a/src/cpuinfo_main.cpp
+++ b/src/cpuinfo_main.cpp
@@ -290,7 +290,7 @@
                 "Cannot set CPU property!");
             return;
         }
-        },
+    },
         cpuProcessName, newProp.object.c_str(),
         "org.freedesktop.DBus.Properties", "Set", newProp.interface,
         newProp.name, std::variant<std::string>{newProp.value});
@@ -342,7 +342,7 @@
                 setDbusProperty(conn, cpu, prop);
             }
         }
-            }));
+    }));
 }
 
 static void
@@ -557,7 +557,7 @@
 
             getProcessorInfo(io, conn, cpu);
         }
-        },
+    },
         service, object, "org.freedesktop.DBus.Properties", "GetAll",
         interface);
 }
@@ -596,7 +596,7 @@
             }
             getCpuConfiguration(io, conn, objServer);
         });
-            });
+    });
 
     conn->async_method_call(
         [&io, conn](
@@ -631,7 +631,7 @@
             std::cerr << "getCpuConfiguration callback complete\n";
 
         return;
-        },
+    },
         "xyz.openbmc_project.ObjectMapper",
         "/xyz/openbmc_project/object_mapper",
         "xyz.openbmc_project.ObjectMapper", "GetSubTree",
diff --git a/src/cpuinfo_utils.cpp b/src/cpuinfo_utils.cpp
index c291718..5c46585 100644
--- a/src/cpuinfo_utils.cpp
+++ b/src/cpuinfo_utils.cpp
@@ -181,7 +181,7 @@
             return;
         }
         handler(newValue);
-        });
+    });
 
     using ChangedPropertiesType =
         std::vector<std::pair<std::string, InterfaceVariant>>;
@@ -224,7 +224,7 @@
 
         DEBUG_PRINT << "PropertiesChanged handled\n";
         commonPropHandler(changedProps);
-        });
+    });
 
     // Set up a match for the InterfacesAdded signal from the service's
     // ObjectManager. This is useful in the case where the object is not added
@@ -257,7 +257,7 @@
             DEBUG_PRINT << "InterfacesAdded handled\n";
             commonPropHandler(changedProps);
         }
-        });
+    });
 
     if (propertiesChangedMatch != nullptr)
     {
diff --git a/src/mdrv2.cpp b/src/mdrv2.cpp
index 99dc302..73cc306 100644
--- a/src/mdrv2.cpp
+++ b/src/mdrv2.cpp
@@ -461,7 +461,7 @@
                     {
                         systemInfoUpdate();
                     }
-                        });
+                });
             }
         }
         else