fix(frontends/lean/elaborator): memory leaks that only occur when compiling with clang++

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-06-26 16:02:54 -07:00
parent 340dc622c6
commit e769121c2a
2 changed files with 2 additions and 2 deletions

View file

@ -98,7 +98,7 @@ class elaborator {
} }
}; };
lazy_list<a_choice> choose(std::shared_ptr<choice_elaborator> const & c) { lazy_list<a_choice> choose(std::shared_ptr<choice_elaborator> c) {
return mk_lazy_list<a_choice>([=]() { return mk_lazy_list<a_choice>([=]() {
auto s = c->next(); auto s = c->next();
if (s) if (s)

View file

@ -1027,7 +1027,7 @@ struct unifier_fn {
} }
}; };
lazy_list<substitution> unify(std::shared_ptr<unifier_fn> const & u) { lazy_list<substitution> unify(std::shared_ptr<unifier_fn> u) {
return mk_lazy_list<substitution>([=]() { return mk_lazy_list<substitution>([=]() {
auto s = u->next(); auto s = u->next();
if (s) if (s)