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

Method is_var_on_stack

src/Function.cpp:150–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150bool
151Function::is_var_on_stack(const Variable* var, const Statement* stm) const
152{
153 size_t i;
154 for (i=0; i<param.size(); i++) {
155 if (param[i]->match(var)) {
156 return true;
157 }
158 }
159 const Block* b = stm->parent;
160 while (b) {
161 if (find_variable_in_set(b->local_vars, var) != -1) {
162 return true;
163 }
164 b = b->parent;
165 }
166 return false;
167}
168
169/* find whether a variable is visible in the given statement
170 */

Callers

nothing calls this directly

Calls 3

find_variable_in_setFunction · 0.85
sizeMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected