Merge remote-tracking branch 'origin/develop' into merge_develop_060

This commit is contained in:
Leonardo Alt
2019-11-20 12:27:40 +01:00
104 changed files with 621 additions and 653 deletions
+6 -6
View File
@@ -150,13 +150,13 @@ pair<TerminationFinder::ControlFlow, size_t> TerminationFinder::firstUncondition
TerminationFinder::ControlFlow TerminationFinder::controlFlowKind(Statement const& _statement)
{
if (
_statement.type() == typeid(ExpressionStatement) &&
isTerminatingBuiltin(boost::get<ExpressionStatement>(_statement))
holds_alternative<ExpressionStatement>(_statement) &&
isTerminatingBuiltin(std::get<ExpressionStatement>(_statement))
)
return ControlFlow::Terminate;
else if (_statement.type() == typeid(Break))
else if (holds_alternative<Break>(_statement))
return ControlFlow::Break;
else if (_statement.type() == typeid(Continue))
else if (holds_alternative<Continue>(_statement))
return ControlFlow::Continue;
else if (_statement.type() == typeid(Leave))
return ControlFlow::Leave;
@@ -166,9 +166,9 @@ TerminationFinder::ControlFlow TerminationFinder::controlFlowKind(Statement cons
bool TerminationFinder::isTerminatingBuiltin(ExpressionStatement const& _exprStmnt)
{
if (_exprStmnt.expression.type() == typeid(FunctionCall))
if (holds_alternative<FunctionCall>(_exprStmnt.expression))
if (auto const* dialect = dynamic_cast<EVMDialect const*>(&m_dialect))
if (auto const* builtin = dialect->builtin(boost::get<FunctionCall>(_exprStmnt.expression).functionName.name))
if (auto const* builtin = dialect->builtin(std::get<FunctionCall>(_exprStmnt.expression).functionName.name))
if (builtin->instruction)
return eth::SemanticInformation::terminatesControlFlow(*builtin->instruction);
return false;