mirror of
https://github.com/Z3Prover/z3
synced 2026-08-02 04:03:26 +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
|
|
@ -3,7 +3,7 @@ Copyright (c) 2006 Microsoft Corporation
|
|||
|
||||
Module Name:
|
||||
|
||||
build_warnings.h
|
||||
manage_warnings.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ Revision History:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/manage_warnings.h"
|
||||
#include "util/mpq.h"
|
||||
#include "util/rational.h"
|
||||
#include "util/vector.h"
|
||||
|
|
@ -328,12 +329,14 @@ inline bool EXTERNAL(scoped_mpbq const & a, TYPE const & b) { \
|
|||
MPBQ_MK_COMPARISON_CORE(EXTERNAL, INTERNAL, int) \
|
||||
MPBQ_MK_COMPARISON_CORE(EXTERNAL, INTERNAL, mpz) \
|
||||
|
||||
START_DISABLE_EXTRA_SEMI_WARNING;
|
||||
MPBQ_MK_COMPARISON(operator==, eq);
|
||||
MPBQ_MK_COMPARISON(operator!=, neq);
|
||||
MPBQ_MK_COMPARISON(operator<, lt);
|
||||
MPBQ_MK_COMPARISON(operator<=, le);
|
||||
MPBQ_MK_COMPARISON(operator>, gt);
|
||||
MPBQ_MK_COMPARISON(operator>=, ge);
|
||||
END_DISABLE_WARNING;
|
||||
|
||||
#undef MPBQ_MK_COMPARISON
|
||||
#undef MPBQ_MK_COMPARISON_CORE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue