Skip to content

Commit f6fdf26

Browse files
committed
get_subexpression_at_offset: remove infeasible branch
The outer decision already ensures that types match, so replacing types cannot be necessary.
1 parent a098fdc commit f6fdf26

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/util/pointer_offset_size.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,7 @@ std::optional<exprt> get_subexpression_at_offset(
564564
const namespacet &ns)
565565
{
566566
if(offset_bytes == 0 && expr.type() == target_type_raw)
567-
{
568-
exprt result = expr;
569-
570-
if(expr.type() != target_type_raw)
571-
result.type() = target_type_raw;
572-
573-
return result;
574-
}
567+
return expr;
575568

576569
if(
577570
offset_bytes == 0 && expr.type().id() == ID_pointer &&

0 commit comments

Comments
 (0)