File tree 2 files changed +17
-2
lines changed 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,7 @@ void goto_convertt::do_enum_is_in_range(
624
624
const c_enum_typet &c_enum_type = ns.follow_tag (*enum_type);
625
625
const c_enum_typet::memberst enum_values = c_enum_type.members ();
626
626
627
- std::vector<exprt> disjuncts;
627
+ exprt::operandst disjuncts;
628
628
for (const auto &enum_value : enum_values)
629
629
{
630
630
constant_exprt val{enum_value.get_value (), *enum_type};
Original file line number Diff line number Diff line change @@ -588,12 +588,27 @@ class goto_convertt:public messaget
588
588
bool get_string_constant (const exprt &expr, irep_idt &);
589
589
exprt get_constant (const exprt &expr);
590
590
591
- // some built-in functions
591
+ // / \brief Converts calls to the built in `enum_is_in_range` function to a
592
+ // / test that the given enum value is in the valid range of values for that
593
+ // / enum type.
594
+ // /
595
+ // / Note that the check for the range of values is done by creating a
596
+ // / disjunction comparing the expression with each possible valid value.
597
+ // / \param lhs The destination for the generated assignment.
598
+ // / \param function The `enum_is_in_range` symbol of the source function call.
599
+ // / \param arguments A collection of arguments, which is expected to contain a
600
+ // / single argument which is an expression that resolves to a value of
601
+ // / enum type. The arguments are expected to have been prevalidated by the
602
+ // / typechecking process.
603
+ // / \param dest The goto program into which the generated assignment is
604
+ // / copied.
592
605
void do_enum_is_in_range (
593
606
const exprt &lhs,
594
607
const symbol_exprt &function,
595
608
const exprt::operandst &arguments,
596
609
goto_programt &dest);
610
+
611
+ // some built-in functions
597
612
void do_atomic_begin (
598
613
const exprt &lhs,
599
614
const symbol_exprt &function,
You can’t perform that action at this time.
0 commit comments