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

Function recursiveFunctionExists

test/tools/ossfuzz/StackReuseCodegenFuzzer.cpp:55–66  ·  view source on GitHub ↗

@returns true if there are recursive functions, false otherwise.

Source from the content-addressed store, hash-verified

53{
54/// @returns true if there are recursive functions, false otherwise.
55bool recursiveFunctionExists(Dialect const& /*_dialect*/, yul::Object& _object)
56{
57 auto recursiveFunctions = CallGraphGenerator::callGraph(_object.code()->root()).recursiveFunctions();
58 for(auto&& [function, variables]: CompilabilityChecker{
59 _object,
60 true
61 }.unreachableVariables
62 )
63 if(recursiveFunctions.count(function))
64 return true;
65 return false;
66}
67}
68
69DEFINE_PROTO_FUZZER(Program const& _input)

Callers 1

DEFINE_PROTO_FUZZERFunction · 0.85

Calls 3

recursiveFunctionsMethod · 0.80
codeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected