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

Function remove_field_vars

src/Variable.cpp:196–212  ·  view source on GitHub ↗

replace all the field vars with their parent vars */

Source from the content-addressed store, hash-verified

194
195/* replace all the field vars with their parent vars */
196void remove_field_vars(vector<const Variable*>& set)
197{
198 size_t i;
199 size_t len = set.size();
200 for (i=0; i<len; i++) {
201 const Variable* v = set[i];
202 if (v->is_field_var()) {
203 while (v->field_var_of) {
204 v = v->field_var_of;
205 }
206 set.erase(set.begin() + i);
207 add_variable_to_set(set, v);
208 i--;
209 len = set.size();
210 }
211 }
212}
213
214const Variable*
215Variable::get_container_union(void) const

Callers

nothing calls this directly

Calls 4

add_variable_to_setFunction · 0.85
sizeMethod · 0.80
is_field_varMethod · 0.80
beginMethod · 0.80

Tested by

no test coverage detected