Add control flow tests for "and" and "or" operators

This commit is contained in:
wechman
2022-09-28 13:06:25 +02:00
parent 43a612e420
commit 1084a34f28
8 changed files with 90 additions and 65 deletions
+1 -2
View File
@@ -57,6 +57,7 @@ unique_ptr<FunctionFlow> ControlFlowBuilder::createFunctionFlow(
bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
{
solAssert(!!m_currentNode, "");
visitNode(_operation);
switch (_operation.getOperator())
{
@@ -65,7 +66,6 @@ bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
{
visitNode(_operation);
solAssert(!_operation.annotation().userDefinedFunction);
visitNode(_operation);
appendControlFlow(_operation.leftExpression());
auto nodes = splitFlow<2>();
@@ -76,7 +76,6 @@ bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
}
default:
{
visitNode(_operation);
if (_operation.annotation().userDefinedFunction)
{
visitNode(_operation);