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

Method find_pointer_fields

src/Variable.cpp:1312–1323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1310}
1311
1312void
1313Variable::find_pointer_fields(vector<const Variable*>& ptr_fields) const
1314{
1315 for (size_t i=0; i<field_vars.size(); i++) {
1316 if (field_vars[i]->is_pointer()) {
1317 ptr_fields.push_back(field_vars[i]);
1318 }
1319 else if (field_vars[i]->is_aggregate()) {
1320 field_vars[i]->find_pointer_fields(ptr_fields);
1321 }
1322 }
1323}
1324
1325/* a struct field packed after a bit-field could has nondeterministic offset due to incompatible packings between compilers */
1326bool

Callers 2

rhs_to_lhs_transferMethod · 0.80

Calls 3

sizeMethod · 0.80
is_pointerMethod · 0.80
is_aggregateMethod · 0.45

Tested by

no test coverage detected