3
0
Fork 0
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:
davedets 2026-07-02 12:47:29 -07:00 committed by GitHub
parent 69444de05b
commit 6ac3075022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
429 changed files with 477 additions and 476 deletions

View file

@ -1360,4 +1360,4 @@ namespace datalog {
}
};
}

View file

@ -620,5 +620,5 @@ namespace datalog {
void display_rel_decl(std::ostream& out, func_decl* f);
};
};
}

View file

@ -157,4 +157,4 @@ namespace datalog {
}
}
};
}

View file

@ -106,6 +106,6 @@ namespace datalog {
void start(accounted_object *);
void finish() { start(nullptr); }
};
};
}

View file

@ -1084,6 +1084,6 @@ namespace datalog {
};
}

View file

@ -373,7 +373,7 @@ namespace datalog {
This possibly returns a ";"-separated list of names.
*/
symbol const& name() const { return m_name; } ;
symbol const& name() const { return m_name; }
unsigned hash() const;
@ -386,6 +386,6 @@ namespace datalog {
unsigned operator()(const rule * r) const;
};
};
}

View file

@ -709,4 +709,4 @@ namespace datalog {
}
};
}

View file

@ -281,5 +281,5 @@ namespace datalog {
};
}

View file

@ -80,5 +80,5 @@ namespace datalog {
return false;
}
};
}

View file

@ -56,6 +56,6 @@ namespace datalog {
bool is_subsumed(app * query);
};
};
}

View file

@ -148,4 +148,4 @@ namespace datalog {
};
}

View file

@ -110,6 +110,6 @@ namespace datalog {
static void remove_duplicate_tails(app_ref_vector& tail, bool_vector& tail_neg);
};
};
}

View file

@ -681,5 +681,5 @@ namespace datalog {
stm<<num;
return stm.str();
}
};
}

View file

@ -630,6 +630,6 @@ namespace datalog {
returned.
*/
bool read_uint64(const char * & s, uint64_t & res);
};
}

View file

@ -1566,6 +1566,6 @@ namespace datalog {
return nl.compile_query(query_pred, level);
}
};
}
template class rewriter_tpl<datalog::bmc::nonlinear::level_replacer_cfg>;

View file

@ -67,7 +67,7 @@ namespace datalog {
void compile(rule_set const& rules, expr_ref_vector& fmls, unsigned level);
expr_ref compile_query(func_decl* query_pred, unsigned level);
};
};
}

View file

@ -222,4 +222,4 @@ namespace datalog {
return m_imp->get_answer();
}
};
}

View file

@ -38,5 +38,5 @@ namespace datalog {
void display_certificate(std::ostream& out) const override;
expr_ref get_answer() override;
};
};
}

View file

@ -878,4 +878,4 @@ namespace datalog {
expr_ref ddnf::get_answer() {
return m_imp->get_answer();
}
};
}

View file

@ -65,5 +65,5 @@ namespace datalog {
void display(std::ostream& out) const;
void display_statistics(std::ostream& out) const;
};
};
}

View file

@ -42,5 +42,5 @@ namespace datalog {
virtual bool parse_directory(char const * path) = 0;
};
};
}

View file

@ -164,6 +164,6 @@ namespace datalog {
unsigned_vector const& dst_eq,
unsigned_vector const& neg_eq);
};
};
}

View file

@ -631,12 +631,12 @@ namespace datalog {
class identity_mutator_fn : public mutator_fn {
public:
void operator()(base_object & t) override {};
void operator()(base_object & t) override {}
};
class identity_intersection_filter_fn : public intersection_filter_fn {
public:
void operator()(base_object & t, const base_object & neg) override {};
void operator()(base_object & t, const base_object & neg) override {}
};
class default_permutation_rename_fn : public transformer_fn {
@ -1258,5 +1258,5 @@ namespace datalog {
expr_ref_vector & renaming_arg);
};
}

View file

@ -676,6 +676,6 @@ namespace datalog {
}
};
}

View file

@ -168,6 +168,6 @@ namespace datalog {
};
};
}

View file

@ -435,5 +435,5 @@ namespace datalog {
return result;
}
};
}

View file

@ -129,5 +129,5 @@ namespace datalog {
unsigned get_size_estimate_bytes() const override { return m_tocheck->get_size_estimate_bytes(); }
};
};
}

View file

@ -279,6 +279,6 @@ namespace datalog {
};
};
}

View file

@ -449,4 +449,4 @@ namespace datalog {
return alloc(negation_filter_fn, *this, t, negated_obj, joined_col_cnt, t_cols, negated_cols);
}
};
}

View file

@ -147,5 +147,5 @@ namespace datalog {
};
};
}

View file

@ -2372,4 +2372,4 @@ namespace datalog {
bool_rewriter(m).mk_or(disjs.size(), disjs.data(), fml);
}
};
}

View file

@ -359,6 +359,6 @@ namespace datalog {
void to_formula(expr_ref& fml) const override;
};
};
}

View file

@ -364,6 +364,6 @@ namespace datalog {
};
};
}

View file

@ -648,5 +648,5 @@ namespace datalog {
return false;
}
};
}

View file

@ -134,6 +134,6 @@ namespace datalog {
};
};
}

View file

@ -885,5 +885,5 @@ namespace datalog {
return res.detach();
}
};
}

View file

@ -79,6 +79,6 @@ namespace datalog {
static expr* get_explanation(relation_base const& r);
};
};
}

View file

@ -543,4 +543,4 @@ namespace datalog {
reset();
return result;
}
};
}

View file

@ -71,6 +71,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -751,5 +751,5 @@ namespace datalog {
}
};
}

View file

@ -56,6 +56,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -1128,7 +1128,7 @@ namespace datalog {
}
}
};
}

View file

@ -184,6 +184,6 @@ namespace datalog {
}
};
};
}

View file

@ -1689,5 +1689,5 @@ namespace datalog {
return res;
}
};
}

View file

@ -699,6 +699,6 @@ namespace datalog {
};
};
}

View file

@ -662,4 +662,4 @@ namespace datalog {
}
};
}

View file

@ -190,6 +190,6 @@ namespace datalog {
};
};
}

View file

@ -1404,5 +1404,5 @@ namespace datalog {
}
};
}

View file

@ -494,5 +494,5 @@ namespace datalog {
bool knows_exact_size() const override { return true; }
};
};
}

View file

@ -292,5 +292,5 @@ namespace datalog {
table_base::iterator bitvector_table::end() const {
return mk_iterator(alloc(bv_iterator, *this, true));
}
};
}

View file

@ -144,6 +144,6 @@ namespace datalog {
};
}

View file

@ -489,5 +489,5 @@ namespace datalog {
}
}
};
}

View file

@ -126,6 +126,6 @@ namespace datalog {
bool knows_exact_size() const override { return m_table->knows_exact_size(); }
};
};
}

View file

@ -397,6 +397,6 @@ namespace datalog {
};
};
}

View file

@ -789,4 +789,4 @@ namespace datalog {
}
return nullptr;
}
};
}

View file

@ -80,6 +80,6 @@ namespace datalog {
};
};
}

View file

@ -630,4 +630,4 @@ namespace datalog {
}
};
}

View file

@ -125,5 +125,5 @@ namespace datalog {
lbool saturate() override;
};
};
}

View file

@ -147,6 +147,6 @@ namespace datalog {
void disable_fast_pass() { m_disable_fast_pass = true; }
};
};
}

View file

@ -36,7 +36,7 @@ struct proc {
}
}
};
}; // namespace pattern_var_marker_ns
} // namespace pattern_var_marker_ns
namespace spacer {
void pob_concretizer::mark_pattern_vars() {
pattern_var_marker_ns::proc proc(m_arith, m_var_marks);

View file

@ -38,7 +38,7 @@ Notes:
namespace datalog {
class rule_set;
class context;
}; // namespace datalog
} // namespace datalog
namespace spacer {

View file

@ -155,7 +155,7 @@ class convex_closure {
void add_row(const vector<rational> &point) {
SASSERT(point.size() == dims());
m_data.add_row(point);
};
}
bool operator()() { return this->compute(); }
bool compute();

View file

@ -99,7 +99,7 @@ bool farkas_learner::is_pure_expr(func_decl_set const& symbs, expr* e, ast_manag
return false;
}
return true;
};
}
/**

View file

@ -327,4 +327,4 @@ void lemma_eq_generalizer::operator() (lemma_ref &lemma) {
}
};
}

View file

@ -66,7 +66,7 @@ public:
}
void reset() {reset_partition();};
void reset() {reset_partition();}
void reset_partition() {m_current_part = UINT_MAX;}
unsigned partition() {return m_current_part;}
bool found_partition() {return m_current_part < UINT_MAX;}

View file

@ -845,4 +845,4 @@ namespace spacer {
return res;
}
};
}

View file

@ -43,5 +43,5 @@ namespace spacer_qe {
void array_project_selects (model& model, app_ref_vector& arr_vars, expr_ref& fml, app_ref_vector& aux_vars);
void array_project (model& model, app_ref_vector& arr_vars, expr_ref& fml, app_ref_vector& aux_vars, bool reduce_all_selects = false);
};
}

View file

@ -35,7 +35,7 @@ private:
public:
func_decl_ref m_main;
func_decl_ref_vector m_variants;
sym_mux_entry(ast_manager &m) : m_main(m), m_variants(m) {};
sym_mux_entry(ast_manager &m) : m_main(m), m_variants(m) {}
};
typedef obj_map<func_decl, sym_mux_entry*> decl2entry_map;

View file

@ -41,7 +41,7 @@ namespace spacer {
public:
unsat_core_learner(ast_manager& m, iuc_proof& pr) :
m(m), m_pr(pr), m_unsat_core(m) {};
m(m), m_pr(pr), m_unsat_core(m) {}
virtual ~unsat_core_learner();
ast_manager& get_manager() {return m;}

View file

@ -35,7 +35,7 @@ Revision History:
namespace spacer {
unsat_core_plugin::unsat_core_plugin(unsat_core_learner& ctx):
m(ctx.get_manager()), m_ctx(ctx) {};
m(ctx.get_manager()), m_ctx(ctx) {}
void unsat_core_plugin_lemma::compute_partial_core(proof* step) {
SASSERT(m_ctx.is_a(step));

View file

@ -40,7 +40,7 @@ namespace spacer {
class unsat_core_plugin_lemma : public unsat_core_plugin {
public:
unsat_core_plugin_lemma(unsat_core_learner& learner) : unsat_core_plugin(learner){};
unsat_core_plugin_lemma(unsat_core_learner& learner) : unsat_core_plugin(learner){}
void compute_partial_core(proof* step) override;
private:
void add_lowest_split_to_core(proof* step) const;
@ -53,7 +53,7 @@ namespace spacer {
bool use_constant_from_a=true) :
unsat_core_plugin(learner),
m_split_literals(split_literals),
m_use_constant_from_a(use_constant_from_a) {};
m_use_constant_from_a(use_constant_from_a) {}
void compute_partial_core(proof* step) override;
private:
bool m_split_literals;
@ -66,7 +66,7 @@ namespace spacer {
class unsat_core_plugin_farkas_lemma_optimized : public unsat_core_plugin {
public:
unsat_core_plugin_farkas_lemma_optimized(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin(learner) {};
unsat_core_plugin_farkas_lemma_optimized(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin(learner) {}
void compute_partial_core(proof* step) override;
void finalize() override;
protected:
@ -79,7 +79,7 @@ namespace spacer {
class unsat_core_plugin_farkas_lemma_bounded : public unsat_core_plugin_farkas_lemma_optimized {
public:
unsat_core_plugin_farkas_lemma_bounded(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin_farkas_lemma_optimized(learner, m) {};
unsat_core_plugin_farkas_lemma_bounded(unsat_core_learner& learner, ast_manager& m) : unsat_core_plugin_farkas_lemma_optimized(learner, m) {}
void finalize() override;
};

View file

@ -1306,7 +1306,7 @@ namespace tb {
}
return out << "unmatched instruction";
}
};
}
namespace datalog {
@ -1655,4 +1655,4 @@ namespace datalog {
return m_imp->get_answer();
}
};
}

View file

@ -39,5 +39,5 @@ namespace datalog {
void display_certificate(std::ostream& out) const override;
expr_ref get_answer() override;
};
};
}

View file

@ -333,6 +333,6 @@ namespace datalog {
return rules.detach();
}
};
}

View file

@ -69,6 +69,6 @@ namespace datalog {
};
};
}

View file

@ -44,5 +44,5 @@ namespace datalog {
};
}

View file

@ -116,5 +116,5 @@ namespace datalog {
};
}

View file

@ -73,4 +73,4 @@ namespace datalog {
return result.detach();
}
};
}

View file

@ -30,6 +30,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -334,4 +334,4 @@ namespace datalog {
return (*m_impl)(source);
}
};
}

View file

@ -31,6 +31,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -194,6 +194,6 @@ namespace datalog {
return rules.detach();
}
};
}

View file

@ -54,6 +54,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -166,4 +166,4 @@ namespace datalog {
return m_result;
}
};
}

View file

@ -79,7 +79,7 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -615,4 +615,4 @@ namespace datalog {
return res.detach();
}
};
}

View file

@ -102,6 +102,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -308,5 +308,5 @@ namespace datalog {
};
}

View file

@ -68,6 +68,6 @@ namespace datalog {
};
};
}

View file

@ -153,4 +153,4 @@ namespace datalog {
return result;
}
};
}

View file

@ -43,6 +43,6 @@ namespace datalog {
rule_set * revert(rule_set const& source);
};
};
}

View file

@ -375,5 +375,5 @@ namespace datalog {
result->add_rule(back_to_goal_rule);
return result.detach();
}
};
}

View file

@ -128,6 +128,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -130,4 +130,4 @@ namespace datalog {
return app_ref(m.mk_app(g, q->get_num_args(), q->get_args()), m);
}
};
}

View file

@ -32,6 +32,6 @@ namespace datalog {
rule_set * operator()(rule_set const & source) override;
};
};
}

View file

@ -361,4 +361,4 @@ namespace datalog {
}
};
}

View file

@ -55,6 +55,6 @@ namespace datalog {
};
}

View file

@ -289,6 +289,6 @@ namespace datalog {
}
};
}

View file

@ -65,6 +65,6 @@ namespace datalog {
};
}

View file

@ -878,4 +878,4 @@ namespace datalog {
return res.detach();
}
};
}

Some files were not shown because too many files have changed in this diff Show more