https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/134778
>From a683bad89abeef9d1adacc99bb6ba3aa3b75a35e Mon Sep 17 00:00:00 2001 From: Caroline Tice <cmt...@google.com> Date: Mon, 7 Apr 2025 20:51:08 -0700 Subject: [PATCH 1/2] [LLDB] Fix warnings in DIL. 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] --- lldb/include/lldb/ValueObject/DILParser.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lldb/include/lldb/ValueObject/DILParser.h b/lldb/include/lldb/ValueObject/DILParser.h index 9b7a6cd487939..d1a991c2cc94c 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,10 @@ class DILParser { lldb::DynamicValueType m_use_dynamic; bool m_use_synthetic; - bool m_fragile_ivar; - bool m_check_ptr_vs_member; + // The following are not currently used, but will be used as more + // functionality is added to DIL. + bool m_fragile_ivar __attribute__((unused)); + bool m_check_ptr_vs_member __attribute__((unused)); }; // class DILParser } // namespace lldb_private::dil >From 3708e972dcd0ecd191e5744a1f62af0e504e0775 Mon Sep 17 00:00:00 2001 From: Caroline Tice <cmt...@google.com> Date: Tue, 8 Apr 2025 08:28:51 -0700 Subject: [PATCH 2/2] Delete currently unused class members. --- lldb/include/lldb/ValueObject/DILParser.h | 4 ---- lldb/source/ValueObject/DILParser.cpp | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lldb/include/lldb/ValueObject/DILParser.h b/lldb/include/lldb/ValueObject/DILParser.h index d1a991c2cc94c..2689c4e625f09 100644 --- a/lldb/include/lldb/ValueObject/DILParser.h +++ b/lldb/include/lldb/ValueObject/DILParser.h @@ -116,10 +116,6 @@ class DILParser { lldb::DynamicValueType m_use_dynamic; bool m_use_synthetic; - // The following are not currently used, but will be used as more - // functionality is added to DIL. - bool m_fragile_ivar __attribute__((unused)); - bool m_check_ptr_vs_member __attribute__((unused)); }; // 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(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits