diff --git a/CMakeLists.txt b/CMakeLists.txt index 62c96893..78281486 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,6 @@ add_executable(Instantiator Instantiator.cpp src/Template.cpp) # set_target_properties(Instantiator PROPERTIES SUFFIX ${LLVM_VERSION_MAJOR}) -target_compile_options(Instantiator -Wno-return-stack-address) message(STATUS ${CMAKE_SOURCE_DIR}) target_include_directories(Instantiator PRIVATE ${LLVM_INCLUDE_DIRS} ${CLANG_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include) diff --git a/tests/Math/include/Math/CoeffUnaryOp.hpp b/tests/Math/include/Math/CoeffUnaryOp.hpp index 35c7288c..2c9d61fd 100644 --- a/tests/Math/include/Math/CoeffUnaryOp.hpp +++ b/tests/Math/include/Math/CoeffUnaryOp.hpp @@ -34,7 +34,7 @@ class CoeffUnaryOp : public MatrixBase> constexpr auto rows() const { return Rows; } constexpr auto cols() const { return Cols; } - const Scalar& operator()(std::size_t row, std::size_t col) const; + Scalar operator()(std::size_t row, std::size_t col) const; protected: const XprType& m_refexpr; diff --git a/tests/Math/src/CoeffUnaryOp.cpp b/tests/Math/src/CoeffUnaryOp.cpp index d7a4ddd2..0106e4c5 100644 --- a/tests/Math/src/CoeffUnaryOp.cpp +++ b/tests/Math/src/CoeffUnaryOp.cpp @@ -7,7 +7,7 @@ namespace Math { template -const ReturnScalar& CoeffUnaryOp::operator()(std::size_t row, std::size_t col) const +ReturnScalar CoeffUnaryOp::operator()(std::size_t row, std::size_t col) const { return m_func(m_refexpr(row, col)); }