[lldb] Narrow scope of -Wno-deprecated-declarations (NFC) (#112276)

Currently all of LLDB is being compiled with
-Wno-deprecated-declarations. That's not desirable, especially as part
of the LLVM monorepo, as we miss deprecation warnings from LLVM and
clang.

According to the git history, this was first introduced to suppress
warnings related to auto_ptr. Since then, other things have been
deprecated and gone unnoticed. This patch limits the flag to Host.mm
which uses a handful of LSApplication headers that have no replacement.

rdar://112040718
This commit is contained in:
Jonas Devlieghere 2024-10-17 08:22:56 -07:00 committed by GitHub
parent 85c17e4092
commit 4897fc44a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,6 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
if (LLVM_COMPILER_IS_GCC_COMPATIBLE) if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
# Disable GCC warnings # Disable GCC warnings
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS) append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS) append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
@ -198,7 +197,6 @@ endif()
# Disable Clang warnings # Disable Clang warnings
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
append("-Wno-deprecated-register" CMAKE_CXX_FLAGS)
append("-Wno-vla-extension" CMAKE_CXX_FLAGS) append("-Wno-vla-extension" CMAKE_CXX_FLAGS)
endif() endif()

View File

@ -16,4 +16,6 @@ add_lldb_library(lldbHostMacOSXObjCXX NO_PLUGIN_DEPENDENCIES
TargetParser TargetParser
) )
target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions) target_compile_options(lldbHostMacOSXObjCXX PRIVATE
-fno-objc-exceptions
-Wno-deprecated-declarations)