Skip to content

Commit 9719755

Browse files
Rename flag_resett to flag_overridet to be match its behaviour
This class no longer is confined to resetting flags, but now has additional override capabilities. Co-authored-by: Chris Ryder <[email protected]>
1 parent d5e2a49 commit 9719755

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/analyses/goto_check_c.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,10 @@ class goto_check_ct
344344
///
345345
/// A flag's initial value (before any `set_flag` or `disable_flag`) is restored
346346
/// when the entire object goes out of scope.
347-
class flag_resett
347+
class flag_overridet
348348
{
349349
public:
350-
explicit flag_resett(const source_locationt &source_location)
350+
explicit flag_overridet(const source_locationt &source_location)
351351
: source_location(source_location)
352352
{
353353
}
@@ -401,7 +401,7 @@ class flag_resett
401401

402402
/// \brief Restore the values of all flags that have been
403403
/// modified via `set_flag`.
404-
~flag_resett()
404+
~flag_overridet()
405405
{
406406
for(const auto &flag_pair : flags_to_reset)
407407
*flag_pair.first = flag_pair.second;
@@ -2027,7 +2027,7 @@ void goto_check_ct::goto_check(
20272027
current_target = it;
20282028
goto_programt::instructiont &i = *it;
20292029

2030-
flag_resett resetter(i.source_location());
2030+
flag_overridet resetter(i.source_location());
20312031
const auto &pragmas = i.source_location().get_pragmas();
20322032
for(const auto &d : pragmas)
20332033
{
@@ -2110,7 +2110,7 @@ void goto_check_ct::goto_check(
21102110
// Disable enum range checks for left-hand sides as their values are yet
21112111
// to be set (by this assignment).
21122112
{
2113-
flag_resett resetter(i.source_location());
2113+
flag_overridet resetter(i.source_location());
21142114
resetter.disable_flag(enable_enum_range_check, "enum_range_check");
21152115
check(assign_lhs);
21162116
}

0 commit comments

Comments
 (0)