================
@@ -6754,12 +6754,12 @@ size_t TypeSystemClang::GetIndexOfChildMemberWithName(
           llvm::StringRef field_name = field->getName();
           if (field_name.empty()) {
             CompilerType field_type = GetType(field->getType());
+            std::vector<uint32_t> save_indices = child_indexes;
----------------
Michael137 wrote:

An alternative to this would be *not* clearing the vector inside of 
`TypeSystemClang::GetIndexForRecordChild` on failure. And instead it could 
return an `llvm::Expected<uint32_t>`. So then `GetIndexOfChildMemberWithName` 
can bail out on failure. That feels easier to reason about. Wdyt?

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

Reply via email to