3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-08-03 04:33:28 +00:00
z3/src/ast
davedets e2df18faaf
Test PR for disabling semicolon warnings (#10169)
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.

https://github.com/Z3Prover/z3/pull/10020 deleted a number of
unnecessary (and, by a strict interpretation, illegal) semicolons. These
were detected by adding -Wextra-semi to CLANG_ONLY_WARNINGS during
testing. The PR did not eliminate all such unnecessary/illegal
semi-colons; Nikolaj Bjorner argued that some IDEs would be confused by
doing so for macro invocations, which otherwise look like function
calls. So it left those, and did not include adding -Wextra-semi to
CLANG_ONLY_WARNINGS in the PR.

I'm worried that not having -Wextra-semi will allow instances of the
semis we'd like to eliminate to creep back in. This PR introduces a
mechanism to disable the warnings for regions with such macro
invocations, and uses that mechanism for one file. If accepted, a
subsequent PR would use this mechanism in all the remaining places, so
that there is a clean clang build with -Wextra-semi.

I verified that:
* It compiles cleanly for if the enable/disable macros have null
definitions, as they would for non-clang compilations.
* It compiles cleanly for a clang build without -Wextra-semis.
* It compiles successfully, albeit with *many* warnings, for a clang
build with-Wextra-semis -- but none of those errors are for the regions
in ast.h where the warning is disabled.
2026-07-22 10:28:13 -07:00
..
converters Sequence AST-creating arguments in rewriters for cross-compiler determinism (#10165) 2026-07-21 19:03:02 -07:00
euf [fixer-selftest] Fix typo in euf_ac_plugin.cpp comment: "betwen" → "between" (#10141) 2026-07-16 11:33:30 -07:00
fpa Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
macros Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
normal_forms disable test in tptp, move to native lambdas 2026-06-02 10:38:51 -07:00
pattern fixup pattern inference 2026-07-14 21:01:15 -07:00
proofs Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-02-18 20:57:52 -08:00
rewriter Sequence AST-creating arguments in rewriters for cross-compiler determinism (#10165) 2026-07-21 19:03:02 -07:00
simplifiers Sequence AST-creating arguments in rewriters for cross-compiler determinism (#10165) 2026-07-21 19:03:02 -07:00
sls Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
substitution replace some copies with moves 2026-02-18 21:02:17 -08:00
act_cache.cpp Fix static analysis findings: uninitialized vars, bitwise shift UB, garbage values 2026-03-02 00:13:55 +00:00
act_cache.h
arith_decl_plugin.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
arith_decl_plugin.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
array_decl_plugin.cpp Add SMT-LIB choice support via array OP_CHOICE and instantiate choice axioms in array solvers (#9649) 2026-05-27 10:05:06 -07:00
array_decl_plugin.h [code-simplifier] Align choice axiom naming in theory_array_full (#9660) 2026-06-01 16:03:42 -07:00
array_peq.cpp code simplification 2025-02-18 19:07:58 -08:00
array_peq.h code simplification 2025-02-18 19:07:58 -08:00
ast.cpp Sequence AST-creating arguments in rewriters for cross-compiler determinism (#10165) 2026-07-21 19:03:02 -07:00
ast.h Test PR for disabling semicolon warnings (#10169) 2026-07-22 10:28:13 -07:00
ast_ll_pp.cpp Fix quoting in low-level pretty printer (#9716) 2026-06-04 15:48:27 -07:00
ast_ll_pp.h
ast_lt.cpp Fix static analysis issues: null dereferences, unsafe casts, branch clones, uninitialized members (#9424) 2026-04-29 13:37:11 -07:00
ast_lt.h
ast_pp.h Reapply PR #8190: Replace std::ostringstream with C++20 std::format (#8204) 2026-02-18 20:57:30 -08:00
ast_pp_dot.cpp Fix clang warnings about casting away const. (#9933) 2026-06-23 19:57:46 -06:00
ast_pp_dot.h
ast_pp_util.cpp fix: declare type variables before use in solver display output (#10103) 2026-07-12 20:56:00 -07:00
ast_pp_util.h fix: declare type variables before use in solver display output (#10103) 2026-07-12 20:56:00 -07:00
ast_printer.cpp
ast_printer.h
ast_smt2_pp.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
ast_smt2_pp.h patch definitions, add pretty print support 2025-10-13 22:39:32 +02:00
ast_smt_pp.cpp Handle choice_k in SMT pretty-printer switch to remove macOS -Wswitch warning (#9734) 2026-06-06 11:37:56 -07:00
ast_smt_pp.h
ast_trail.h remove default destructors 2024-10-02 22:20:12 +01:00
ast_translation.cpp disable test in tptp, move to native lambdas 2026-06-02 10:38:51 -07:00
ast_translation.h
ast_util.cpp Fix static analysis issues: null dereferences, unsafe casts, branch clones, uninitialized members (#9424) 2026-04-29 13:37:11 -07:00
ast_util.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
bv_decl_plugin.cpp Sequence AST-creating arguments in rewriters for cross-compiler determinism (#10165) 2026-07-21 19:03:02 -07:00
bv_decl_plugin.h Issue 438 (#10085) 2026-07-12 13:35:57 -07:00
char_decl_plugin.cpp
char_decl_plugin.h
CMakeLists.txt Implement finite_set_decl_plugin with complete operator support and polymorphism infrastructure (#7961) 2025-10-13 10:58:53 +02:00
cost_evaluator.cpp
cost_evaluator.h
datatype_decl_plugin.cpp address #8376 2026-02-18 20:57:58 -08:00
datatype_decl_plugin.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
decl_collector.cpp fix: declare type variables before use in solver display output (#10103) 2026-07-12 20:56:00 -07:00
decl_collector.h fix: declare type variables before use in solver display output (#10103) 2026-07-12 20:56:00 -07:00
display_dimacs.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
display_dimacs.h
dl_decl_plugin.cpp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
dl_decl_plugin.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
expr2polynomial.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
expr2polynomial.h remove default destructors 2024-10-02 22:20:12 +01:00
expr2var.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
expr2var.h
expr_abstract.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
expr_abstract.h wip - throttle AC completion, enable congruences over bound bodies 2025-07-11 12:48:27 +02:00
expr_delta_pair.h Remove redundant default constructors when they're the only constructor (#8461) 2026-02-18 20:58:01 -08:00
expr_functors.cpp
expr_functors.h
expr_map.cpp
expr_map.h
expr_stat.cpp Refactor expr_stat to use structured bindings for traversal pairs (#8441) 2026-02-18 20:58:00 -08:00
expr_stat.h Remove redundant default constructors when they're the only constructor (#8461) 2026-02-18 20:58:01 -08:00
expr_substitution.cpp bugfix to elim_uncnstr to ensure nodes are created. Prepare smt_internalizer to replay unit literals 2024-12-04 15:32:15 -08:00
expr_substitution.h
finite_set_decl_plugin.cpp Code simplifications for finite set plugin 2026-02-21 02:08:04 +00:00
finite_set_decl_plugin.h Code simplifications for finite set plugin 2026-02-21 02:08:04 +00:00
for_each_ast.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
for_each_ast.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
for_each_expr.cpp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
for_each_expr.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
format.cpp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
format.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
fpa_decl_plugin.cpp [snapshot-regression-fix] fpa: fp.to_bv of large-exponent values should be unspecified, not unknown (#10174) 2026-07-21 18:55:46 -07:00
fpa_decl_plugin.h remove default destructors 2024-10-02 22:20:12 +01:00
func_decl_dependencies.cpp
func_decl_dependencies.h
has_free_vars.cpp fixup std-order / inv-order 2024-10-03 19:35:16 -07:00
has_free_vars.h
is_variable_test.h
justified_expr.h move from justified_expr to dependent_expr by aligning datatypes 2025-01-22 11:46:10 -08:00
macro_substitution.cpp
macro_substitution.h
num_occurs.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
num_occurs.h
occurs.cpp AIX compat (#8113) 2026-02-18 20:57:04 -08:00
occurs.h
pb_decl_plugin.cpp
pb_decl_plugin.h
polymorphism_inst.cpp reduce leaks for sorts 2026-07-07 12:04:14 -07:00
polymorphism_inst.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
polymorphism_util.cpp Fix memory leaks in polymorphism instantiation engine 2026-07-03 16:34:57 -07:00
polymorphism_util.h Implement finite_set_decl_plugin with complete operator support and polymorphism infrastructure (#7961) 2025-10-13 10:58:53 +02:00
pp.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
pp.h
pp_params.pyg
quantifier_stat.cpp Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
quantifier_stat.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
recfun_decl_plugin.cpp fix #9234 2026-04-23 13:54:09 -07:00
recfun_decl_plugin.h Remove unnecessary semicolons (Attempt 2) (#10020) 2026-07-02 12:47:29 -07:00
recurse_expr.h
recurse_expr_def.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
reg_decl_plugins.cpp Implement finite_set_decl_plugin with complete operator support and polymorphism infrastructure (#7961) 2025-10-13 10:58:53 +02:00
reg_decl_plugins.h
scoped_proof.h
seq_decl_plugin.cpp Derive with ranges (#9965) 2026-06-26 08:44:13 -06:00
seq_decl_plugin.h fold functionality into seq_range_collapse 2026-07-15 20:04:48 -07:00
shared_occs.cpp
shared_occs.h
special_relations_decl_plugin.cpp
special_relations_decl_plugin.h
static_features.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
static_features.h
used_symbols.h Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
used_vars.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
used_vars.h
value_generator.cpp prepare ground for general projection 2026-07-12 15:59:56 -07:00
value_generator.h
well_sorted.cpp Fix debug-only well-sorted traversal freeing temporary assertions (#10067) 2026-07-07 13:26:44 -07:00
well_sorted.h