mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1685353: Disable -Woverloaded-virtual for GCC r=firefox-build-system-reviewers,sheehan,andi,glandium
In addition to warning on regular methods overloading virtual functions, GCC also watches for static functions doing such overloads. :andi confirmed that this is not valuable, so the warning is being disabled for GCC. Differential Revision: https://phabricator.services.mozilla.com/D101367
This commit is contained in:
parent
c2d4dcad38
commit
e7b2115e00
@ -60,8 +60,14 @@ add_gcc_warning("-Wempty-body")
|
||||
# catches return types with qualifiers like const
|
||||
add_gcc_warning("-Wignored-qualifiers")
|
||||
|
||||
# function declaration hides virtual function from base class
|
||||
add_gcc_warning("-Woverloaded-virtual", cxx_compiler)
|
||||
# function declaration hides virtual function from base class.
|
||||
# Don't enable for GCC, since it's more strict than clang,
|
||||
# and the additional cases it covers are not valuable.
|
||||
add_gcc_warning(
|
||||
"-Woverloaded-virtual",
|
||||
cxx_compiler,
|
||||
when=depends(cxx_compiler)(lambda c: c.type != "gcc"),
|
||||
)
|
||||
|
||||
# catches pointer arithmetic using NULL or sizeof(void)
|
||||
add_gcc_warning("-Wpointer-arith")
|
||||
|
Loading…
Reference in New Issue
Block a user