Skip to content

Commit 955f87f

Browse files
committed
[compiler-rt] Disable -Wsuggest-override for unittests
This uses a special set of flags given to unittests to work around warnings raised by googletest and googlemock. This should bring the sanitizer bots back to green.
1 parent bc0a9a1 commit 955f87f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

compiler-rt/cmake/Modules/AddCompilerRT.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ set(COMPILER_RT_GMOCK_CFLAGS
403403

404404
append_list_if(COMPILER_RT_DEBUG -DSANITIZER_DEBUG=1 COMPILER_RT_UNITTEST_CFLAGS)
405405
append_list_if(COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG -Wno-covered-switch-default COMPILER_RT_UNITTEST_CFLAGS)
406+
append_list_if(COMPILER_RT_HAS_WSUGGEST_OVERRIDE_FLAG -Wno-suggest-override COMPILER_RT_UNITTEST_CFLAGS)
406407

407408
if(MSVC)
408409
# gtest use a lot of stuff marked as deprecated on Windows.

compiler-rt/cmake/config-ix.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" COMPILER_RT_HAS_WNON_VIRT
106106
check_cxx_compiler_flag("-Werror -Wvariadic-macros" COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG)
107107
check_cxx_compiler_flag("-Werror -Wunused-parameter" COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG)
108108
check_cxx_compiler_flag("-Werror -Wcovered-switch-default" COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG)
109+
check_cxx_compiler_flag("-Werror -Wsuggest-override" COMPILER_RT_HAS_WSUGGEST_OVERRIDE_FLAG)
109110
check_cxx_compiler_flag(-Wno-pedantic COMPILER_RT_HAS_WNO_PEDANTIC)
110111

111112
check_cxx_compiler_flag(/W4 COMPILER_RT_HAS_W4_FLAG)

0 commit comments

Comments
 (0)