3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-29 13:28:44 +00:00

Modernize more files to use std::format: bv_decl_plugin, dl_decl_plugin, datatype_decl_plugin, seq_decl_plugin

Co-authored-by: levnach <5377127+levnach@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-13 21:34:47 +00:00
parent 99a40e79d4
commit 64957e2b0e
4 changed files with 34 additions and 37 deletions

View file

@ -17,6 +17,7 @@ Revision History:
--*/
#include<sstream>
#include<format>
#include "ast/bv_decl_plugin.h"
#include "ast/arith_decl_plugin.h"
#include "util/warning.h"
@ -672,9 +673,11 @@ func_decl * bv_decl_plugin::mk_func_decl(decl_kind k, unsigned num_parameters, p
}
for (unsigned i = 0; i < num_args; ++i) {
if (args[i]->get_sort() != r->get_domain(i)) {
std::ostringstream buffer;
buffer << "Argument " << mk_pp(args[i], m) << " at position " << i << " has sort " << mk_pp(args[i]->get_sort(), m) << " it does not match declaration " << mk_pp(r, m);
m.raise_exception(buffer.str());
m.raise_exception(std::format("Argument {} at position {} has sort {} it does not match declaration {}",
to_string(mk_pp(args[i], m)),
i,
to_string(mk_pp(args[i]->get_sort(), m)),
to_string(mk_pp(r, m))));
return nullptr;
}
}