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

@ -447,4 +447,4 @@ extern "C" {
return _am.get_i(av);
Z3_CATCH_RETURN(0);
}
};
}

View file

@ -235,4 +235,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -358,4 +358,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -1547,4 +1547,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -161,4 +161,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -135,4 +135,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -21,7 +21,7 @@ Revision History:
namespace api {
class context;
};
}
struct Z3_ast_vector_ref : public api::object {
ast_ref_vector m_ast_vector;

View file

@ -399,4 +399,4 @@ Z3_ast Z3_API NAME(Z3_context c, unsigned i, Z3_ast n) { \
Z3_CATCH_RETURN(0);
}
};
}

View file

@ -121,4 +121,4 @@ extern "C" {
Z3_CATCH;
}
};
}

View file

@ -359,7 +359,7 @@ namespace api {
return *(m_rcf_manager.get());
}
};
}
// ------------------------
@ -531,4 +531,4 @@ extern "C" {
Z3_CATCH;
}
};
}

View file

@ -45,16 +45,16 @@ Revision History:
namespace smtlib {
class parser;
};
}
namespace realclosure {
class manager;
};
}
namespace smt2 {
class parser;
void free_parser(parser*);
};
}
namespace api {
@ -267,7 +267,7 @@ namespace api {
};
};
}
inline api::context * mk_c(Z3_context c) { return reinterpret_cast<api::context*>(c); }
#define RESET_ERROR_CODE() { mk_c(c)->reset_error_code(); }

View file

@ -142,7 +142,7 @@ namespace api {
void collect_param_descrs(param_descrs & p) { m_context.collect_params(p); }
void updt_params(params_ref const& p) { m_context.updt_params(p); }
};
};
}
extern "C" {
@ -705,4 +705,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -30,7 +30,7 @@ typedef void (*reduce_assign_callback_fptr)(void*, func_decl*, unsigned, expr*co
namespace api {
class fixedpoint_context;
class context;
};
}
struct Z3_fixedpoint_ref : public api::object {

View file

@ -687,4 +687,4 @@ extern "C" {
}
};
}

View file

@ -184,4 +184,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -1337,4 +1337,4 @@ extern "C" {
Z3_CATCH_RETURN(false);
}
};
}

View file

@ -213,4 +213,4 @@ extern "C" {
Z3_CATCH_RETURN("");
}
};
}

View file

@ -448,4 +448,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -489,4 +489,4 @@ extern "C" {
}
#endif
};
}

View file

@ -503,4 +503,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -212,4 +212,4 @@ extern "C" {
Z3_CATCH_RETURN("");
}
};
}

View file

@ -106,4 +106,4 @@ extern "C" {
}
};
}

View file

@ -80,4 +80,4 @@ extern "C" {
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -583,5 +583,5 @@ extern "C" {
return Z3_ast_to_string(c, reinterpret_cast<Z3_ast>(p));
}
};
}

View file

@ -437,4 +437,4 @@ extern "C" {
return from_rcnumeral(rcfm(c).get_sign_condition_coefficient(to_rcnumeral(a), i, j));
Z3_CATCH_RETURN(nullptr);
}
};
}

View file

@ -369,4 +369,4 @@ extern "C" {
MK_FOURARY(Z3_mk_seq_foldli, mk_c(c)->get_seq_fid(), OP_SEQ_FOLDLI, SKIP);
};
}

View file

@ -1218,4 +1218,4 @@ extern "C" {
};
}

View file

@ -61,4 +61,4 @@ extern "C" {
}
MK_DECL(Z3_mk_transitive_closure, OP_SPECIAL_RELATION_TC);
};
}

View file

@ -133,4 +133,4 @@ extern "C" {
return memory::get_allocation_size();
}
};
}

View file

@ -669,4 +669,4 @@ extern "C" {
};
}

View file

@ -46,7 +46,7 @@ namespace api {
void inc_ref();
void dec_ref();
};
};
}
inline ast * to_ast(Z3_ast a) { return reinterpret_cast<ast *>(a); }
inline Z3_ast of_ast(ast* a) { return reinterpret_cast<Z3_ast>(a); }