================ @@ -414,13 +417,17 @@ lldb::ValueObjectSP ValueObject::GetChildAtIndexPath( if (idxs.size() == 0) return GetSP(); ValueObjectSP root(GetSP()); + + size_t current_index = 0; for (std::pair<size_t, bool> idx : idxs) { root = root->GetChildAtIndex(idx.first, idx.second); if (!root) { if (index_of_error) - *index_of_error = idx.first; + *index_of_error = current_index; return root; } + + current_index += 1; ---------------- PortalPete wrote:
Right, but if we're not going with `+= 1` (for consistency and/or informal style?), then I prefer to use the pre-increment operator. Or are you saying we should just stick with `+= 1` now? https://github.com/llvm/llvm-project/pull/74413 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits