File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
regression/goto-instrument/fp-reachability-slice3 Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 11CORE
22main.c
3- --fp-reachability-slice b, c
3+ --fp-reachability-slice b --fp-reachability-slice c
44^EXIT=0$
55^SIGNAL=0$
661 file main.c line 34
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Author: Daniel Kroening, kroening@kroening.com
1111#include < util/edit_distance.h>
1212#include < util/exception_utils.h>
1313#include < util/invariant.h>
14+ #include < util/string_utils.h>
1415
1516cmdlinet::cmdlinet ()
1617{
@@ -120,16 +121,14 @@ std::list<std::string>
120121cmdlinet::get_comma_separated_values (const char *option) const
121122{
122123 std::list<std::string> separated_values;
123- auto i = getoptnr (option);
124- if (i. has_value () && !options[*i]. values . empty ( ))
124+
125+ for ( const auto &csv : get_values (option ))
125126 {
126- std::istringstream values_stream (options[*i].values .front ());
127- std::string single_value;
128- while (std::getline (values_stream, single_value, ' ,' ))
129- {
130- separated_values.push_back (single_value);
131- }
127+ const auto values = split_string (csv, ' ,' );
128+ separated_values.insert (
129+ separated_values.end (), values.begin (), values.end ());
132130 }
131+
133132 return separated_values;
134133}
135134
Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ class cmdlinet
8080 const std::list<std::string> &get_values (const std::string &option) const ;
8181 const std::list<std::string> &get_values (char option) const ;
8282
83+ // / Collect all occurrences of option \p option and split their values on each
84+ // / comma, merging them into a single list of values.
8385 std::list<std::string> get_comma_separated_values (const char *option) const ;
8486
8587 virtual bool isset (char option) const ;
You can’t perform that action at this time.
0 commit comments