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

Method has_global_effect

src/Effect.cpp:612–632  ·  view source on GitHub ↗

* Return true if read_vars or write_vars has global variables. */

Source from the content-addressed store, hash-verified

610 * Return true if read_vars or write_vars has global variables.
611 */
612bool
613Effect::has_global_effect(void) const
614{
615 vector<Variable *>::size_type len;
616 vector<Variable *>::size_type i;
617
618 len = read_vars.size();
619 for (i = 0; i < len; ++i) {
620 if (read_vars[i]->is_global()) {
621 return true;
622 }
623 }
624
625 len = write_vars.size();
626 for (i = 0; i < len; ++i) {
627 if (write_vars[i]->is_global()) {
628 return true;
629 }
630 }
631 return false;
632}
633
634/*
635 * whether any field of an union is been read

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80
is_globalMethod · 0.45

Tested by

no test coverage detected