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

Method find_missing_labels

src/Reducer.cpp:292–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292int
293Reducer::find_missing_labels(const Statement* stm, const Statement* alt_stm, vector<string>& labels)
294{
295 labels.clear();
296 vector<string> labels1, labels2;
297 stm->find_contained_labels(labels1);
298 if (alt_stm) {
299 alt_stm->find_contained_labels(labels2);
300 }
301 size_t i;
302 for (i=0; i<labels1.size(); i++) {
303 string l = labels1[i];
304 if (is_label_used(l)) {
305 if (std::find(labels2.begin(), labels2.end(), l) == labels2.end()) {
306 labels.push_back(l);
307 }
308 }
309 }
310 return labels.size();
311}
312
313void
314Reducer::output_block_skeleton(const Block* blk, vector<const Block*>& work_blks, vector<const Function*>& work_funcs, std::ostream& out)

Callers 1

output_stmMethod · 0.80

Calls 5

find_contained_labelsMethod · 0.80
sizeMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected