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

Method create_mutated_array_var

src/VariableSelector.cpp:1499–1512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1497}
1498
1499ArrayVariable*
1500VariableSelector::create_mutated_array_var(const ArrayVariable* av, const vector<const Expression*>& new_indices)
1501{
1502 assert(0 && "invalid call to create_mutated_array_var!");
1503 size_t i;
1504 ArrayVariable* new_av = new ArrayVariable(*av);
1505 for (i=0; i<new_indices.size(); i++) {
1506 new_av->set_index(i, new_indices[i]);
1507 }
1508 // add new variable to local list and all-variable list
1509 AllVars.push_back(new_av);
1510 av->parent->local_vars.push_back(new_av);
1511 return new_av;
1512}
1513
1514Variable *
1515VariableSelector::make_dummy_static_variable(const string &name)

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
set_indexMethod · 0.80

Tested by

no test coverage detected