We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ef62d8 commit 3779e52Copy full SHA for 3779e52
src/solvers/flattening/boolbv_if.cpp
@@ -21,8 +21,11 @@ bvt boolbvt::convert_if(const if_exprt &expr)
21
const bvt &true_case_bv = convert_bv(expr.true_case());
22
const bvt &false_case_bv = convert_bv(expr.false_case());
23
24
- if(true_case_bv.size() != width || false_case_bv.size() != width)
25
- throw "operand size mismatch for if "+expr.pretty();
+ DATA_INVARIANT_WITH_DIAGNOSTICS(
+ true_case_bv.size() == width && false_case_bv.size() == width,
26
+ "both branches of an if statement have to return bit vectors of the same "
27
+ "width",
28
+ irep_pretty_diagnosticst{expr});
29
30
return bv_utils.select(cond, true_case_bv, false_case_bv);
31
}
0 commit comments