================
@@ -74,24 +74,48 @@ struct DemangledNameInfo {
     return BasenameRange.second > BasenameRange.first;
   }
 
+  /// Returns \c true if `BasenameRange` is empty.
+  bool isBasenameEmpty() const {
+    return BasenameRange.first == BasenameRange.second;
----------------
Michael137 wrote:

Hmm I think I'd prefer having only a single API that tells us "do we have a 
valid entity or not". E.g., `hasValidQualifiers`/`hasValidBasename`/etc. Is 
there a reason we can't just modify the existing `hasXXX` helpers to be 
`Range.second >= Range.first`? If we are going to call `!hasXXX && !isEmpty` 
then might as well fold them into a single API.

But if there's reasons we can't do that, this seems fine too

https://github.com/llvm/llvm-project/pull/144731
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to