3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-21 06:25:50 +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

@ -3511,4 +3511,4 @@ namespace algebraic_numbers {
void manager::collect_statistics(statistics & st) const {
m_imp->collect_statistics(st);
}
};
}

View file

@ -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;

View file

@ -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) {

View file

@ -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;

View file

@ -256,4 +256,4 @@ namespace polynomial {
dealloc(m_imp);
m_imp = alloc(imp, _m);
}
};
}

View file

@ -40,4 +40,4 @@ namespace polynomial {
void factor(polynomial const * p, polynomial_ref_vector & distinct_factors);
void reset();
};
};
}

View file

@ -66,5 +66,5 @@ namespace polynomial {
};
#endif
};
}

View file

@ -43,6 +43,6 @@ namespace polynomial {
}
};
};
}

View file

@ -789,4 +789,4 @@ namespace rpolynomial {
}
#endif
};
}

View file

@ -175,7 +175,7 @@ namespace rpolynomial {
return out;
}
};
};
}
typedef rpolynomial::polynomial_ref rpolynomial_ref;
typedef rpolynomial::polynomial_ref_vector rpolynomial_ref_vector;

View file

@ -3142,4 +3142,4 @@ namespace upolynomial {
}
return out;
}
};
}

View file

@ -917,4 +917,4 @@ namespace upolynomial {
std::ostream& display(std::ostream & out, upolynomial_sequence const & seq, char const * var_name = "x") const;
};
};
}

View file

@ -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

View file

@ -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());
};
}

View file

@ -416,5 +416,5 @@ namespace upolynomial {
}
}
};
};
}