Skip to content

Commit f692173

Browse files
author
Daniel Kroening
committed
remove unused member_exprt::symbol()
Reverts d47d503; the method isn't used.
1 parent 2c451e9 commit f692173

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

jbmc/unit/java-testing-utils/require_goto_statements.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ require_goto_statements::find_struct_component_assignments(
9999

100100
if(
101101
superclass_expr.get_component_name() == supercomponent_name &&
102-
superclass_expr.symbol().get_identifier() == structure_name)
102+
to_symbol_expr(superclass_expr.compound()).get_identifier() == structure_name)
103103
{
104104
if(
105105
code_assign.rhs() ==
@@ -121,8 +121,8 @@ require_goto_statements::find_struct_component_assignments(
121121
// - component name: \p component_name
122122
// - operand (component of): symbol for \p structure_name
123123
if(
124-
member_expr.op().id() == ID_symbol &&
125-
member_expr.symbol().get_identifier() == structure_name &&
124+
member_expr.compound().id() == ID_symbol &&
125+
to_symbol_expr(member_expr.compound()).get_identifier() == structure_name &&
126126
member_expr.get_component_name() == component_name)
127127
{
128128
if(

src/util/std_expr.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,18 +3529,6 @@ class member_exprt:public unary_exprt
35293529
{
35303530
return op0();
35313531
}
3532-
3533-
// Retrieves the object(symbol) this member corresponds to
3534-
inline const symbol_exprt &symbol() const
3535-
{
3536-
const exprt &op=op0();
3537-
if(op.id()==ID_member)
3538-
{
3539-
return static_cast<const member_exprt &>(op).symbol();
3540-
}
3541-
3542-
return to_symbol_expr(op);
3543-
}
35443532
};
35453533

35463534
/// \brief Cast an exprt to a \ref member_exprt

0 commit comments

Comments
 (0)