[Lldb-commits] [lldb] [lldb] add has methods to all DemangledNameInfo attributes (PR #144549)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 17 08:40:33 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Charles Zablit (charles-zablit)
<details>
<summary>Changes</summary>
Add `hasX` methods to all the attributes of `DemangledNameInfo`.
---
Full diff: https://github.com/llvm/llvm-project/pull/144549.diff
1 Files Affected:
- (modified) lldb/include/lldb/Core/DemangledNameInfo.h (+19)
``````````diff
diff --git a/lldb/include/lldb/Core/DemangledNameInfo.h b/lldb/include/lldb/Core/DemangledNameInfo.h
index 4b5ba5e42b3b1..a2f3fde90c611 100644
--- a/lldb/include/lldb/Core/DemangledNameInfo.h
+++ b/lldb/include/lldb/Core/DemangledNameInfo.h
@@ -73,6 +73,25 @@ struct DemangledNameInfo {
bool hasBasename() const {
return BasenameRange.second > BasenameRange.first;
}
+
+ /// Returns \c true if this object holds a valid scope range.
+ bool hasScope() const { return ScopeRange.second > ScopeRange.first; }
+
+ /// Returns \c true if this object holds a valid arguments range.
+ bool hasArguments() const {
+ return ArgumentsRange.second > ArgumentsRange.first;
+ }
+
+ /// Returns \c true if this object holds a valid qualifiers range.
+ bool hasQualifiers() const {
+ return QualifiersRange.second > QualifiersRange.first;
+ }
+
+ /// Returns \c true if this object holds a valid prefix range.
+ bool hasPrefix() const { return PrefixRange.second > PrefixRange.first; }
+
+ /// Returns \c true if this object holds a valid suffix range.
+ bool hasSuffix() const { return SuffixRange.second > SuffixRange.first; }
};
/// An OutputBuffer which keeps a record of where certain parts of a
``````````
</details>
https://github.com/llvm/llvm-project/pull/144549
More information about the lldb-commits
mailing list