File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1917,13 +1917,13 @@ void goto_checkt::goto_check(
1917
1917
{
1918
1918
const code_assignt &code_assign=to_code_assign (i.code );
1919
1919
1920
- // Question: I am not sure whether adding it as a class field is
1921
- // better than adding it as a function argument. Adding it as an
1922
- // argument means that it needs to be passed as a third argument
1923
- // to many check_rec functions that don't really need it.
1924
- no_enum_check = true ;
1925
- check (code_assign.lhs ());
1926
- no_enum_check = false ;
1920
+ // Reset the no_enum_check with the flag reset for exception
1921
+ // safety
1922
+ {
1923
+ flag_resett no_enum_check_flag_resetter;
1924
+ no_enum_check_flag_resetter. set_flag (no_enum_check, true ) ;
1925
+ check (code_assign.lhs ());
1926
+ }
1927
1927
check (code_assign.rhs ());
1928
1928
1929
1929
// the LHS might invalidate any assertion
You can’t perform that action at this time.
0 commit comments