[Lldb-commits] [lldb] c4c0ff6 - [LLDB] Fix warnings in DIL. (#134778)

via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 8 11:37:57 PDT 2025


Author: cmtice
Date: 2025-04-08T11:37:54-07:00
New Revision: c4c0ff686563999176f16a40274586ee0d32c66f

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

LOG: [LLDB] Fix warnings in DIL. (#134778)

This fixes 3 warnings from compiling the DILParser:

DILParser.h:53:12: warning: returning address of local temporary object
[-Wreturn-stack-address]

DILParser.h:119:8: warning: private field 'm_fragile_ivar' is not used
[-Wunused-private-field]

DILParser.h:120:8: warning: private field 'm_check_ptr_vs_member' is not
used [-Wunused-private-field]

Added: 
    

Modified: 
    lldb/include/lldb/ValueObject/DILParser.h
    lldb/source/ValueObject/DILParser.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/ValueObject/DILParser.h b/lldb/include/lldb/ValueObject/DILParser.h
index 9b7a6cd487939..2689c4e625f09 100644
--- a/lldb/include/lldb/ValueObject/DILParser.h
+++ b/lldb/include/lldb/ValueObject/DILParser.h
@@ -50,7 +50,7 @@ class DILDiagnosticError
   }
 
   llvm::ArrayRef<DiagnosticDetail> GetDetails() const override {
-    return {m_detail};
+    return m_detail;
   }
 
   std::string message() const override { return m_detail.rendered; }
@@ -116,8 +116,6 @@ class DILParser {
 
   lldb::DynamicValueType m_use_dynamic;
   bool m_use_synthetic;
-  bool m_fragile_ivar;
-  bool m_check_ptr_vs_member;
 }; // class DILParser
 
 } // namespace lldb_private::dil

diff  --git a/lldb/source/ValueObject/DILParser.cpp b/lldb/source/ValueObject/DILParser.cpp
index a8baba2c06e7a..0bd1430e585a7 100644
--- a/lldb/source/ValueObject/DILParser.cpp
+++ b/lldb/source/ValueObject/DILParser.cpp
@@ -66,8 +66,7 @@ DILParser::DILParser(llvm::StringRef dil_input_expr, DILLexer lexer,
                      llvm::Error &error)
     : m_ctx_scope(frame_sp), m_input_expr(dil_input_expr),
       m_dil_lexer(std::move(lexer)), m_error(error), m_use_dynamic(use_dynamic),
-      m_use_synthetic(use_synthetic), m_fragile_ivar(fragile_ivar),
-      m_check_ptr_vs_member(check_ptr_vs_member) {}
+      m_use_synthetic(use_synthetic) {}
 
 ASTNodeUP DILParser::Run() {
   ASTNodeUP expr = ParseExpression();


        


More information about the lldb-commits mailing list