[Lldb-commits] [lldb] [LLDB] Fix warnings in DIL. (PR #134778)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 7 20:55:16 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: None (cmtice)
<details>
<summary>Changes</summary>
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]
---
Full diff: https://github.com/llvm/llvm-project/pull/134778.diff
1 Files Affected:
- (modified) lldb/include/lldb/ValueObject/DILParser.h (+5-3)
``````````diff
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/134778
More information about the lldb-commits
mailing list