Skip to content

Commit 691bd50

Browse files
author
martin
committed
Replace the use of cmdline with options in goto-analyzer and goto-diff
This uncovered a bug in goto-analyzer where the options for goto-check are recognised but not actually parsed.
1 parent ba56cbf commit 691bd50

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/goto-analyzer/goto_analyzer_parse_options.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ void goto_analyzer_parse_optionst::get_command_line_options(optionst &options)
146146
options.set_option("error-label", cmdline.get_values("error-label"));
147147
#endif
148148

149+
// all checks supported by goto_check
150+
PARSE_OPTIONS_GOTO_CHECK(cmdline, options);
151+
149152
// The user should either select:
150153
// 1. a specific analysis, or
151154
// 2. a tuple of task / analyser options / outputs
@@ -893,7 +896,7 @@ bool goto_analyzer_parse_optionst::process_goto_program(
893896
log.status() << "Removing function pointers and virtual functions"
894897
<< messaget::eom;
895898
remove_function_pointers(
896-
ui_message_handler, goto_model, cmdline.isset("pointer-check"));
899+
ui_message_handler, goto_model, options.get_bool_option("pointer-check"));
897900

898901
// do partial inlining
899902
log.status() << "Partial Inlining" << messaget::eom;

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ bool goto_diff_parse_optionst::process_goto_program(
340340
log.status() << "Removal of function pointers and virtual functions"
341341
<< messaget::eom;
342342
remove_function_pointers(
343-
ui_message_handler, goto_model, cmdline.isset("pointer-check"));
343+
ui_message_handler, goto_model, options.get_bool_option("pointer-check"));
344344

345345
mm_io(goto_model);
346346

0 commit comments

Comments
 (0)