Conversation
@llvm/pr-subscribers-lldb Author: Charles Zablit (charles-zablit) Changes#140762 introduces some compilation warnings in We only had the default initialization values to Full diff: https://.com/llvm/llvm-project/pull/141790.diff 1 Files Affected:
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 {
|
The warning in question is |
…emove warning" This reverts commit 788cabe.
I agree, this is more explicit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
@charles-zablit I've verified that this PR fixes |
711a177
into llvm:main Uh oh!
There was an error while loading. Please reload this page.
…rning (llvm#141790) llvm#140762 introduces some compilation warnings in `lldb/unittests/Core/MangledTest.cpp`. This 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.
…rning (llvm#141790) llvm#140762 introduces some compilation warnings in `lldb/unittests/Core/MangledTest.cpp`. This 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.
* [Demangling] Refactor Demangler range tracking (llvm#140762) This PR is a subset of the commits made in #10710. The most notable change is the addition of `PrefixRange` and `SuffixRange` which are a catch-all to track anything after or before a function's demangled name. In the case of Swift, this allows to add support for name highlighting without having to track the range of the scope and specifiers of a function (this will come in another PR). * add explicit default initialization to DemangledNameInfo to remove warning (llvm#141790) llvm#140762 introduces some compilation warnings in `lldb/unittests/Core/MangledTest.cpp`. This 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.
…rning (llvm#141790) llvm#140762 introduces some compilation warnings in `lldb/unittests/Core/MangledTest.cpp`. This 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.
#140762 introduces some compilation warnings in
lldb/unittests/Core/MangledTest.cpp
. This adds explicit default initialization toDemangledNameInfo
to suppress those warnings.We only had the default initialization values to
PrefixRange
andSuffixRange
because they are the only optional fields of the structure.