[Lldb-commits] [lldb] add explicit default initialization to DemangledNameInfo to remove warning (PR #141790)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Wed May 28 08:20:24 PDT 2025
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/141790
https://github.com/llvm/llvm-project/pull/140762 introduces some compilation warnings in `lldb/unittests/Core/MangledTest.cpp`. This patch adds explicit default initialization to `DemangledNameInfo` to suppress those warnings.
We only had the default initialization values to `PrefixRange` and `SuffixRange` because they are the only _optional_ fields of the structure.
>From 788cabe234336be7168996805f40da7f26fdbec9 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Wed, 28 May 2025 16:17:34 +0100
Subject: [PATCH] add explicit default initialization to DemangledNameInfo to
remove warning
---
lldb/include/lldb/Core/DemangledNameInfo.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lldb/include/lldb/Core/DemangledNameInfo.h b/lldb/include/lldb/Core/DemangledNameInfo.h
index ab9bb3e211b66..e26adc7035a56 100644
--- a/lldb/include/lldb/Core/DemangledNameInfo.h
+++ b/lldb/include/lldb/Core/DemangledNameInfo.h
@@ -62,12 +62,12 @@ struct DemangledNameInfo {
/// Indicates the [start, end) of the function's prefix. This is a
/// catch-all range for anything that is not tracked by the rest of
/// the pairs.
- std::pair<size_t, size_t> PrefixRange;
+ std::pair<size_t, size_t> PrefixRange{};
/// Indicates the [start, end) of the function's suffix. This is a
/// catch-all range for anything that is not tracked by the rest of
/// the pairs.
- std::pair<size_t, size_t> SuffixRange;
+ std::pair<size_t, size_t> SuffixRange{};
/// Returns \c true if this object holds a valid basename range.
bool hasBasename() const {
More information about the lldb-commits
mailing list