Skip to content

Commit 854a5e0

Browse files
committed
Remove symbolt::is_procedure_local
It had a single user and wasn't actually a reliable indicator of whether a symbol is procedure-local (in C/C++, a procedure-scoped variable may still have static lifetime).
1 parent 69da820 commit 854a5e0

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/analyses/constant_propagator.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,9 @@ void constant_propagator_domaint::valuest::set_dirty_to_top(
478478

479479
const symbolt &symbol=ns.lookup(id);
480480

481-
if((!symbol.is_procedure_local() || dirty(id)) &&
482-
!symbol.type.get_bool(ID_C_constant))
481+
if(
482+
(symbol.is_static_lifetime || dirty(id)) &&
483+
!symbol.type.get_bool(ID_C_constant))
483484
{
484485
it = replace_const.erase(it);
485486
}

src/util/symbol.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,6 @@ class symbolt
9797
return !is_thread_local;
9898
}
9999

100-
bool is_procedure_local() const
101-
{
102-
return !is_static_lifetime;
103-
}
104-
105100
bool is_function() const
106101
{
107102
return !is_type && !is_macro && type.id()==ID_code;

0 commit comments

Comments
 (0)