Skip to content

Commit c4c0ff6

Browse files
authored
[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]
1 parent 8364766 commit c4c0ff6

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lldb/include/lldb/ValueObject/DILParser.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class DILDiagnosticError
5050
}
5151

5252
llvm::ArrayRef<DiagnosticDetail> GetDetails() const override {
53-
return {m_detail};
53+
return m_detail;
5454
}
5555

5656
std::string message() const override { return m_detail.rendered; }
@@ -116,8 +116,6 @@ class DILParser {
116116

117117
lldb::DynamicValueType m_use_dynamic;
118118
bool m_use_synthetic;
119-
bool m_fragile_ivar;
120-
bool m_check_ptr_vs_member;
121119
}; // class DILParser
122120

123121
} // namespace lldb_private::dil

lldb/source/ValueObject/DILParser.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ DILParser::DILParser(llvm::StringRef dil_input_expr, DILLexer lexer,
6666
llvm::Error &error)
6767
: m_ctx_scope(frame_sp), m_input_expr(dil_input_expr),
6868
m_dil_lexer(std::move(lexer)), m_error(error), m_use_dynamic(use_dynamic),
69-
m_use_synthetic(use_synthetic), m_fragile_ivar(fragile_ivar),
70-
m_check_ptr_vs_member(check_ptr_vs_member) {}
69+
m_use_synthetic(use_synthetic) {}
7170

7271
ASTNodeUP DILParser::Run() {
7372
ASTNodeUP expr = ParseExpression();

0 commit comments

Comments
 (0)