File tree Expand file tree Collapse file tree 3 files changed +30
-30
lines changed Expand file tree Collapse file tree 3 files changed +30
-30
lines changed Original file line number Diff line number Diff line change @@ -1065,11 +1065,11 @@ void goto_checkt::nan_check(
1065
1065
1066
1066
isnan = or_exprt (
1067
1067
and_exprt (
1068
- equal_exprt (minus_expr.op0 (), plus_inf),
1069
- equal_exprt (minus_expr.op1 (), plus_inf)),
1068
+ equal_exprt (minus_expr.lhs (), plus_inf),
1069
+ equal_exprt (minus_expr.rhs (), plus_inf)),
1070
1070
and_exprt (
1071
- equal_exprt (minus_expr.op0 (), minus_inf),
1072
- equal_exprt (minus_expr.op1 (), minus_inf)));
1071
+ equal_exprt (minus_expr.lhs (), minus_inf),
1072
+ equal_exprt (minus_expr.rhs (), minus_inf)));
1073
1073
}
1074
1074
else
1075
1075
UNREACHABLE;
Original file line number Diff line number Diff line change @@ -393,23 +393,23 @@ bvt bv_pointerst::convert_pointer_type(const exprt &expr)
393
393
const minus_exprt &minus_expr = to_minus_expr (expr);
394
394
395
395
INVARIANT (
396
- minus_expr.op0 ().type ().id () == ID_pointer,
396
+ minus_expr.lhs ().type ().id () == ID_pointer,
397
397
" first operand should be of pointer type" );
398
398
399
399
if (
400
- minus_expr.op1 ().type ().id () != ID_unsignedbv &&
401
- minus_expr.op1 ().type ().id () != ID_signedbv)
400
+ minus_expr.rhs ().type ().id () != ID_unsignedbv &&
401
+ minus_expr.rhs ().type ().id () != ID_signedbv)
402
402
{
403
403
bvt bv;
404
404
conversion_failed (minus_expr, bv);
405
405
return bv;
406
406
}
407
407
408
- const unary_minus_exprt neg_op1 (minus_expr.op1 ());
408
+ const unary_minus_exprt neg_op1 (minus_expr.rhs ());
409
409
410
- bvt bv = convert_bv (minus_expr.op0 ());
410
+ bvt bv = convert_bv (minus_expr.lhs ());
411
411
412
- typet pointer_sub_type = minus_expr.op0 ().type ().subtype ();
412
+ typet pointer_sub_type = minus_expr.rhs ().type ().subtype ();
413
413
mp_integer element_size;
414
414
415
415
if (pointer_sub_type.id ()==ID_empty)
Original file line number Diff line number Diff line change @@ -691,6 +691,26 @@ class binary_exprt : public expr_protectedt
691
691
check (expr, vm);
692
692
}
693
693
694
+ exprt &lhs ()
695
+ {
696
+ return exprt::op0 ();
697
+ }
698
+
699
+ const exprt &lhs () const
700
+ {
701
+ return exprt::op0 ();
702
+ }
703
+
704
+ exprt &rhs ()
705
+ {
706
+ return exprt::op1 ();
707
+ }
708
+
709
+ const exprt &rhs () const
710
+ {
711
+ return exprt::op1 ();
712
+ }
713
+
694
714
// make op0 and op1 public
695
715
using exprt::op0;
696
716
using exprt::op1;
@@ -821,26 +841,6 @@ class binary_relation_exprt:public binary_predicate_exprt
821
841
expr_binary.op0 ().type () == expr_binary.op1 ().type (),
822
842
" lhs and rhs of binary relation expression should have same type" );
823
843
}
824
-
825
- exprt &lhs ()
826
- {
827
- return op0 ();
828
- }
829
-
830
- const exprt &lhs () const
831
- {
832
- return op0 ();
833
- }
834
-
835
- exprt &rhs ()
836
- {
837
- return op1 ();
838
- }
839
-
840
- const exprt &rhs () const
841
- {
842
- return op1 ();
843
- }
844
844
};
845
845
846
846
template <>
You can’t perform that action at this time.
0 commit comments