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

Function combine_variable_sets

src/Variable.cpp:183–193  ·  view source on GitHub ↗

combine two variable sets into one, note struct field "s1.f1" and "s1" is combined into "s1"

Source from the content-addressed store, hash-verified

181
182// combine two variable sets into one, note struct field "s1.f1" and "s1" is combined into "s1"
183void combine_variable_sets(const vector<const Variable*>& set1, const vector<const Variable*>& set2, vector<const Variable*>& set_all)
184{
185 size_t i;
186 set_all = set1;
187 for (i=0; i<set2.size(); i++) {
188 const Variable* v = set2[i];
189 if (find_variable_in_set(set1, v) == -1) {
190 set_all.push_back(v);
191 }
192 }
193}
194
195/* replace all the field vars with their parent vars */
196void remove_field_vars(vector<const Variable*>& set)

Callers 1

Calls 2

find_variable_in_setFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected