From 070471d8d4921d0204b37aa3315b6737f58e7ad0 Mon Sep 17 00:00:00 2001 From: Leonardo Alt Date: Wed, 17 Oct 2018 19:00:38 +0200 Subject: Fix possibly effectless map emplace --- libsolidity/formal/SMTChecker.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libsolidity/formal') diff --git a/libsolidity/formal/SMTChecker.cpp b/libsolidity/formal/SMTChecker.cpp index ef2dc52f..e5648eb3 100644 --- a/libsolidity/formal/SMTChecker.cpp +++ b/libsolidity/formal/SMTChecker.cpp @@ -992,13 +992,16 @@ void SMTChecker::createExpr(Expression const& _e) solAssert(_e.annotation().type, ""); if (hasExpr(_e)) m_expressions.at(&_e)->increaseIndex(); - auto result = newSymbolicVariable(*_e.annotation().type, "expr_" + to_string(_e.id()), *m_interface); - m_expressions.emplace(&_e, result.second); - if (result.first) - m_errorReporter.warning( - _e.location(), - "Assertion checker does not yet implement this type." - ); + else + { + auto result = newSymbolicVariable(*_e.annotation().type, "expr_" + to_string(_e.id()), *m_interface); + m_expressions.emplace(&_e, result.second); + if (result.first) + m_errorReporter.warning( + _e.location(), + "Assertion checker does not yet implement this type." + ); + } } void SMTChecker::defineExpr(Expression const& _e, smt::Expression _value) -- cgit v1.2.3