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

Method visit

libsolidity/analysis/FunctionCallGraph.cpp:114–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114bool FunctionCallGraphBuilder::visit(FunctionCall const& _functionCall)
115{
116 if (*_functionCall.annotation().kind != FunctionCallKind::FunctionCall)
117 return true;
118
119 auto const* functionType = dynamic_cast<FunctionType const*>(_functionCall.expression().annotation().type);
120 solAssert(functionType, "");
121
122 if (functionType->kind() == FunctionType::Kind::Internal && !_functionCall.expression().annotation().calledDirectly)
123 // If it's not a direct call, we don't really know which function will be called (it may even
124 // change at runtime). All we can do is to add an edge to the dispatch which in turn has
125 // edges to all functions could possibly be called.
126 add(m_currentNode, CallGraph::SpecialNode::InternalDispatch);
127 else if (functionType->kind() == FunctionType::Kind::Error)
128 m_graph.usedErrors.insert(&dynamic_cast<ErrorDefinition const&>(functionType->declaration()));
129
130 return true;
131}
132
133bool FunctionCallGraphBuilder::visit(EmitStatement const& _emitStatement)
134{

Callers

nothing calls this directly

Calls 14

insertMethod · 0.80
declarationMethod · 0.80
isFileLevelVariableMethod · 0.80
typeArgumentMethod · 0.80
actualTypeMethod · 0.80
isSuperMethod · 0.80
superContractMethod · 0.80
expressionMethod · 0.45
kindMethod · 0.45
isConstantMethod · 0.45
isStateVariableMethod · 0.45
acceptMethod · 0.45

Tested by

no test coverage detected