[Lldb-commits] [lldb] [lldb] Make single-argument Address constructor explicit (NFC) (PR #189035)

Sergei Barannikov via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 27 09:45:55 PDT 2026


================
@@ -49,8 +49,8 @@ BreakpointLocation::BreakpointLocation(break_id_t loc_id, Breakpoint &owner,
 
 BreakpointLocation::BreakpointLocation(break_id_t loc_id, Breakpoint &owner)
     : m_should_resolve_indirect_functions(false), m_is_reexported(false),
-      m_is_indirect(false), m_address(LLDB_INVALID_ADDRESS), m_owner(owner),
-      m_condition_hash(0), m_loc_id(loc_id), m_hit_counter() {
+      m_is_indirect(false), m_owner(owner), m_condition_hash(0),
----------------
s-barannikov wrote:

> I assume this is relying on `Address` being `LLDB_INVALID_ADDRESS` when default constructed?

Yes

> If so, should we drop the other ones as well and rely on inline defaults? Anyway, that might be better suited for a separate PR.

Most of the rest are scalar types and don't have in-class initializers, so I'd have to touch the *.h file.
I could do that in a separate PR, but I see *a lot* of redundant member initializers everywhere; fixing them all would be a huge change (if manageable). E.g., one of StackFrame constructors:

<img width="987" height="521" alt="Image" src="https://github.com/user-attachments/assets/fd095d32-9708-4d82-8098-8be2cc9c0ca3" />
All gray initializers are redundant here.


https://github.com/llvm/llvm-project/pull/189035


More information about the lldb-commits mailing list