From 979002a27da2bc72c8cd1a1cba156bd5bf3be6a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Fri, 27 Dec 2024 15:28:13 +0100
Subject: [PATCH] Bump to clang-format 19

---
 mex/sources/libkorder/dynamic_abstract_class.hh       |  4 +++-
 mex/sources/libkorder/dynamic_dll.cc                  | 11 +++--------
 mex/sources/libkorder/sylv/GeneralMatrix.hh           |  4 +++-
 mex/sources/libkorder/sylv/QuasiTriangular.hh         |  9 ++++++---
 mex/sources/libkorder/sylv/SchurDecompEig.hh          |  4 +++-
 mex/sources/ms-sbvar/modify_for_mex.h                 |  3 +--
 .../perfect_foresight_problem.cc                      |  2 +-
 7 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/mex/sources/libkorder/dynamic_abstract_class.hh b/mex/sources/libkorder/dynamic_abstract_class.hh
index 5f82c1810..38d4ff650 100644
--- a/mex/sources/libkorder/dynamic_abstract_class.hh
+++ b/mex/sources/libkorder/dynamic_abstract_class.hh
@@ -47,7 +47,9 @@ public:
       dynamic_g1_sparse_rowval_mx {dynamic_g1_sparse_rowval_mx_arg},
       dynamic_g1_sparse_colval_mx {dynamic_g1_sparse_colval_mx_arg},
       dynamic_g1_sparse_colptr_mx {dynamic_g1_sparse_colptr_mx_arg},
-      dynamic_gN_sparse_indices {move(dynamic_gN_sparse_indices_arg)} {};
+      dynamic_gN_sparse_indices {move(dynamic_gN_sparse_indices_arg)}
+  {
+  }
   virtual ~DynamicModelAC() = default;
   virtual void eval(const Vector& y, const Vector& x, const Vector& params, const Vector& ySteady,
                     Vector& residual, const std::map<int, int>& dynToDynpp,
diff --git a/mex/sources/libkorder/dynamic_dll.cc b/mex/sources/libkorder/dynamic_dll.cc
index b5317d3d7..3c64141f0 100644
--- a/mex/sources/libkorder/dynamic_dll.cc
+++ b/mex/sources/libkorder/dynamic_dll.cc
@@ -40,16 +40,11 @@ DynamicModelDLL::DynamicModelDLL(const std::string& modName, int order_arg,
   for (int o {0}; o <= order; o++)
     {
       std::string func_name {"dynamic_"s + (o == 0 ? "resid" : "g"s + std::to_string(o))};
-      std::string mex_filename
-      {
+      std::string mex_filename {
 #if !defined(__CYGWIN32__) && !defined(_WIN32)
-        "./"s +
+          "./"s +
 #endif
-            "+"s + modName + "/+sparse/" + func_name + MEXEXT
-        // clang-format off
-        // As of Clang 16, the RemoveSemicolon option incorrectly removes the following semicolon
-      };
-      // clang-format on
+          "+"s + modName + "/+sparse/" + func_name + MEXEXT};
 
       mex_handle_t handle {load_mex(mex_filename)};
       if (handle)
diff --git a/mex/sources/libkorder/sylv/GeneralMatrix.hh b/mex/sources/libkorder/sylv/GeneralMatrix.hh
index aec8c139e..54c077c11 100644
--- a/mex/sources/libkorder/sylv/GeneralMatrix.hh
+++ b/mex/sources/libkorder/sylv/GeneralMatrix.hh
@@ -44,7 +44,9 @@ private:
   T& orig;
 
 public:
-  TransposedMatrix(T& orig_arg) : orig {orig_arg} {};
+  TransposedMatrix(T& orig_arg) : orig {orig_arg}
+  {
+  }
 };
 
 // Syntactic sugar for representing a transposed matrix
diff --git a/mex/sources/libkorder/sylv/QuasiTriangular.hh b/mex/sources/libkorder/sylv/QuasiTriangular.hh
index d83aaf0a9..020b00fd3 100644
--- a/mex/sources/libkorder/sylv/QuasiTriangular.hh
+++ b/mex/sources/libkorder/sylv/QuasiTriangular.hh
@@ -267,7 +267,9 @@ class _column_iter : public _matrix_iter<_TRef, _TPtr>
 
 public:
   _column_iter(_TPtr base, int ds, bool r, int rw) :
-      _matrix_iter<_TRef, _TPtr>(base, ds, r), row(rw) {};
+      _matrix_iter<_TRef, _TPtr>(base, ds, r), row(rw)
+  {
+  }
   _Self&
   operator++() override
   {
@@ -298,8 +300,9 @@ class _row_iter : public _matrix_iter<_TRef, _TPtr>
   int col;
 
 public:
-  _row_iter(_TPtr base, int ds, bool r, int cl) :
-      _matrix_iter<_TRef, _TPtr>(base, ds, r), col(cl) {};
+  _row_iter(_TPtr base, int ds, bool r, int cl) : _matrix_iter<_TRef, _TPtr>(base, ds, r), col(cl)
+  {
+  }
   _Self&
   operator++() override
   {
diff --git a/mex/sources/libkorder/sylv/SchurDecompEig.hh b/mex/sources/libkorder/sylv/SchurDecompEig.hh
index c5a74c47b..8c82f8b85 100644
--- a/mex/sources/libkorder/sylv/SchurDecompEig.hh
+++ b/mex/sources/libkorder/sylv/SchurDecompEig.hh
@@ -33,7 +33,9 @@ public:
   SchurDecompEig(const SqSylvMatrix& m) : SchurDecomp(m)
   {
   }
-  SchurDecompEig(const QuasiTriangular& tr) : SchurDecomp(tr) {};
+  SchurDecompEig(const QuasiTriangular& tr) : SchurDecomp(tr)
+  {
+  }
   SchurDecompEig(QuasiTriangular& tr) : SchurDecomp(tr)
   {
   }
diff --git a/mex/sources/ms-sbvar/modify_for_mex.h b/mex/sources/ms-sbvar/modify_for_mex.h
index e5655fdf6..342a9571a 100644
--- a/mex/sources/ms-sbvar/modify_for_mex.h
+++ b/mex/sources/ms-sbvar/modify_for_mex.h
@@ -53,7 +53,6 @@ extern "C"
 #else
 _Noreturn
 #endif
-    void
-    msExit(int status);
+    void msExit(int status);
 
 #endif
diff --git a/mex/sources/perfect_foresight_problem/perfect_foresight_problem.cc b/mex/sources/perfect_foresight_problem/perfect_foresight_problem.cc
index 31b700909..7cd7252f2 100644
--- a/mex/sources/perfect_foresight_problem/perfect_foresight_problem.cc
+++ b/mex/sources/perfect_foresight_problem/perfect_foresight_problem.cc
@@ -220,7 +220,7 @@ mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[])
                                                      g1_sparse_rowval_mx, g1_sparse_colval_mx,
                                                      g1_sparse_colptr_mx, linear, compute_jacobian);
 
-      // Main computing loop
+    // Main computing loop
 #pragma omp for
     for (mwIndex T = 0; T < periods; T++)
       {
-- 
GitLab