Revise C++ coding style using clang-format-18

Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Fixes: #26123
diff --git a/Modules/CXX-DetectStdlib.h b/Modules/CXX-DetectStdlib.h
index 0214dee..11cb93f 100644
--- a/Modules/CXX-DetectStdlib.h
+++ b/Modules/CXX-DetectStdlib.h
@@ -7,4 +7,4 @@
 #else
 CMAKE-STDLIB-DETECT: UNKNOWN
 #endif
-    // clang-format on
+   // clang-format on
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 225e86f..fb0885f 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -551,8 +551,7 @@
     }
   } else {
     cmCPackLogger(cmCPackLog::LOG_DEBUG,
-                  "CPACK_CREATE_DESKTOP_LINKS: "
-                    << "not set" << std::endl);
+                  "CPACK_CREATE_DESKTOP_LINKS: " << "not set" << std::endl);
   }
 
   std::ostringstream str;
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 2e63fc8..bac1096 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -1733,9 +1733,7 @@
                      "run covbr: " << std::endl, this->Quiet);
 
   if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
-    cmCTestLog(this->CTest, ERROR_MESSAGE,
-               "error running covbr for."
-                 << "\n");
+    cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n");
     return -1;
   }
   cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx
index 8df32e2..5238e2d 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.cxx
+++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx
@@ -6,7 +6,7 @@
 #include "cmCursesWidget.h"
 #include "cmStateTypes.h"
 
-#define ctrl(z) ((z)&037)
+#define ctrl(z) ((z) & 037)
 
 cmCursesOptionsWidget::cmCursesOptionsWidget(int width, int height, int left,
                                              int top)
diff --git a/Source/cmExportTryCompileFileGenerator.h b/Source/cmExportTryCompileFileGenerator.h
index 20c331c..03994dc 100644
--- a/Source/cmExportTryCompileFileGenerator.h
+++ b/Source/cmExportTryCompileFileGenerator.h
@@ -31,7 +31,7 @@
 protected:
   // Implement virtual methods from the superclass.
   void ComplainAboutDuplicateTarget(
-    std::string const& /*targetName*/) const override{};
+    std::string const& /*targetName*/) const override {};
   void ReportError(std::string const& errorMessage) const override;
 
   bool GenerateMainFile(std::ostream& os) override;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index b44d62b..0232cba 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -830,7 +830,7 @@
       // flag
       needTestLanguage[lang] = true;
     } // end if(!this->GetLanguageEnabled(lang) )
-  }   // end loop over languages
+  } // end loop over languages
 
   // **** Load the system specific information if not yet loaded
   if (!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED")) {
@@ -939,7 +939,7 @@
           cmSystemTools::RemoveFile(compilerLangFile);
         }
       } // end if in try compile
-    }   // end need test language
+    } // end need test language
 
     // load linker configuration,  if required
     if (mf->GetDefinition(cmStrCat("CMAKE_", lang, "_USE_LINKER_INFORMATION"))
diff --git a/Source/cmJSONState.h b/Source/cmJSONState.h
index 3223453..eb970fe 100644
--- a/Source/cmJSONState.h
+++ b/Source/cmJSONState.h
@@ -42,10 +42,10 @@
   public:
     Error(Location loc, std::string errMsg)
       : location(loc)
-      , message(std::move(errMsg)){};
+      , message(std::move(errMsg)) {};
     Error(std::string errMsg)
       : location({ -1, -1 })
-      , message(std::move(errMsg)){};
+      , message(std::move(errMsg)) {};
     std::string GetErrorMessage() const
     {
       std::string output = message;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 972dd0e..d60690b 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1503,7 +1503,7 @@
 {
 #ifdef _WIN32
 #  ifndef INVALID_FILE_ATTRIBUTES
-#    define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
+#    define INVALID_FILE_ATTRIBUTES ((DWORD) - 1)
 #  endif
   std::wstring const oldname_wstr =
     SystemTools::ConvertToWindowsExtendedPath(oldname);
diff --git a/Source/cmVersion.h b/Source/cmVersion.h
index 456428c..7773b02 100644
--- a/Source/cmVersion.h
+++ b/Source/cmVersion.h
@@ -26,6 +26,6 @@
    and to encode dates until the year 10000 in the patch level.  */
 #define CMake_VERSION_ENCODE_BASE KWIML_INT_UINT64_C(100000000)
 #define CMake_VERSION_ENCODE(major, minor, patch)                             \
-  ((((major)*1000u) * CMake_VERSION_ENCODE_BASE) +                            \
+  ((((major) * 1000u) * CMake_VERSION_ENCODE_BASE) +                          \
    (((minor) % 1000u) * CMake_VERSION_ENCODE_BASE) +                          \
    (((patch) % CMake_VERSION_ENCODE_BASE)))
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
index 2bc04ee..69a730e 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h
@@ -3,7 +3,7 @@
 #ifdef _WIN32
   __declspec(dllexport)
 #endif
-    OnlyPlainLib1
+  OnlyPlainLib1
 {
   OnlyPlainLib1();
 
diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
index 6f18d20..e144b63 100644
--- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
+++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h
@@ -4,4 +4,5 @@
 #ifdef _WIN32
 __declspec(dllexport)
 #endif
-  OnlyPlainLib1 onlyPlainLib2();
+OnlyPlainLib1
+onlyPlainLib2();
diff --git a/Tests/CMakeLib/testCTestBinPacker.cxx b/Tests/CMakeLib/testCTestBinPacker.cxx
index 038ceea..7107428 100644
--- a/Tests/CMakeLib/testCTestBinPacker.cxx
+++ b/Tests/CMakeLib/testCTestBinPacker.cxx
@@ -16,8 +16,7 @@
   std::vector<cmCTestBinPackerAllocation> ExpectedBlockAllocations;
 };
 
-static const std::vector<ExpectedPackResult> expectedResults
-{
+static const std::vector<ExpectedPackResult> expectedResults{
   /* clang-format off */
   {
     { 2, 2, 2, 2 },
diff --git a/Tests/CMakeLib/testCTestResourceAllocator.cxx b/Tests/CMakeLib/testCTestResourceAllocator.cxx
index 3a2e524..9f7538d 100644
--- a/Tests/CMakeLib/testCTestResourceAllocator.cxx
+++ b/Tests/CMakeLib/testCTestResourceAllocator.cxx
@@ -7,14 +7,12 @@
 #include "cmCTestResourceSpec.h"
 #include "cmJSONState.h"
 
-static const cmCTestResourceSpec spec{
-  { {
-    /* clang-format off */
+static const cmCTestResourceSpec spec{ { {
+                                         /* clang-format off */
   { "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } }, },
-    /* clang-format on */
-  } },
-  cmJSONState()
-};
+                                         /* clang-format on */
+                                       } },
+                                       cmJSONState() };
 
 static bool testInitializeFromResourceSpec()
 {
diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx
index 0e2463a..c0ce0bb 100644
--- a/Tests/Complex/Executable/complex.cxx
+++ b/Tests/Complex/Executable/complex.cxx
@@ -19,7 +19,7 @@
 
 #include <sys/stat.h>
 #if !defined(S_ISDIR)
-#  define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#  define S_ISDIR(mode) ((mode) & _S_IFDIR)
 #endif
 
 #ifdef COMPLEX_TEST_LINK_STATIC
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx
index 1c2a316..f959211 100644
--- a/Tests/ComplexOneConfig/Executable/complex.cxx
+++ b/Tests/ComplexOneConfig/Executable/complex.cxx
@@ -19,7 +19,7 @@
 
 #include <sys/stat.h>
 #if !defined(S_ISDIR)
-#  define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#  define S_ISDIR(mode) ((mode) & _S_IFDIR)
 #endif
 
 #ifdef COMPLEX_TEST_LINK_STATIC
diff --git a/Tests/ExportImport/Export/install-RUNTIME_DEPENDENCY_SET/deplib.c b/Tests/ExportImport/Export/install-RUNTIME_DEPENDENCY_SET/deplib.c
index e5da196..4063cde 100644
--- a/Tests/ExportImport/Export/install-RUNTIME_DEPENDENCY_SET/deplib.c
+++ b/Tests/ExportImport/Export/install-RUNTIME_DEPENDENCY_SET/deplib.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep1(void);
+extern void
+dep1(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/lib.c b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/lib.c
index 9a64887..ff542d3 100644
--- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/lib.c
+++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/lib.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep8(void);
+extern void
+dep8(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/mod.c b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/mod.c
index d001299..ab4a878 100644
--- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/mod.c
+++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/mod.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep9(void);
+extern void
+dep9(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib1.c b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib1.c
index f17b902..c763116 100644
--- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib1.c
+++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib1.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep6(void);
+extern void
+dep6(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib2.c b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib2.c
index 61b5c83..5c303fe 100644
--- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib2.c
+++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCIES/sublib2.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep7(void);
+extern void
+dep7(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCY_SET/main.c b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCY_SET/main.c
index b359498..caeda76 100644
--- a/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCY_SET/main.c
+++ b/Tests/ExportImport/Import/install-RUNTIME_DEPENDENCY_SET/main.c
@@ -1,11 +1,13 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep3(void);
+extern void
+dep3(void);
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void dep4(void);
+extern void
+dep4(void);
 
 int main(void)
 {
diff --git a/Tests/FindOpenACC/CTest/main.c b/Tests/FindOpenACC/CTest/main.c
index 6c005c1..20c6be1 100644
--- a/Tests/FindOpenACC/CTest/main.c
+++ b/Tests/FindOpenACC/CTest/main.c
@@ -26,7 +26,7 @@
     b[i] = (float)(1000 * i);
   }
 /* compute on the GPU */
-#pragma acc data copyin(a [0:n], b [0:n]) copyout(r [0:n])
+#pragma acc data copyin(a[0 : n], b[0 : n]) copyout(r[0 : n])
   {
     vecaddgpu(r, a, b, n);
   }
diff --git a/Tests/FindOpenACC/CXXTest/main.cxx b/Tests/FindOpenACC/CXXTest/main.cxx
index 14b912b..f8c613a 100644
--- a/Tests/FindOpenACC/CXXTest/main.cxx
+++ b/Tests/FindOpenACC/CXXTest/main.cxx
@@ -25,7 +25,7 @@
   auto a_ptr = a.data();
   auto b_ptr = b.data();
   auto r_ptr = r.data();
-#pragma acc data copyin(a_ptr [0:n], b_ptr [0:n]) copyout(r_ptr [0:n])
+#pragma acc data copyin(a_ptr[0 : n], b_ptr[0 : n]) copyout(r_ptr[0 : n])
   {
     vecaddgpu(r_ptr, a_ptr, b_ptr, n);
   }
diff --git a/Tests/LibName/bar.c b/Tests/LibName/bar.c
index b1c5cf2..62a9298 100644
--- a/Tests/LibName/bar.c
+++ b/Tests/LibName/bar.c
@@ -2,6 +2,7 @@
 __declspec(dllexport)
 #endif
 
-  extern void foo(void)
+extern void
+foo(void)
 {
 }
diff --git a/Tests/LibName/foo.c b/Tests/LibName/foo.c
index 1bdb58b..9b51156 100644
--- a/Tests/LibName/foo.c
+++ b/Tests/LibName/foo.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void foo(void);
+extern void
+foo(void);
 #ifdef _WIN32
 __declspec(dllexport)
 #endif
diff --git a/Tests/LibName/foobar.c b/Tests/LibName/foobar.c
index fa7d3e9..e7e78b3 100644
--- a/Tests/LibName/foobar.c
+++ b/Tests/LibName/foobar.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void bar();
+extern void
+bar();
 
 int main(void)
 {
diff --git a/Tests/QtAutogen/AutogenOriginDependsOn/testGenLib.hpp b/Tests/QtAutogen/AutogenOriginDependsOn/testGenLib.hpp
index 55457d2..3bacc5b 100644
--- a/Tests/QtAutogen/AutogenOriginDependsOn/testGenLib.hpp
+++ b/Tests/QtAutogen/AutogenOriginDependsOn/testGenLib.hpp
@@ -11,7 +11,7 @@
   Q_OBJECT
 public:
   Q_SLOT
-  void aSlot(){};
+  void aSlot() {};
 };
 
 #endif
diff --git a/Tests/QtAutogen/MocOnly/IncA.cpp b/Tests/QtAutogen/MocOnly/IncA.cpp
index 94610cd..7c5d3f1 100644
--- a/Tests/QtAutogen/MocOnly/IncA.cpp
+++ b/Tests/QtAutogen/MocOnly/IncA.cpp
@@ -8,7 +8,7 @@
 {
   Q_OBJECT
 public:
-  IncAPrivate(){};
+  IncAPrivate() {};
 };
 
 IncA::IncA()
diff --git a/Tests/QtAutogen/MocOnly/IncB.cpp b/Tests/QtAutogen/MocOnly/IncB.cpp
index bd441a9..6eb62cf 100644
--- a/Tests/QtAutogen/MocOnly/IncB.cpp
+++ b/Tests/QtAutogen/MocOnly/IncB.cpp
@@ -6,7 +6,7 @@
 {
   Q_OBJECT
 public:
-  IncBPrivate(){};
+  IncBPrivate() {};
 };
 
 IncB::IncB()
diff --git a/Tests/QtAutogen/MocSkipSource/qItemC.cpp b/Tests/QtAutogen/MocSkipSource/qItemC.cpp
index 622f282..464b652 100644
--- a/Tests/QtAutogen/MocSkipSource/qItemC.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemC.cpp
@@ -4,8 +4,8 @@
 {
   Q_OBJECT
 public:
-  QItemC_Local(){};
-  ~QItemC_Local(){};
+  QItemC_Local() {};
+  ~QItemC_Local() {};
 };
 
 void QItemC::go()
diff --git a/Tests/QtAutogen/MocSkipSource/qItemD.cpp b/Tests/QtAutogen/MocSkipSource/qItemD.cpp
index fe0f4e4..ed4e81f 100644
--- a/Tests/QtAutogen/MocSkipSource/qItemD.cpp
+++ b/Tests/QtAutogen/MocSkipSource/qItemD.cpp
@@ -4,8 +4,8 @@
 {
   Q_OBJECT
 public:
-  QItemD_Local(){};
-  ~QItemD_Local(){};
+  QItemD_Local() {};
+  ~QItemD_Local() {};
 };
 
 void QItemD::go()
diff --git a/Tests/QtAutogen/SameName/object.h b/Tests/QtAutogen/SameName/object.h
index 8662094..3e81af2 100644
--- a/Tests/QtAutogen/SameName/object.h
+++ b/Tests/QtAutogen/SameName/object.h
@@ -7,7 +7,7 @@
 {
   Q_OBJECT
   Q_SLOT
-  void go(){};
+  void go() {};
 };
 
 #endif
diff --git a/Tests/QtAutogen/SameName/object.hh b/Tests/QtAutogen/SameName/object.hh
index 3e16f83..4db2b5a 100644
--- a/Tests/QtAutogen/SameName/object.hh
+++ b/Tests/QtAutogen/SameName/object.hh
@@ -7,7 +7,7 @@
 {
   Q_OBJECT
   Q_SLOT
-  void go(){};
+  void go() {};
 };
 
 #endif
diff --git a/Tests/QtAutogen/SameName/object.hpp b/Tests/QtAutogen/SameName/object.hpp
index 035050e..498befd 100644
--- a/Tests/QtAutogen/SameName/object.hpp
+++ b/Tests/QtAutogen/SameName/object.hpp
@@ -7,7 +7,7 @@
 {
   Q_OBJECT
   Q_SLOT
-  void go(){};
+  void go() {};
 };
 
 #endif
diff --git a/Tests/QtAutogen/SameName/object.hxx b/Tests/QtAutogen/SameName/object.hxx
index c3c050f..b2a963c 100644
--- a/Tests/QtAutogen/SameName/object.hxx
+++ b/Tests/QtAutogen/SameName/object.hxx
@@ -7,7 +7,7 @@
 {
   Q_OBJECT
   Q_SLOT
-  void go(){};
+  void go() {};
 };
 
 #endif
diff --git a/Tests/QtAutogen/UicInterface/klocalizedstring.h b/Tests/QtAutogen/UicInterface/klocalizedstring.h
index 6129599..795d736 100644
--- a/Tests/QtAutogen/UicInterface/klocalizedstring.h
+++ b/Tests/QtAutogen/UicInterface/klocalizedstring.h
@@ -7,11 +7,13 @@
 #ifdef _WIN32
 __declspec(dllexport)
 #endif
-  QString tr2xi18n(const char* text, const char* comment = 0);
+QString
+tr2xi18n(const char* text, const char* comment = 0);
 
 #ifdef _WIN32
 __declspec(dllexport)
 #endif
-  QString tr2i18n(const char* text, const char* comment = 0);
+QString
+tr2i18n(const char* text, const char* comment = 0);
 
 #endif
diff --git a/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp b/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp
index 3091845..faa8c14 100644
--- a/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp
+++ b/Tests/QtAutogen/UicNoGui/MocOnly/main.cpp
@@ -4,7 +4,7 @@
 {
   Q_OBJECT
 public:
-  LocalObject(){};
+  LocalObject() {};
 };
 
 void mocOnly()
diff --git a/Tests/RunCMake/AutoExportDll/hello.cxx b/Tests/RunCMake/AutoExportDll/hello.cxx
index 35ccbb7..2dc0c98 100644
--- a/Tests/RunCMake/AutoExportDll/hello.cxx
+++ b/Tests/RunCMake/AutoExportDll/hello.cxx
@@ -10,8 +10,8 @@
 {
   printf("hello");
 }
-void Hello::operator delete[](void*){};
-void Hello::operator delete(void*){};
+void Hello::operator delete[](void*) {};
+void Hello::operator delete(void*) {};
 
 #ifdef HELLO_VFTABLE
 HelloVFTable::HelloVFTable()
diff --git a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c
index 524b5b2..c939c08 100644
--- a/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c
+++ b/Tests/RunCMake/GenEx-TARGET_RUNTIME_DLLS/lib1.c
@@ -1,7 +1,8 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void lib2(void);
+extern void
+lib2(void);
 
 #ifdef _WIN32
 __declspec(dllexport)
diff --git a/Tests/RunCMake/VerifyHeaderSets/dir1/lib1.h b/Tests/RunCMake/VerifyHeaderSets/dir1/lib1.h
index 69c37ed..064c4f5 100644
--- a/Tests/RunCMake/VerifyHeaderSets/dir1/lib1.h
+++ b/Tests/RunCMake/VerifyHeaderSets/dir1/lib1.h
@@ -1,4 +1,5 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void lib1(void);
+extern void
+lib1(void);
diff --git a/Tests/RunCMake/VerifyHeaderSets/dir2/lib2.h b/Tests/RunCMake/VerifyHeaderSets/dir2/lib2.h
index fa24a9a..aa4d09f 100644
--- a/Tests/RunCMake/VerifyHeaderSets/dir2/lib2.h
+++ b/Tests/RunCMake/VerifyHeaderSets/dir2/lib2.h
@@ -1,4 +1,5 @@
 #ifdef _WIN32
 __declspec(dllimport)
 #endif
-  extern void lib2(void);
+extern void
+lib2(void);
diff --git a/Tests/StagingPrefix/Producer/bar.h b/Tests/StagingPrefix/Producer/bar.h
index a56bd5d..d93a76c 100644
--- a/Tests/StagingPrefix/Producer/bar.h
+++ b/Tests/StagingPrefix/Producer/bar.h
@@ -3,7 +3,7 @@
 #ifdef _WIN32
   __declspec(dllexport)
 #endif
-    Bar
+  Bar
 {
 public:
   int bar();
diff --git a/Tests/StagingPrefix/Producer/foo.h b/Tests/StagingPrefix/Producer/foo.h
index 17b4f77..f6b2fa4 100644
--- a/Tests/StagingPrefix/Producer/foo.h
+++ b/Tests/StagingPrefix/Producer/foo.h
@@ -3,7 +3,7 @@
 #ifdef _WIN32
   __declspec(dllexport)
 #endif
-    Foo
+  Foo
 {
 public:
   int foo();
diff --git a/Tests/UseSWIG/example.h b/Tests/UseSWIG/example.h
index 366deb0..6cde757 100644
--- a/Tests/UseSWIG/example.h
+++ b/Tests/UseSWIG/example.h
@@ -19,7 +19,7 @@
 
 public:
   Circle(double r)
-    : radius(r){};
+    : radius(r) {};
   virtual double area(void);
   virtual double perimeter(void);
 };
@@ -31,7 +31,7 @@
 
 public:
   Square(double w)
-    : width(w){};
+    : width(w) {};
   virtual double area(void);
   virtual double perimeter(void);
 };
diff --git a/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen-fixit.cxx b/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen-fixit.cxx
index cde0086..919fa0c 100644
--- a/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen-fixit.cxx
+++ b/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen-fixit.cxx
@@ -1,7 +1,7 @@
 #include <cstring>
 
 template <size_t N>
-constexpr size_t cmStrLen(const char (&/*str*/)[N])
+constexpr size_t cmStrLen(const char (& /*str*/)[N])
 {
   return N - 1;
 }
diff --git a/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen.cxx b/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen.cxx
index 205bc9c..7b8f3d0 100644
--- a/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen.cxx
+++ b/Utilities/ClangTidyModule/Tests/cmake-use-cmstrlen.cxx
@@ -1,7 +1,7 @@
 #include <cstring>
 
 template <size_t N>
-constexpr size_t cmStrLen(const char (&/*str*/)[N])
+constexpr size_t cmStrLen(const char (& /*str*/)[N])
 {
   return N - 1;
 }
diff --git a/Utilities/std/cm/bits/container_helpers.hxx b/Utilities/std/cm/bits/container_helpers.hxx
index abcdacb..6399fc2 100644
--- a/Utilities/std/cm/bits/container_helpers.hxx
+++ b/Utilities/std/cm/bits/container_helpers.hxx
@@ -221,7 +221,7 @@
 #  else
 inline constexpr auto data(C& c) noexcept(noexcept(c.data()))
 #  endif
-  -> decltype(c.data())
+                         -> decltype(c.data())
 {
   return c.data();
 }
diff --git a/Utilities/std/cmext/algorithm b/Utilities/std/cmext/algorithm
index 46377f4..f9f6006 100644
--- a/Utilities/std/cmext/algorithm
+++ b/Utilities/std/cmext/algorithm
@@ -212,8 +212,9 @@
 
 #if defined(__SUNPRO_CC)
 template <typename Range, typename Key>
-auto contains(Range const& range, Key const& key, detail::overload_selector<1>)
-  -> decltype(range.find(key) != range.end())
+auto contains(Range const& range, Key const& key,
+              detail::overload_selector<1>) -> decltype(range.find(key) !=
+                                                        range.end())
 #else
 template <
   typename Range, typename Key,