Skip to content

Commit 4897fc4

Browse files
authored
[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
1 parent 85c17e4 commit 4897fc4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lldb/cmake/modules/LLDBConfig.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
188188

189189
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
190190
# Disable GCC warnings
191-
append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
192191
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
193192
append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
194193

@@ -198,7 +197,6 @@ endif()
198197

199198
# Disable Clang warnings
200199
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
201-
append("-Wno-deprecated-register" CMAKE_CXX_FLAGS)
202200
append("-Wno-vla-extension" CMAKE_CXX_FLAGS)
203201
endif()
204202

lldb/source/Host/macosx/objcxx/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ add_lldb_library(lldbHostMacOSXObjCXX NO_PLUGIN_DEPENDENCIES
1616
TargetParser
1717
)
1818

19-
target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions)
19+
target_compile_options(lldbHostMacOSXObjCXX PRIVATE
20+
-fno-objc-exceptions
21+
-Wno-deprecated-declarations)

0 commit comments

Comments
 (0)