mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings * cmake: make missing non-virtual dtors error * treewide: add missing virtual destructors * cmake: add a few more checks * api: add missing virtual destructor to user_propagator_base * examples: compile cpp example with compiler warnings * model: fix unused variable warnings * rewriter: fix logical-op-parentheses warnings * sat: fix unused variable warnings * smt: fix unused variable warnings
This commit is contained in:
parent
1d45a33163
commit
96671cfc73
39 changed files with 68 additions and 9 deletions
|
@ -39,6 +39,27 @@ set(CLANG_WARNINGS_AS_ERRORS
|
|||
"-Werror=delete-non-virtual-dtor"
|
||||
# https://clang.llvm.org/docs/DiagnosticsReference.html#woverloaded-virtual
|
||||
"-Werror=overloaded-virtual"
|
||||
# warn the user if a class with virtual functions has a
|
||||
# non-virtual destructor. This helps catch hard to
|
||||
# track down memory errors
|
||||
"-Werror=non-virtual-dtor"
|
||||
# warn if a null dereference is detected
|
||||
"-Werror=null-dereference"
|
||||
# warn for potential performance problem casts
|
||||
# "-Werror=cast-align"
|
||||
# warn if float is implicit promoted to double
|
||||
# "-Werror=double-promotion"
|
||||
"-Werror=no-unreachable-code-return"
|
||||
# warn the user if a variable declaration shadows one from a parent context
|
||||
# "-Werror=shadow"
|
||||
# warn for c-style casts
|
||||
# "-Werror=old-style-cast"
|
||||
# warn on sign conversions
|
||||
# "-Werror=sign-conversion"
|
||||
# warn on type conversions that may lose data
|
||||
# "-Werror=conversion"
|
||||
# warn on anything being unused
|
||||
# "-Werror=unused"
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue