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

Method parse_options

src/PartialExpander.cpp:77–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool
78PartialExpander::parse_options(const std::string &options, char sep_char)
79{
80 size_t pos = 0;
81 size_t start_pos = 0;
82
83 while(true) {
84 // Shouldn't happen
85 assert(options[pos] != ' ');
86
87 start_pos = pos;
88 pos = options.find_first_of(sep_char, pos);
89 std::string s = options.substr(start_pos, (pos - start_pos));
90 if (!PartialExpander::set_expand(s))
91 return false;
92 if (pos == string::npos)
93 break;
94 pos++;
95 }
96 return true;
97}
98
99void
100PartialExpander::set_stmt_expand(eStatementType t, bool value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected