From 992839060517eb1f64bc75dcab1e4586d64a5a25 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Fri, 26 Sep 2014 10:24:38 -0700 Subject: [PATCH] fix(library/match): memory leak that only happens with compiling with clang++ --- src/library/match.cpp | 2 +- src/library/match.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/match.cpp b/src/library/match.cpp index dca62d1f0..e69e144f2 100644 --- a/src/library/match.cpp +++ b/src/library/match.cpp @@ -352,7 +352,7 @@ bool match(expr const & p, expr const & t, buffer> & esubst, buff return match_fn(esubst, lsubst, name_generator(*g_tmp_prefix), name_subst, plugin).match(p, t); } -match_plugin mk_whnf_match_plugin(std::shared_ptr const & tc) { +match_plugin mk_whnf_match_plugin(std::shared_ptr tc) { return [=](expr const & p, expr const & t, match_context & ctx) { // NOLINT try { constraint_seq cs; diff --git a/src/library/match.h b/src/library/match.h index 0fb08cffd..511b5eaf3 100644 --- a/src/library/match.h +++ b/src/library/match.h @@ -49,7 +49,7 @@ public: typedef std::function match_plugin; // NOLINT /** \brief Create a match_plugin that puts terms in weak-head-normal-form before failing */ -match_plugin mk_whnf_match_plugin(std::shared_ptr const & tc); +match_plugin mk_whnf_match_plugin(std::shared_ptr tc); /** \brief Matching for higher-order patterns. Return true iff \c t matches the higher-order pattern \c p.