3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-25 03:16:21 +00:00

simplify api_ast.cpp: remove dead code and empty comment

- Z3_get_index_value: remove redundant null check on 'va'; after verifying
  _a->get_kind() == AST_VAR, to_var(_a) always returns a valid pointer,
  so the 'if (va)' branch and its error-handling were unreachable dead code.
- Z3_mk_rec_func_decl: remove empty comment line ('//').

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2026-05-19 05:41:39 +00:00 committed by GitHub
parent d4babf7181
commit b6400e8e3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -129,7 +129,6 @@ extern "C" {
Z3_TRY;
LOG_Z3_mk_rec_func_decl(c, s, domain_size, domain, range);
RESET_ERROR_CODE();
//
recfun::promise_def def =
mk_c(c)->recfun().get_plugin().mk_def(
to_symbol(s), domain_size, to_sorts(domain), to_sort(range), false);
@ -1523,11 +1522,7 @@ extern "C" {
return 0;
}
var* va = to_var(_a);
if (va) {
return va->get_idx();
}
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
return 0;
return va->get_idx();
Z3_CATCH_RETURN(0);
}