Skip to content

Commit f2e65c5

Browse files
Petr BauchPetr Bauch
Petr Bauch
authored and
Petr Bauch
committed
Fix other tests
1 parent 3091abd commit f2e65c5

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

regression/goto-instrument/fp-reachability-slice3/test.desc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ main.c
66
--
77
^warning: ignoring
88
dead d;
9-
dead e;
109
dead f;

src/goto-instrument/goto_instrument_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ void goto_instrument_parse_optionst::instrument_goto_program()
14361436

14371437
status() << "Performing a function pointer reachability slice" << eom;
14381438
function_path_reachability_slicer(
1439-
goto_model, cmdline.get_values("fp-reachability-slice"));
1439+
goto_model, cmdline.get_value("fp-reachability-slice"));
14401440
}
14411441

14421442
// full slice?

src/goto-instrument/reachability_slicer.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,15 @@ void reachability_slicer(
250250
/// starting from these functions will be kept.
251251
void function_path_reachability_slicer(
252252
goto_modelt &goto_model,
253-
const std::list<std::string> &functions)
253+
const std::string &functions_list)
254254
{
255255
reachability_slicert s;
256-
for(const auto &function : functions)
256+
257+
std::istringstream multiple_functions(functions_list);
258+
std::string single_function;
259+
while(std::getline(multiple_functions, single_function, ','))
257260
{
258-
in_function_criteriont p(function);
261+
in_function_criteriont p(single_function);
259262
s(goto_model.goto_functions, p, true);
260263
}
261264

src/goto-instrument/reachability_slicer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void reachability_slicer(
2525

2626
void function_path_reachability_slicer(
2727
goto_modelt &goto_model,
28-
const std::list<std::string> &function);
28+
const std::string &functions_list);
2929

3030
void reachability_slicer(
3131
goto_modelt &,

src/util/cmdline.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,6 @@ bool cmdlinet::parse(int argc, const char **argv, const char *optstring)
224224
}
225225
else
226226
options[*optnr].values.push_back(argv[i]+2);
227-
228-
auto &my_values = options[*optnr].values;
229-
if(my_values.back().find(',') != std::string::npos)
230-
{
231-
std::istringstream multiple_values(my_values.back());
232-
my_values.pop_back();
233-
std::string single_value;
234-
while(std::getline(multiple_values, single_value, ','))
235-
{
236-
my_values.push_back(single_value);
237-
}
238-
}
239227
}
240228
}
241229
}

0 commit comments

Comments
 (0)