Skip to content

Commit b13bf9f

Browse files
committed
use zero_extend_exprt in SMT2 front-end
This replaces the use of a typecast expression by zero_extend_exprt when parsing an SMT-LIB2 zero_extend expression.
1 parent 8fcd9b1 commit b13bf9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solvers/smt2/smt2_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ exprt smt2_parsert::function_application()
693693
else if(id=="zero_extend")
694694
{
695695
auto width=to_unsignedbv_type(op[0].type()).get_width();
696-
unsignedbv_typet unsigned_type(width+index);
696+
unsignedbv_typet unsigned_type{width + index};
697697

698-
return typecast_exprt(op[0], unsigned_type);
698+
return zero_extend_exprt{op[0], unsigned_type};
699699
}
700700
else if(id == ID_repeat)
701701
{

0 commit comments

Comments
 (0)