* find the functions from a list of function calls. If this is a new function, find the invocations * inside it recursively */
| 124 | * inside it recursively |
| 125 | */ |
| 126 | void |
| 127 | calls_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 |
nothing calls this directly
no test coverage detected