Skip to content

Commit a5a29ad

Browse files
thomasspriggsNlightNFotis
authored andcommitted
Use get_bool_option to get unwinding-assertions option
The `optionst` class essentially uses tri-state logic for booleans, where an option may be true, false or unset. `is_set` will return `true` for both the true and false options. Therefore we need `get_bool_option` to get the state of whether the option is set to true or false.
1 parent 1575958 commit a5a29ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cbmc/cbmc_parse_options.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
146146
if(
147147
cmdline.isset("cover") &&
148148
// The option is set by default, or passed in the by the user.
149-
(options.is_set("unwinding-assertions") ||
149+
(options.get_bool_option("unwinding-assertions") ||
150150
cmdline.isset("unwinding-assertions")))
151151
{
152152
log.error()
@@ -289,7 +289,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
289289
{
290290
options.set_option("unwind", cmdline.get_value("unwind"));
291291
if(
292-
!options.is_set("unwinding-assertions") &&
292+
!options.get_bool_option("unwinding-assertions") &&
293293
!cmdline.isset("unwinding-assertions"))
294294
{
295295
log.warning() << "**** WARNING: Use --unwinding-assertions to obtain "
@@ -318,7 +318,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
318318
options.set_option(
319319
"unwindset", cmdline.get_comma_separated_values("unwindset"));
320320
if(
321-
!options.is_set("unwinding-assertions") &&
321+
!options.get_bool_option("unwinding-assertions") &&
322322
!cmdline.isset("unwinding-assertions"))
323323
{
324324
log.warning() << "**** WARNING: Use --unwinding-assertions to obtain "
@@ -360,7 +360,7 @@ void cbmc_parse_optionst::get_command_line_options(optionst &options)
360360

361361
// generate unwinding assertions
362362
if(
363-
options.is_set("unwinding-assertions") ||
363+
options.get_bool_option("unwinding-assertions") ||
364364
cmdline.isset("unwinding-assertions"))
365365
{
366366
options.set_option("unwinding-assertions", true);

0 commit comments

Comments
 (0)