[FIXUP] Don't add public getters to the graph

This commit is contained in:
Kamil Śliwak 2021-02-05 13:37:35 +01:00
parent 7411742dad
commit 11bda6f0e7

View File

@ -58,11 +58,16 @@ FunctionCallGraphBuilder::FunctionCallGraphBuilder(ContractDefinition const& _co
for (FunctionTypePointer functionType: _contract.interfaceFunctionList() | views::transform(getSecondElement))
{
if (auto const* funcDef = dynamic_cast<FunctionDefinition const*>(&functionType->declaration()))
{
if (!m_graph->edges.count(funcDef))
visitCallable(funcDef);
// Add all external functions to the RuntimeDispatch
add(SpecialNode::Entry, &functionType->declaration());
// Add all external functions to the RuntimeDispatch
add(SpecialNode::Entry, &functionType->declaration());
}
else
// If it's not a function, it must be a getter of a public variable; we ignore those
solAssert(dynamic_cast<VariableDeclaration const*>(&functionType->declaration()), "");
}
// Add all InternalCreationDispatch calls to the InternalDispatch as well