-
Notifications
You must be signed in to change notification settings - Fork 13.7k
add explicit default initialization to DemangledNameInfo to remove warning #141790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add explicit default initialization to DemangledNameInfo to remove warning #141790
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://github.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 |
Please feel free to merge when possible, as I do not have commit access yet. |
…rning (llvm#141790) llvm#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.
…rning (llvm#141790) llvm#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.
* [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 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.
…rning (llvm#141790) llvm#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.
#140762 introduces some compilation warnings in
lldb/unittests/Core/MangledTest.cpp
. This patch 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.