diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-10-18 01:00:38 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-10-18 01:00:38 +0800 |
commit | 070471d8d4921d0204b37aa3315b6737f58e7ad0 (patch) | |
tree | dcceea64411dfd49cde236ede29957339836a303 /libsolidity | |
parent | c92d3b537db7fdb3b66db800879cc07a23252c73 (diff) | |
download | dexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.tar.gz dexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.tar.zst dexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.zip |
Fix possibly effectless map emplace
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/formal/SMTChecker.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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) |