https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010

Barry Revzin <barry.revzin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |barry.revzin at gmail dot com

--- Comment #8 from Barry Revzin <barry.revzin at gmail dot com> ---
Still happens on 9.1.

This is actually worse than just a spurious warning. I want to use
-Wsuggest-override, but we weren't carefully marking overrides in our code base
for a long time... so I used clang-tidy's modernize-use-override check
(https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html) to
do all the marking so that I can enable this warning. Yay tooling.

clang-tidy, though, in addition to adding missing "override"s also removes
redundant "virtual"s and replaces a redundant "override final" with just
"final" (as Jonathan mentions in comment #2, the Core Guidelines also agree
this is redundant). Which means that manual intervention is still necessary to
get gcc to not warn.

This is a really good warning (would've fixed at least two bugs that I've ran
into in production), and we even have existing tooling to remove what would
have been all the false positives via clang-tidy... just need gcc to not flag
the remaining false positive cases.

Reply via email to