Skip to content

Commit

Permalink
Comment on types for which expr_dynamic_cast is not implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanJPhillips authored and smowton committed Sep 19, 2017
1 parent d35710f commit 95f6505
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/util/std_expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2638,10 +2638,9 @@ inline shift_exprt &to_shift_expr(exprt &expr)
return static_cast<shift_exprt &>(expr);
}

// template<> inline bool check_expr_type<shift_exprt>(const exprt &base)
// {
// return true;
// }
// The to_*_expr function for this type doesn't do any checks before casting,
// therefore the implementation is essentially a static_cast.
// Enabling expr_dynamic_cast would hide this; instead use static_cast directly.
// inline void validate_expr(const shift_exprt &value)
// {
// validate_operands(value, 2, "Shifts must have two operands");
Expand Down Expand Up @@ -4223,11 +4222,9 @@ inline ieee_float_op_exprt &to_ieee_float_op_expr(exprt &expr)
return static_cast<ieee_float_op_exprt &>(expr);
}

// template<>
// inline bool check_expr_type<ieee_float_op_exprt>(const exprt &base)
// {
// return true;
// }
// The to_*_expr function for this type doesn't do any checks before casting,
// therefore the implementation is essentially a static_cast.
// Enabling expr_dynamic_cast would hide this; instead use static_cast directly.
// template<>
// inline void validate_expr<ieee_float_op_exprt>(
// const ieee_float_op_exprt &value)
Expand Down

0 comments on commit 95f6505

Please sign in to comment.