3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-19 10:52:02 +00:00

Use nullptr consistently instead of 0 or NULL.

This commit is contained in:
Bruce Mitchener 2022-08-01 16:36:05 +07:00 committed by Nikolaj Bjorner
parent bf282b05c8
commit 77e5d6ab19
8 changed files with 25 additions and 25 deletions

View file

@ -111,7 +111,7 @@ void test_add(unsigned bvsize, bool is_signed) {
t1 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"x"), bv);
t2 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"y"), bv);
test_ovfl = Z3_mk_bvadd_no_overflow(ctx, t1, t2, is_signed);
test_udfl = is_signed ? Z3_mk_bvadd_no_underflow(ctx, t1, t2) : NULL;
test_udfl = is_signed ? Z3_mk_bvadd_no_underflow(ctx, t1, t2) : nullptr;
Z3_solver_push(ctx, s);
Z3_solver_assert(ctx, s, Z3_mk_eq(ctx, t1, Z3_mk_numeral(ctx, "0", bv)));
@ -196,7 +196,7 @@ void test_sub(unsigned bvsize, bool is_signed) {
t1 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"x"), bv);
t2 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"y"), bv);
test_ovfl = is_signed ? Z3_mk_bvsub_no_overflow(ctx, t1, t2) : NULL;
test_ovfl = is_signed ? Z3_mk_bvsub_no_overflow(ctx, t1, t2) : nullptr;
test_udfl = Z3_mk_bvsub_no_underflow(ctx, t1, t2, is_signed);
Z3_solver_push(ctx, s);
@ -358,7 +358,7 @@ void test_mul(unsigned bvsize, bool is_signed) {
t1 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"x"), bv);
t2 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"y"), bv);
test_ovfl = Z3_mk_bvmul_no_overflow(ctx, t1, t2, is_signed);
test_udfl = is_signed ? Z3_mk_bvmul_no_underflow(ctx, t1, t2) : NULL;
test_udfl = is_signed ? Z3_mk_bvmul_no_underflow(ctx, t1, t2) : nullptr;
Z3_solver_push(ctx, s);
Z3_solver_assert(ctx, s, Z3_mk_eq(ctx, t1, Z3_mk_numeral(ctx, "1", bv)));
@ -585,7 +585,7 @@ void test_equiv(Equivalence_params params, unsigned bvsize, bool is_signed) {
Z3_ast t2 = Z3_mk_const(ctx, Z3_mk_string_symbol(ctx,"y"), bv);
Z3_ast real_test = (*params.no_overflow_func)(ctx, t1, t2, is_signed);
Z3_ast cond = NULL;
Z3_ast cond = nullptr;
if (params.non_zero)
{
cond = Z3_mk_not(ctx, Z3_mk_eq(ctx, t2, Z3_mk_int(ctx, 0, bv)));
@ -624,7 +624,7 @@ void test_equiv(Equivalence_params params, unsigned bvsize, bool is_signed) {
Z3_solver_push(ctx, s);
Z3_ast equiv = Z3_mk_iff(ctx, real_test, check);
if (cond != NULL)
if (cond != nullptr)
{
equiv = Z3_mk_implies(ctx, cond, equiv);
}