Enable -Wimplicit-fallthrough for clang as well as GCC

All instances of this warning should already be fixed across all LLVM
subprojects, at least on Linux.

llvm-svn: 345887
This commit is contained in:
Reid Kleckner 2018-11-01 20:31:44 +00:00
parent 4d0059c09b
commit c22b988e59
1 changed files with 1 additions and 0 deletions

View File

@ -580,6 +580,7 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
append("-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
add_flag_if_supported("-Wimplicit-fallthrough" IMPLICIT_FALLTHROUGH_FLAG)
add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)