From f7105fae36c239967006eb41fc19bc96d2623cda Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 3 Jun 2021 13:01:17 +1000 Subject: [PATCH] warnings: always use suggest-override --- nc_warnings.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nc_warnings.cmake b/nc_warnings.cmake index c61aaed..aabde0c 100644 --- a/nc_warnings.cmake +++ b/nc_warnings.cmake @@ -128,11 +128,15 @@ append_compile_flag(-Wno-missing-braces) # ------------------------------------------------------------------------- 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) append_compile_flag(-Winline) append_compile_flag(-Wsuggest-final-types) append_compile_flag(-Wsuggest-final-methods) - append_compile_flag(-Wsuggest-override) append_compile_flag(-Wweak-vtables) append_compile_flag(-Wpadded) endif()