3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-14 21:01:49 +00:00

Revert incorrect std::move around std::make_pair - make_pair already returns rvalue

Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-11 21:56:23 +00:00
parent 2d9d91c5cc
commit a2f3d647e1
46 changed files with 105 additions and 105 deletions

View file

@ -107,7 +107,7 @@ namespace datalog {
for (unsigned k = 1; k < premises1.size(); ++k) {
if (m.get_fact(premises1[k].get()) == lit) {
premises2.push_back(premises1[k].get());
positions2.push_back(std::move(std::make_pair(j+1,0)));
positions2.push_back(std::make_pair(j+1,0));
substs2.push_back(expr_ref_vector(m));
break;
}
@ -220,7 +220,7 @@ namespace datalog {
unsigned sz = sub.size();
SASSERT(sz == q->get_num_decls());
for (unsigned i = 0; i < sz; ++i) {
s.push_back(std::move(std::make_pair(q->get_decl_name(sz-1-i), sub[i])));
s.push_back(std::make_pair(q->get_decl_name(sz-1-i), sub[i]));
}
return;
}

View file

@ -334,7 +334,7 @@ namespace datalog {
proof_ref_vector premises(m);
premises.push_back(m.mk_asserted(fml1));
premises.push_back(m.mk_asserted(fml2));
positions.push_back(std::move(std::make_pair(idx+1, 0)));
positions.push_back(std::make_pair(idx+1, 0));
TRACE(dl,
tout << premises[0]->get_id() << " " << mk_pp(premises[0].get(), m) << "\n";
@ -372,7 +372,7 @@ namespace datalog {
proof_ref_vector premises(m);
premises.push_back(r1.get_proof());
premises.push_back(r2.get_proof());
positions.push_back(std::move(std::make_pair(idx+1, 0)));
positions.push_back(std::make_pair(idx+1, 0));
TRACE(dl,
tout << premises[0]->get_id() << " " << mk_pp(premises[0].get(), m) << "\n";

View file

@ -319,7 +319,7 @@ namespace datalog {
}
proof* premises[2] = { pr, p };
positions.push_back(std::move(std::make_pair(0, 1)));
positions.push_back(std::make_pair(0, 1));
substs.push_back(sub1);
substs.push_back(sub);
@ -547,7 +547,7 @@ namespace datalog {
app* body_j = r->get_tail(j);
prop_body = vs(body_j, sub.size(), sub.data());
prs.push_back(get_proof(md, head_j, to_app(prop_body), level-1));
positions.push_back(std::move(std::make_pair(j+1,0)));
positions.push_back(std::make_pair(j+1,0));
substs.push_back(expr_ref_vector(m));
}
pr = m.mk_hyper_resolve(sz+1, prs.data(), prop, positions, substs);
@ -1082,7 +1082,7 @@ namespace datalog {
}
prs.push_back(get_proof(md, to_app(trace->get_arg(j)), path1));
positions.push_back(std::move(std::make_pair(j+1,0)));
positions.push_back(std::make_pair(j+1,0));
substs.push_back(expr_ref_vector(m));
}
head = rl->get_head();
@ -1256,7 +1256,7 @@ namespace datalog {
scoped_proof _sp(m);
proof* premises[2] = { pr, p };
positions.push_back(std::move(std::make_pair(0, 1)));
positions.push_back(std::make_pair(0, 1));
substs.push_back(sub1);
substs.push_back(sub);

View file

@ -534,10 +534,10 @@ namespace datalog {
}
uint_set2& src = (*m_elems)[j];
for (unsigned idx : src.lt) {
m_todo.push_back(std::move(std::make_pair(idx, true)));
m_todo.push_back(std::make_pair(idx, true));
}
for (unsigned idx : src.le) {
m_todo.push_back(std::move(std::make_pair(idx, strict)));
m_todo.push_back(std::make_pair(idx, strict));
}
if (strict) {
dst.lt.insert(j);
@ -551,14 +551,14 @@ namespace datalog {
void bound_relation::mk_lt(unsigned i, unsigned j) {
m_todo.reset();
i = find(i);
m_todo.push_back(std::move(std::make_pair(find(j), true)));
m_todo.push_back(std::make_pair(find(j), true));
mk_lt(i);
}
void bound_relation::mk_le(unsigned i, unsigned j) {
m_todo.reset();
i = find(i);
m_todo.push_back(std::move(std::make_pair(find(j), false)));
m_todo.push_back(std::make_pair(find(j), false));
mk_lt(i);
}

View file

@ -76,7 +76,7 @@ namespace datalog {
for(unsigned i = 0; i < n; ++i) {
unsigned sz = reg(i) ? reg(i)->get_size_estimate_bytes() : 0;
total_bytes += sz;
sizes.push_back(std::move(std::make_pair(i, sz)));
sizes.push_back(std::make_pair(i, sz));
}
std::sort(sizes.begin(), sizes.end(), compare_size_proc());

View file

@ -896,10 +896,10 @@ namespace datalog {
for (unsigned j = i + 1; j < r.size(); ++j) {
relation_mutator_fn& m2 = *(m_mutators[j]);
if (m1.supports_attachment(r[j])) {
m_attach.push_back(std::move(std::make_pair(i,j)));
m_attach.push_back(std::make_pair(i,j));
}
if (m2.supports_attachment(r[i])) {
m_attach.push_back(std::move(std::make_pair(j,i)));
m_attach.push_back(std::make_pair(j,i));
}
}
}

View file

@ -547,7 +547,7 @@ namespace datalog {
get_rmanager().reset_saturated_marks();
get_relation(pred).add_fact(fact);
if (!m_context.print_aig().is_null()) {
m_table_facts.push_back(std::move(std::make_pair(pred, fact)));
m_table_facts.push_back(std::make_pair(pred, fact));
}
}

View file

@ -187,7 +187,7 @@ proof *ground_sat_answer_op::mk_proof_step(frame &fr) {
for (auto &k : fr.m_kids) {premises.push_back(m_cache.find(k));}
for (unsigned i = 0; i < premises.size(); ++i) {
positions.push_back(std::move(std::make_pair(0,i)));
positions.push_back(std::make_pair(0,i));
}
for (unsigned i = 0; i <= premises.size(); ++i) {
substs.push_back(expr_ref_vector(m));

View file

@ -54,14 +54,14 @@ void sym_mux::register_decl(func_decl *fdecl) {
entry->m_variants.push_back(mk_variant(fdecl, 1));
m_entries.insert(fdecl, entry);
m_muxes.insert(entry->m_variants.get(0), std::move(std::make_pair(entry, 0)));
m_muxes.insert(entry->m_variants.get(1), std::move(std::make_pair(entry, 1)));
m_muxes.insert(entry->m_variants.get(0), std::make_pair(entry, 0));
m_muxes.insert(entry->m_variants.get(1), std::make_pair(entry, 1));
}
void sym_mux::ensure_capacity(sym_mux_entry &entry, unsigned sz) const {
while (entry.m_variants.size() < sz) {
unsigned idx = entry.m_variants.size();
entry.m_variants.push_back (mk_variant(entry.m_main, idx));
m_muxes.insert(entry.m_variants.back(), std::move(std::make_pair(&entry, idx)));
m_muxes.insert(entry.m_variants.back(), std::make_pair(&entry, idx));
}
}

View file

@ -154,7 +154,7 @@ namespace spacer {
if (m_ctx.is_b_pure (premise)) {
if (!m_use_constant_from_a) {
rational coefficient = params[i].get_rational();
coeff_lits.push_back(std::move(std::make_pair(abs(coefficient), (app*)m.get_fact(premise))));
coeff_lits.push_back(std::make_pair(abs(coefficient), (app*)m.get_fact(premise)));
}
}
else {
@ -163,14 +163,14 @@ namespace spacer {
if (m_use_constant_from_a) {
rational coefficient = params[i].get_rational();
coeff_lits.push_back(std::move(std::make_pair(abs(coefficient), (app*)m.get_fact(premise))));
coeff_lits.push_back(std::make_pair(abs(coefficient), (app*)m.get_fact(premise)));
}
}
}
else {
if (m_use_constant_from_a) {
rational coefficient = params[i].get_rational();
coeff_lits.push_back(std::move(std::make_pair(abs(coefficient), (app*)m.get_fact(premise))));
coeff_lits.push_back(std::make_pair(abs(coefficient), (app*)m.get_fact(premise)));
}
}
}
@ -199,7 +199,7 @@ namespace spacer {
brw.mk_not(premise, negatedPremise);
pinned.push_back(negatedPremise);
rational coefficient = params[i].get_rational();
coeff_lits.push_back(std::move(std::make_pair(abs(coefficient), to_app(negatedPremise))));
coeff_lits.push_back(std::make_pair(abs(coefficient), to_app(negatedPremise)));
}
}
}
@ -341,7 +341,7 @@ namespace spacer {
coeff_lits_t coeff_lits;
for (unsigned l = 0; l < matrix.num_cols(); ++l) {
if (!matrix.get(k,l).is_zero()) {
coeff_lits.push_back(std::move(std::make_pair(matrix.get(k, l), ordered_basis[l])));
coeff_lits.push_back(std::make_pair(matrix.get(k, l), ordered_basis[l]));
}
}
SASSERT(!coeff_lits.empty());
@ -472,7 +472,7 @@ namespace spacer {
evaluation = (*model)(bounded_vectors[j][k].get());
if (!util.is_zero(evaluation)) {
coeff_lits.push_back(std::move(std::make_pair(rational(1), ordered_basis[j])));
coeff_lits.push_back(std::make_pair(rational(1), ordered_basis[j]));
}
}
SASSERT(!coeff_lits.empty()); // since then previous outer loop would have found solution already

View file

@ -1623,7 +1623,7 @@ namespace datalog {
proof_ref_vector premises(m);
premises.push_back(m.mk_asserted(r1.to_formula()));
premises.push_back(m.mk_asserted(r2.to_formula()));
positions.push_back(std::move(std::make_pair(idx+1, 0)));
positions.push_back(std::make_pair(idx+1, 0));
pr = m.mk_hyper_resolve(2, premises.data(), fml, positions, substs);
pc.insert(pr);
}

View file

@ -119,7 +119,7 @@ namespace datalog {
if (a1->get_decl() == a2->get_decl() &&
a1->get_num_args() == a2->get_num_args()) {
for (unsigned k = 0; k < a1->get_num_args(); ++k) {
todo.push_back(std::move(std::make_pair(a1->get_arg(k), a2->get_arg(k))));
todo.push_back(std::make_pair(a1->get_arg(k), a2->get_arg(k)));
}
match(i, pat, j + 1, todo, q, conjs);
todo.resize(sz);
@ -140,7 +140,7 @@ namespace datalog {
if (m_funs.find(to_app(arg)->get_decl(), terms)) {
for (unsigned k = 0; k < terms->size(); ++k) {
todo.push_back(std::move(std::make_pair(arg, (*terms)[k])));
todo.push_back(std::make_pair(arg, (*terms)[k]));
match(i + 1, pat, j, todo, q, conjs);
todo.pop_back();
}