Skip to content

Commit a166cc2

Browse files
committed
remove base_type_eq in does_expr_lose_const
1 parent edd216f commit a166cc2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/analyses/does_remove_const.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ Author: Diffblue Ltd.
1313

1414
#include <goto-programs/goto_program.h>
1515

16-
#include <util/base_type.h>
1716
#include <util/pointer_expr.h>
1817
#include <util/std_code.h>
1918

@@ -69,11 +68,11 @@ bool does_remove_constt::does_expr_lose_const(const exprt &expr) const
6968
{
7069
const typet &root_type=expr.type();
7170

72-
// Look in each child that has the same base type as the root
71+
// Look in each child that has the same type as the root
7372
for(const exprt &op : expr.operands())
7473
{
7574
const typet &op_type=op.type();
76-
if(base_type_eq(op_type, root_type, ns))
75+
if(op_type == root_type)
7776
{
7877
// Is this child more const-qualified than the root
7978
if(!does_type_preserve_const_correctness(&root_type, &op_type))

0 commit comments

Comments
 (0)