[Lldb-commits] [lldb] [Demangling] Refactor Demangler range tracking (PR #140762)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Tue May 27 06:47:36 PDT 2025
================
@@ -59,10 +59,24 @@ struct DemangledNameInfo {
/// \endcode
std::pair<size_t, size_t> QualifiersRange;
+ /// 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;
+
+ /// 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;
+
/// Returns \c true if this object holds a valid basename range.
bool hasBasename() const {
- return BasenameRange.second > BasenameRange.first &&
- BasenameRange.second > 0;
+ return BasenameRange.second > BasenameRange.first;
----------------
charles-zablit wrote:
It was not needed but since I added the `hasArguments` method I wanted to remove the redundant `>0` check.
Since the start and end range are unsigned, if `end > start`, then `end` is always greater than `0`, which is why I removed the second check. I might be missing something.
https://github.com/llvm/llvm-project/pull/140762
More information about the lldb-commits
mailing list