aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-10-18 01:00:38 +0800
committerLeonardo Alt <leo@ethereum.org>2018-10-18 01:00:38 +0800
commit070471d8d4921d0204b37aa3315b6737f58e7ad0 (patch)
treedcceea64411dfd49cde236ede29957339836a303
parentc92d3b537db7fdb3b66db800879cc07a23252c73 (diff)
downloaddexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.tar.gz
dexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.tar.zst
dexon-solidity-070471d8d4921d0204b37aa3315b6737f58e7ad0.zip
Fix possibly effectless map emplace
-rw-r--r--libsolidity/formal/SMTChecker.cpp17
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)