зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1718408 - Remove unnecessary -Wtautological-*-compare flags. r=firefox-build-system-reviewers,andi
We don't need to manually enable -Wtautological-overlap-compare because it is enabled by -Wtautological-compare, which is enabled by -Wmost, which is enabled by -Wall: https://clang.llvm.org/docs/DiagnosticsReference.html#wall We don't need to manually enable -Wtautological-unsigned-enum-zero-compare or -Wtautological-unsigned-zero-compare because they are enabled by -Wtype-limits, which we already enable manually: https://clang.llvm.org/docs/DiagnosticsReference.html#wtype-limits Depends on D118898 Differential Revision: https://phabricator.services.mozilla.com/D118899
This commit is contained in:
Родитель
79616311ea
Коммит
a2f4831bdc
|
@ -76,6 +76,9 @@ add_gcc_warning("-Wsign-compare")
|
|||
# catches overflow bugs, few false positives
|
||||
add_gcc_warning("-Wtype-limits")
|
||||
|
||||
# This can be triggered by certain patterns used deliberately in portable code
|
||||
check_and_add_gcc_warning("-Wno-error=tautological-type-limit-compare")
|
||||
|
||||
# catches some dead code
|
||||
add_gcc_warning("-Wunreachable-code")
|
||||
check_and_add_gcc_warning("-Wunreachable-code-return")
|
||||
|
@ -129,13 +132,6 @@ check_and_add_gcc_warning(
|
|||
# catches string literals used in boolean expressions
|
||||
check_and_add_gcc_warning("-Wstring-conversion")
|
||||
|
||||
# catches comparisons that are always true or false
|
||||
check_and_add_gcc_warning("-Wtautological-overlap-compare")
|
||||
check_and_add_gcc_warning("-Wtautological-unsigned-enum-zero-compare")
|
||||
check_and_add_gcc_warning("-Wtautological-unsigned-zero-compare")
|
||||
# This can be triggered by certain patterns used deliberately in portable code
|
||||
check_and_add_gcc_warning("-Wno-error=tautological-type-limit-compare")
|
||||
|
||||
# we inline 'new' and 'delete' in mozalloc
|
||||
check_and_add_gcc_warning("-Wno-inline-new-delete", cxx_compiler)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче