Skip to content

Commit

Permalink
Added -Wsuggest-override to the warning list
Browse files Browse the repository at this point in the history
This warning is available on GCC since 5.1 and Clang since 11.0.0.

Since GCC 9.2 it also does not warn if 'final' is used instead of
'override'. This was the case in Clang since the warning was introduced.
  • Loading branch information
dk949 committed Jan 17, 2024
1 parent d19d892 commit 19e413d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function(
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf)
-Wimplicit-fallthrough # warn on statements that fallthrough without an explicit annotation
-Wsuggest-override # warn if an overridden member function is not marked 'override' or 'final'
)
endif()

Expand Down

0 comments on commit 19e413d

Please sign in to comment.