warnings: always use suggest-override

This commit is contained in:
Danny Robson 2021-06-03 13:01:17 +10:00
parent ea804359fb
commit f7105fae36

View File

@ -128,11 +128,15 @@ append_compile_flag(-Wno-missing-braces)
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
option (ADVISORY "enable advisory warnings") option (ADVISORY "enable advisory warnings")
# Always use suggest-override. It has a low false positive rate and mitigates
# a possibly significant error.
append_compile_flag(-Wsuggest-override)
#append_compile_flag(-Woverloaded-virtual)
if (ADVISORY) if (ADVISORY)
append_compile_flag(-Winline) append_compile_flag(-Winline)
append_compile_flag(-Wsuggest-final-types) append_compile_flag(-Wsuggest-final-types)
append_compile_flag(-Wsuggest-final-methods) append_compile_flag(-Wsuggest-final-methods)
append_compile_flag(-Wsuggest-override)
append_compile_flag(-Wweak-vtables) append_compile_flag(-Wweak-vtables)
append_compile_flag(-Wpadded) append_compile_flag(-Wpadded)
endif() endif()