[Lldb-commits] [lldb] [lldb] Narrow scope of -Wno-deprecated-declarations (NFC) (PR #112276)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 14 14:56:11 PDT 2024
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/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
>From d594127ce03f0b6e89529c95ae60fcdce8197bdf Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Mon, 14 Oct 2024 14:47:22 -0700
Subject: [PATCH] [lldb] Narrow scope of -Wno-deprecated-declarations (NFC)
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
---
lldb/cmake/modules/LLDBConfig.cmake | 2 --
lldb/source/Host/macosx/objcxx/CMakeLists.txt | 4 +++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
index a60921990cf775..93ccd9c479c2b8 100644
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -188,7 +188,6 @@ include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
# Disable GCC warnings
- append("-Wno-deprecated-declarations" CMAKE_CXX_FLAGS)
append("-Wno-unknown-pragmas" CMAKE_CXX_FLAGS)
append("-Wno-strict-aliasing" CMAKE_CXX_FLAGS)
@@ -198,7 +197,6 @@ endif()
# Disable Clang warnings
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- append("-Wno-deprecated-register" CMAKE_CXX_FLAGS)
append("-Wno-vla-extension" CMAKE_CXX_FLAGS)
endif()
diff --git a/lldb/source/Host/macosx/objcxx/CMakeLists.txt b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
index 273999f24380e5..1e693bed12ce15 100644
--- a/lldb/source/Host/macosx/objcxx/CMakeLists.txt
+++ b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
@@ -16,4 +16,6 @@ add_lldb_library(lldbHostMacOSXObjCXX NO_PLUGIN_DEPENDENCIES
TargetParser
)
-target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions)
+target_compile_options(lldbHostMacOSXObjCXX PRIVATE
+ -fno-objc-exceptions
+ -Wno-deprecated-declarations)
More information about the lldb-commits
mailing list