mirror of
https://github.com/Z3Prover/z3
synced 2026-07-05 06:46:11 +00:00
Remove unnecessary semicolons (Attempt 2) (#10020)
This is another PR towards the goal of getting Z3 to compile cleanly when included via FetchContents into clang-tidy, which uses a pretty strict set of warnings. This is a second version of https://github.com/Z3Prover/z3/pull/9957. I address @NikolajBjorner 's comments about not changing the semicolons after macro invocations, because some editors work better with them present. It now, to the best of my ability, only deletes semis: * after the closing brace of namespace decl. * after the closing brace of an extern "C" decl. * after a function definition. This PR is very large, but it consists entirely of deletions of semicolons in these situations. (If there was a way to update the previous PR, which had been closed, and that is preferable, please let me know. I couldn't figure it out.)
This commit is contained in:
parent
69444de05b
commit
6ac3075022
429 changed files with 477 additions and 476 deletions
|
|
@ -494,7 +494,7 @@ namespace dd {
|
|||
hash(unsigned_vector& vars):vars(vars) {}
|
||||
bool operator()(mon const& m) const {
|
||||
return unsigned_ptr_hash(vars.data() + m.offset, m.sz, 1);
|
||||
};
|
||||
}
|
||||
};
|
||||
struct eq {
|
||||
unsigned_vector& vars;
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ namespace lp {
|
|||
unsigned j, const T &m, X &theta, bool &unlimited) {
|
||||
SASSERT(m > 0 && this->m_column_types[j] == column_type::upper_bound);
|
||||
limit_inf_on_bound_m_pos(m, this->m_x[j], this->m_upper_bounds[j], theta, unlimited);
|
||||
};
|
||||
}
|
||||
|
||||
void get_bound_on_variable_and_update_leaving_precisely(
|
||||
unsigned j, vector<unsigned> &leavings, T m, X &t,
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ namespace nla {
|
|||
ineq(lpvar v, lp::lconstraint_kind cmp, rational const& r): m_cmp(cmp), m_term(v), m_rs(r) {}
|
||||
bool operator==(const ineq& a) const = delete;
|
||||
bool operator!=(const ineq& a) const = delete;
|
||||
const lp::lar_term& term() const { return m_term; };
|
||||
lp::lconstraint_kind cmp() const { return m_cmp; };
|
||||
const rational& rs() const { return m_rs; };
|
||||
const lp::lar_term& term() const { return m_term; }
|
||||
lp::lconstraint_kind cmp() const { return m_cmp; }
|
||||
const rational& rs() const { return m_rs; }
|
||||
};
|
||||
|
||||
class lemma {
|
||||
|
|
|
|||
|
|
@ -3511,4 +3511,4 @@ namespace algebraic_numbers {
|
|||
void manager::collect_statistics(statistics & st) const {
|
||||
m_imp->collect_statistics(st);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ namespace algebraic_numbers {
|
|||
anum& operator=(basic_cell* cell) { SASSERT(is_null()); m_cell = TAG(void*, cell, BASIC); return *this; }
|
||||
anum& operator=(algebraic_cell* cell) { SASSERT(is_null()); m_cell = TAG(void*, cell, ROOT); return *this; }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
typedef algebraic_numbers::manager anum_manager;
|
||||
typedef algebraic_numbers::manager::numeral anum;
|
||||
|
|
|
|||
|
|
@ -8253,7 +8253,7 @@ namespace polynomial {
|
|||
p->display_smt2(out, m_imp->m_manager, proc);
|
||||
return out;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
polynomial::polynomial * convert(polynomial::manager & sm, polynomial::polynomial * p, polynomial::manager & tm,
|
||||
polynomial::var x, unsigned max_d) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class small_object_allocator;
|
|||
namespace algebraic_numbers {
|
||||
class anum;
|
||||
class manager;
|
||||
};
|
||||
}
|
||||
|
||||
namespace polynomial {
|
||||
typedef unsigned var;
|
||||
|
|
@ -1065,7 +1065,7 @@ namespace polynomial {
|
|||
scoped_set_zp(manager & _m, uint64_t p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
|
||||
~scoped_set_zp() { if (m_modular) m.set_zp(m_p); else m.set_z(); }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
typedef polynomial::polynomial_ref polynomial_ref;
|
||||
typedef polynomial::polynomial_ref_vector polynomial_ref_vector;
|
||||
|
|
|
|||
|
|
@ -256,4 +256,4 @@ namespace polynomial {
|
|||
dealloc(m_imp);
|
||||
m_imp = alloc(imp, _m);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,4 +40,4 @@ namespace polynomial {
|
|||
void factor(polynomial const * p, polynomial_ref_vector & distinct_factors);
|
||||
void reset();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,5 +66,5 @@ namespace polynomial {
|
|||
};
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,6 @@ namespace polynomial {
|
|||
}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -789,4 +789,4 @@ namespace rpolynomial {
|
|||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ namespace rpolynomial {
|
|||
return out;
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
typedef rpolynomial::polynomial_ref rpolynomial_ref;
|
||||
typedef rpolynomial::polynomial_ref_vector rpolynomial_ref_vector;
|
||||
|
|
|
|||
|
|
@ -3142,4 +3142,4 @@ namespace upolynomial {
|
|||
}
|
||||
return out;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -917,4 +917,4 @@ namespace upolynomial {
|
|||
std::ostream& display(std::ostream & out, upolynomial_sequence const & seq, char const * var_name = "x") const;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1299,4 +1299,4 @@ bool factor_square_free(z_manager & upm, numeral_vector const & f, factors & fs,
|
|||
return factor_square_free(upm, f, fs, 1, params);
|
||||
}
|
||||
|
||||
}; // end upolynomial namespace
|
||||
} // end upolynomial namespace
|
||||
|
|
|
|||
|
|
@ -90,5 +90,5 @@ namespace upolynomial {
|
|||
That is, the factors of f are inserted as factors of degree k into fs.
|
||||
*/
|
||||
bool factor_square_free(z_manager & upm, numeral_vector const & f, factors & fs, unsigned k, factor_params const & ps = factor_params());
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -416,5 +416,5 @@ namespace upolynomial {
|
|||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6486,7 +6486,7 @@ namespace realclosure {
|
|||
{
|
||||
return m_imp->get_sign_condition_coefficient(a, i, j);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void pp(realclosure::manager::imp * imp, realclosure::polynomial const & p, realclosure::extension * ext) {
|
||||
imp->display_polynomial_expr(std::cout, p, ext, false, false);
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ namespace realclosure {
|
|||
void * data() { return m_value; }
|
||||
static num mk(void * ptr) { num r; r.m_value = reinterpret_cast<value*>(ptr); return r; }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
typedef realclosure::manager rcmanager;
|
||||
typedef rcmanager::numeral rcnumeral;
|
||||
|
|
|
|||
|
|
@ -74,4 +74,4 @@ namespace simplex {
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,5 +204,5 @@ namespace simplex {
|
|||
|
||||
void kernel(sparse_matrix<mpq_ext>& s, vector<vector<rational>>& K);
|
||||
void kernel_ffe(sparse_matrix<mpq_ext> &s, vector<vector<rational>> &K);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1035,6 +1035,6 @@ namespace simplex {
|
|||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -355,4 +355,4 @@ namespace simplex {
|
|||
typedef unsynch_mpq_inf_manager eps_manager;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -603,5 +603,5 @@ namespace simplex {
|
|||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -271,4 +271,4 @@ namespace subpaving {
|
|||
return alloc(context_mpfx_wrapper, lim, m, qm, p, a);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,6 @@ context * mk_hwf_context(reslimit& lim, f2n<hwf_manager> & m, unsynch_mpq_manage
|
|||
context * mk_mpff_context(reslimit& lim, mpff_manager & m, unsynch_mpq_manager & qm, params_ref const & p = params_ref(), small_object_allocator * a = nullptr);
|
||||
context * mk_mpfx_context(reslimit& lim, mpfx_manager & m, unsynch_mpq_manager & qm, params_ref const & p = params_ref(), small_object_allocator * a = nullptr);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,5 +42,5 @@ public:
|
|||
context_hwf(reslimit& lim, f2n<hwf_manager> & m, params_ref const & p, small_object_allocator * a):context_t<config_hwf>(lim, config_hwf(m), p, a) {}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ public:
|
|||
context_mpf(reslimit& lim, f2n<mpf_manager> & m, params_ref const & p, small_object_allocator * a):context_t<config_mpf>(lim, config_mpf(m), p, a) {}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,5 +39,5 @@ struct config_mpff {
|
|||
|
||||
typedef context_t<config_mpff> context_mpff;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,5 +39,5 @@ struct config_mpfx {
|
|||
|
||||
typedef context_t<config_mpfx> context_mpfx;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@ struct config_mpq {
|
|||
|
||||
typedef context_t<config_mpq> context_mpq;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -845,5 +845,5 @@ public:
|
|||
void operator()();
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1952,4 +1952,4 @@ bool context_t<C>::check_invariant() const {
|
|||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue