[Lldb-commits] [lldb] f7a544d - [lldb] Ignore swig warnings about shadowed overloads (#83317)

via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 28 16:54:36 PST 2024


Author: Alex Langford
Date: 2024-02-28T16:54:32-08:00
New Revision: f7a544dd5f515c2f9b312142f573806cc8e64145

URL: https://github.com/llvm/llvm-project/commit/f7a544dd5f515c2f9b312142f573806cc8e64145
DIFF: https://github.com/llvm/llvm-project/commit/f7a544dd5f515c2f9b312142f573806cc8e64145.diff

LOG: [lldb] Ignore swig warnings about shadowed overloads (#83317)

This specifically addresses the warnings:
$LLVM/lldb/include/lldb/API/SBCommandReturnObject.h:119: Warning 509:
Overloaded method lldb::SBCommandReturnObject::PutCString(char const *)
effectively ignored,
$LLVM/lldb/include/lldb/API/SBCommandReturnObject.h:119: Warning 509: as
it is shadowed by lldb::SBCommandReturnObject::PutCString(char const
*,int).

There is exactly one declaration of SBCommandReturnObject::PutCString.
The second parameter (of type `int`) has default value `-1`. Without
investigating why SWIG believes there are 2 method declarations, I
believe it is safe to ignore this warning. It does not appear to
actually impact functionality in any way.

rdar://117744660

Added: 
    

Modified: 
    lldb/bindings/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/bindings/CMakeLists.txt b/lldb/bindings/CMakeLists.txt
index b44ed59aa662b2..296eae1ae77f86 100644
--- a/lldb/bindings/CMakeLists.txt
+++ b/lldb/bindings/CMakeLists.txt
@@ -23,7 +23,11 @@ endif()
 
 set(SWIG_COMMON_FLAGS
   -c++
-  -w361,362 # Ignore warnings about ignored operator overloads
+  # Ignored warnings:
+  # 361: operator! ignored.
+  # 362: operator= ignored.
+  # 509: Overloaded method declaration effectively ignored, shadowed by previous declaration.
+  -w361,362,509
   -features autodoc
   -I${LLDB_SOURCE_DIR}/include
   -I${CMAKE_CURRENT_SOURCE_DIR}


        


More information about the lldb-commits mailing list