MCPcopy Create free account
hub / github.com/csmith-project/csmith / calls_to_funcs_recursive

Function calls_to_funcs_recursive

src/FunctionInvocationUser.cpp:126–140  ·  view source on GitHub ↗

* find the functions from a list of function calls. If this is a new function, find the invocations * inside it recursively */

Source from the content-addressed store, hash-verified

124 * inside it recursively
125 */
126void
127calls_to_funcs_recursive(const vector<const FunctionInvocationUser*>& calls, vector<const Function*>& funcs)
128{
129 size_t i;
130 for (i=0; i<calls.size(); i++) {
131 const Function* func = calls[i]->get_func();
132 if (find_function_in_set(funcs, func) == -1) {
133 funcs.push_back(func);
134 // find the calls made this function and add callees recursively
135 vector<const FunctionInvocationUser*> calls;
136 func->body->get_called_funcs(calls);
137 calls_to_funcs_recursive(calls, funcs);
138 }
139 }
140}
141
142///////////////////////////////////////////////////////////////////////////////
143

Callers

nothing calls this directly

Calls 4

find_function_in_setFunction · 0.85
sizeMethod · 0.80
get_funcMethod · 0.80
get_called_funcsMethod · 0.45

Tested by

no test coverage detected