MCPcopy Create free account
hub / github.com/argotorg/solidity / createFunctionFlow

Method createFunctionFlow

libsolidity/analysis/ControlFlowBuilder.cpp:39–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39std::unique_ptr<FunctionFlow> ControlFlowBuilder::createFunctionFlow(
40 CFG::NodeContainer& _nodeContainer,
41 FunctionDefinition const& _function,
42 ContractDefinition const* _contract
43)
44{
45 auto functionFlow = std::make_unique<FunctionFlow>();
46 functionFlow->entry = _nodeContainer.newNode();
47 functionFlow->exit = _nodeContainer.newNode();
48 functionFlow->revert = _nodeContainer.newNode();
49 functionFlow->transactionReturn = _nodeContainer.newNode();
50 ControlFlowBuilder builder(_nodeContainer, *functionFlow, _contract);
51 builder.appendControlFlow(_function);
52
53 return functionFlow;
54}
55
56bool ControlFlowBuilder::visit(BinaryOperation const& _operation)
57{

Callers

nothing calls this directly

Calls 2

appendControlFlowMethod · 0.80
newNodeMethod · 0.45

Tested by

no test coverage detected