From 2aa2ff29002d070aa0f5aa86c06bf93e3bb7eff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Mon, 20 Oct 2025 21:09:53 +0000 Subject: [PATCH] More ComplexQZ fixes. ### Description More ComplexQZ fixes. Extra semicolons are triggering some warnings and errors with `-Werror`. Moved the `Sparse` import up to the umbrella header to avoid IWYU exports. ### Reference issue ### Additional information See merge request libeigen/eigen!2036 --- Eigen/Eigenvalues | 1 + Eigen/src/Eigenvalues/ComplexQZ.h | 10 +++------- Eigen/src/SparseCholesky/SimplicialCholesky_impl.h | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Eigen/Eigenvalues b/Eigen/Eigenvalues index c11f42ad4..803900058 100644 --- a/Eigen/Eigenvalues +++ b/Eigen/Eigenvalues @@ -15,6 +15,7 @@ #include "Householder" #include "LU" #include "Geometry" +#include "Sparse" // Needed by ComplexQZ. #include "src/Core/util/DisableStupidWarnings.h" diff --git a/Eigen/src/Eigenvalues/ComplexQZ.h b/Eigen/src/Eigenvalues/ComplexQZ.h index 20f2a77bb..de35698ae 100644 --- a/Eigen/src/Eigenvalues/ComplexQZ.h +++ b/Eigen/src/Eigenvalues/ComplexQZ.h @@ -14,8 +14,6 @@ #ifndef EIGEN_COMPLEX_QZ_H_ #define EIGEN_COMPLEX_QZ_H_ -#include "../../Sparse" - // IWYU pragma: private #include "./InternalHeaderCheck.h" @@ -126,9 +124,7 @@ class ComplexQZ { computeQZ ? n : (MatrixType::ColsAtCompileTime == Eigen::Dynamic ? 0 : MatrixType::ColsAtCompileTime)), m_ws(2 * n), m_computeQZ(computeQZ), - m_maxIters(maxIters){ - - }; + m_maxIters(maxIters) {} /** \brief Constructor. computes the QZ decomposition of given matrices * upon creation @@ -178,14 +174,14 @@ class ComplexQZ { * * \returns \c Success if computation was successfull, \c NoConvergence otherwise. */ - ComputationInfo info() const { return m_info; }; + ComputationInfo info() const { return m_info; } /** \brief number of performed QZ steps */ unsigned int iterations() const { eigen_assert(m_isInitialized && "ComplexQZ is not initialized."); return m_global_iter; - }; + } private: Index m_n; diff --git a/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h b/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h index 3c65541b8..97f214201 100644 --- a/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +++ b/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h @@ -89,7 +89,7 @@ struct simpl_chol_helper { m_set[u] = v; u = next; } - }; + } }; // Computes the higher adjacency pattern by transposing the input lower adjacency matrix.