mirror of
https://github.com/Z3Prover/z3
synced 2026-08-03 04:33:28 +00:00
Use macros to disable semi-colon warnings for blocks of macros. (#10192)
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 PR completes the job started by https://github.com/Z3Prover/z3/pull/10169. It adds `-Wextra-semi` to the set of CLANG_ONLY_WARNINGS, and adds ``` START_DISABLE_EXTRA_SEMI_WARNING; ...macro invocations with trailing semis... END_DISABLE_WARNING; ``` around all the blocks of macro invocations that provoked warnings. (Additionally, in realclosure.h, there was one block of macro invocations that did *not* follow the trailing-semi pattern; changed that to look like all the others).
This commit is contained in:
parent
f8f763bdf1
commit
35b0b42d2e
25 changed files with 107 additions and 5 deletions
|
|
@ -22,6 +22,7 @@ Notes:
|
|||
#include "ast/rewriter/rewriter.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "util/manage_warnings.h"
|
||||
|
||||
//
|
||||
// bv2real[d,r](n,m) has interpretation:
|
||||
|
|
@ -100,8 +101,10 @@ public:
|
|||
bool is_pos_lef(func_decl* f) const { return f == m_pos_le; }
|
||||
bool is_pos_lt(expr const* e) const { return is_app(e) && is_pos_ltf(to_app(e)->get_decl()); }
|
||||
bool is_pos_le(expr const* e) const { return is_app(e) && is_pos_lef(to_app(e)->get_decl()); }
|
||||
START_DISABLE_EXTRA_SEMI_WARNING;
|
||||
MATCH_BINARY(is_pos_lt);
|
||||
MATCH_BINARY(is_pos_le);
|
||||
END_DISABLE_WARNING;
|
||||
expr* mk_pos_lt(expr* s, expr* t) { return m().mk_app(m_pos_lt, s, t); }
|
||||
expr* mk_pos_le(expr* s, expr* t) { return m().mk_app(m_pos_le, s, t); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue