From b388aa78763cc51b8c8075e0815bdc5676b3da7f Mon Sep 17 00:00:00 2001 From: DexesTTP Date: Sat, 30 Apr 2022 20:04:30 +0200 Subject: [PATCH] Lagom: Disable the unused-private-field warning on Lagom's clang builds With the compilation of LibWeb, there's now quite a few cases where this warning gets triggered. Rather than trying to fix them all right away, we simply disable the warning for now. This workaround was proposed by Andrew Kaster and BertalanD who promised to open an issue about it! --- Meta/Lagom/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 6c87b057eda..99c92b81a09 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -102,6 +102,10 @@ endif() if (CMAKE_CXX_COMPILER_ID MATCHES "Clang$") # Clang's default constexpr-steps limit is 1048576(2^20), GCC doesn't have one add_compile_options(-Wno-overloaded-virtual -Wno-user-defined-literals -fconstexpr-steps=16777216) + # FIXME: Re-enable this check when the warning stops triggering, or document why we can't stop it from triggering. + # For now, there is a lot of unused private fields in LibWeb that trigger this that could be removed. + # See issue #14137 for details + add_compile_options(-Wno-unused-private-field) if (ENABLE_FUZZERS_LIBFUZZER) add_compile_options(-fsanitize=fuzzer)