mirror of
https://github.com/Z3Prover/z3
synced 2026-07-05 14:56: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
|
|
@ -97,10 +97,10 @@ namespace dimacs {
|
|||
bool operator!=(iterator const& other) const { return m_eof != other.m_eof; }
|
||||
};
|
||||
|
||||
iterator begin() { return iterator(*this, false); };
|
||||
iterator begin() { return iterator(*this, false); }
|
||||
iterator end() { return iterator(*this, true); }
|
||||
|
||||
void set_read_theory(std::function<int(char const*)>& r) { m_read_theory_id = r; }
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
namespace dd {
|
||||
class pdd;
|
||||
class solver;
|
||||
};
|
||||
}
|
||||
|
||||
namespace sat {
|
||||
|
||||
|
|
|
|||
|
|
@ -497,4 +497,4 @@ namespace sat {
|
|||
m_tr = 0;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,5 +106,5 @@ namespace sat {
|
|||
inline void dec(unsigned c) { m_counter -= c; }
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -353,4 +353,4 @@ namespace sat {
|
|||
m_R.reset();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,5 +73,5 @@ namespace sat {
|
|||
void operator()(union_find<>& uf);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -281,4 +281,4 @@ namespace sat {
|
|||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,5 +87,5 @@ namespace sat {
|
|||
void display(std::ostream& out) const;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -249,4 +249,4 @@ namespace sat {
|
|||
return out;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,5 +198,5 @@ namespace sat {
|
|||
|
||||
std::ostream & operator<<(std::ostream & out, clause_wrapper const & c);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,4 +88,4 @@ namespace sat {
|
|||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,5 +50,5 @@ namespace sat {
|
|||
bool check_invariant() const;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,4 +54,4 @@ namespace sat {
|
|||
m_clauses.shrink(m_j);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,5 +134,5 @@ namespace sat {
|
|||
}
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,4 +230,4 @@ namespace sat {
|
|||
st.update("sat elim literals", m_elim_literals);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,5 +48,5 @@ namespace sat {
|
|||
void dec() { m_cleanup_counter--; }
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -259,4 +259,4 @@ namespace sat {
|
|||
sat_params::collect_param_descrs(r);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,5 +196,5 @@ namespace sat {
|
|||
static void collect_param_descrs(param_descrs & d);
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,4 +306,4 @@ namespace sat {
|
|||
}
|
||||
(*this)(roots, to_elim);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,5 +47,5 @@ namespace sat {
|
|||
void operator()(union_find<>& uf);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace sat {
|
|||
solver const& s() const { return *m_solver; }
|
||||
symbol const& name() const { return m_name; }
|
||||
|
||||
virtual void set_lookahead(lookahead* s) {};
|
||||
virtual void set_lookahead(lookahead* s) {}
|
||||
class scoped_drating {
|
||||
extension& ext;
|
||||
public:
|
||||
|
|
@ -138,5 +138,5 @@ namespace sat {
|
|||
virtual std::string reason_unknown() { return "unknown"; }
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -221,4 +221,4 @@ namespace sat {
|
|||
VERIFY(check_disjoint_clauses());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,4 @@ namespace sat {
|
|||
bool check_disjoint_clauses() const;
|
||||
bool operator()() const;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,5 +72,5 @@ namespace sat {
|
|||
return out;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ Notes:
|
|||
|
||||
namespace pb {
|
||||
class solver;
|
||||
};
|
||||
}
|
||||
|
||||
namespace sat {
|
||||
|
||||
|
|
|
|||
|
|
@ -455,4 +455,4 @@ namespace sat {
|
|||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,4 +153,4 @@ namespace sat {
|
|||
return out;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,5 +61,5 @@ namespace sat {
|
|||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -276,5 +276,5 @@ namespace sat {
|
|||
return copied;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,5 +112,5 @@ namespace sat {
|
|||
bool copy_solver(solver& s);
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -322,4 +322,4 @@ namespace sat {
|
|||
void probing::reset_statistics() {
|
||||
m_num_assigned = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,5 +91,5 @@ namespace sat {
|
|||
void dec(unsigned c) { m_counter -= c; }
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -282,4 +282,4 @@ namespace sat {
|
|||
sat_scc_params::collect_param_descrs(d);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,5 +65,5 @@ namespace sat {
|
|||
int get_right(literal l) const { return m_big.get_right(l); }
|
||||
bool connected(literal u, literal v) const { return m_big.connected(u, v); }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2148,4 +2148,4 @@ namespace sat {
|
|||
m_num_bca = 0;
|
||||
m_num_ate = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,5 +250,5 @@ namespace sat {
|
|||
bool need_cleanup() const { return m_need_cleanup; }
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4865,4 +4865,4 @@ namespace sat {
|
|||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Revision History:
|
|||
|
||||
namespace pb {
|
||||
class solver;
|
||||
};
|
||||
}
|
||||
|
||||
namespace sat {
|
||||
|
||||
|
|
@ -895,4 +895,4 @@ namespace sat {
|
|||
|
||||
|
||||
std::ostream & operator<<(std::ostream & out, mk_stat const & stat);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace sat {
|
|||
// optional support for user-scopes. Not relevant for sat_tactic integration.
|
||||
// it is only relevant for incremental mode SAT, which isn't wrapped (yet)
|
||||
virtual void user_push() { throw default_exception("optional API not supported"); }
|
||||
virtual void user_pop(unsigned num_scopes) {};
|
||||
virtual void user_pop(unsigned num_scopes) {}
|
||||
virtual unsigned num_user_scopes() const { return 0;}
|
||||
virtual unsigned num_scopes() const { return 0; }
|
||||
|
||||
|
|
@ -58,5 +58,5 @@ namespace sat {
|
|||
virtual extension* get_extension() const { return nullptr; }
|
||||
virtual void set_extension(extension* e) { if (e) throw default_exception("optional API not supported"); }
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ namespace sat {
|
|||
int m_orig;
|
||||
const proof_hint* m_hint;
|
||||
public:
|
||||
status(st s, int o, proof_hint const* ps = nullptr) : m_st(s), m_orig(o), m_hint(ps) {};
|
||||
status(st s, int o, proof_hint const* ps = nullptr) : m_st(s), m_orig(o), m_hint(ps) {}
|
||||
status(status const& s) : m_st(s.m_st), m_orig(s.m_orig), m_hint(s.m_hint) {}
|
||||
status(status&& s) noexcept { m_st = st::asserted; m_orig = -1; std::swap(m_st, s.m_st); std::swap(m_orig, s.m_orig); std::swap(m_hint, s.m_hint); }
|
||||
status& operator=(status const& other) { m_st = other.m_st; m_orig = other.m_orig; return *this; }
|
||||
|
|
@ -170,7 +170,7 @@ namespace sat {
|
|||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -110,4 +110,4 @@ namespace sat {
|
|||
return out;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,5 +125,5 @@ namespace sat {
|
|||
std::ostream& display_watch_list(std::ostream & out, clause_allocator const & ca, watch_list const & wlist, extension* ext);
|
||||
|
||||
void conflict_cleanup(watch_list::iterator it, watch_list::iterator it2, watch_list& wlist);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,4 +142,4 @@ namespace arith {
|
|||
|
||||
#endif
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,4 +49,4 @@ namespace arith {
|
|||
expr_ref get_fixed(expr* e);
|
||||
#endif
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,4 +78,4 @@ namespace bv {
|
|||
void propagate();
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ namespace bv {
|
|||
tmp = m.mk_or(literal2expr(b), tmp);
|
||||
xs.push_back(tmp);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The i'th bit in xs is 1 if the least significant bit of x is i or lower.
|
||||
|
|
@ -324,7 +324,7 @@ namespace bv {
|
|||
tmp = m.mk_or(literal2expr(b), tmp);
|
||||
xs.push_back(tmp);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Check non-overflow of unsigned multiplication.
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ namespace bv {
|
|||
}
|
||||
func_decl* f = m.mk_func_decl(th, sorts.size(), sorts.data(), proof);
|
||||
return m.mk_app(f, args);
|
||||
};
|
||||
}
|
||||
|
||||
void solver::asserted(literal l) {
|
||||
atom* a = get_bv2a(l.var());
|
||||
|
|
|
|||
|
|
@ -87,4 +87,4 @@ namespace euf {
|
|||
void propagate();
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ namespace euf {
|
|||
return p.display(out);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& out, euf::solver const& s) {
|
||||
return s.display(out);
|
||||
|
|
|
|||
|
|
@ -440,4 +440,4 @@ namespace fpa {
|
|||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ namespace intblast {
|
|||
}
|
||||
}
|
||||
return r;
|
||||
};
|
||||
}
|
||||
|
||||
bool solver::is_bv(sat::literal lit) {
|
||||
expr* e = ctx.bool_var2expr(lit.var());
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace pb {
|
|||
|
||||
virtual bool validate_unit_propagation(solver_interface const& s, literal alit) const = 0;
|
||||
|
||||
virtual bool is_watching(literal l) const { UNREACHABLE(); return false; };
|
||||
virtual bool is_watching(literal l) const { UNREACHABLE(); return false; }
|
||||
virtual literal_vector literals() const { UNREACHABLE(); return literal_vector(); }
|
||||
virtual void swap(unsigned i, unsigned j) noexcept { UNREACHABLE(); }
|
||||
virtual literal get_lit(unsigned i) const { UNREACHABLE(); return sat::null_literal; }
|
||||
|
|
|
|||
|
|
@ -3795,6 +3795,6 @@ namespace pb {
|
|||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -418,5 +418,5 @@ namespace pb {
|
|||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Author:
|
|||
|
||||
namespace euf {
|
||||
class solver;
|
||||
};
|
||||
}
|
||||
|
||||
namespace q {
|
||||
|
||||
|
|
|
|||
|
|
@ -169,4 +169,4 @@ namespace user_solver {
|
|||
euf::th_solver* clone(euf::solver& ctx) override;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue