Index: lldb/cmake/modules/LLDBConfig.cmake =================================================================== --- lldb/cmake/modules/LLDBConfig.cmake +++ lldb/cmake/modules/LLDBConfig.cmake @@ -278,6 +278,9 @@ check_cxx_compiler_flag("-Wno-nested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES) +check_cxx_compiler_flag("-Wno-format-zero-length" + CXX_SUPPORTS_NO_FORMAT_ZERO_LENGTH) + # Disable MSVC warnings if( MSVC ) add_definitions( Index: lldb/unittests/Utility/CMakeLists.txt =================================================================== --- lldb/unittests/Utility/CMakeLists.txt +++ lldb/unittests/Utility/CMakeLists.txt @@ -1,3 +1,7 @@ +if(CXX_SUPPORTS_NO_FORMAT_ZERO_LENGTH) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-zero-length") +endif() + add_lldb_unittest(UtilityTests AnsiTerminalTest.cpp ArgsTest.cpp