[Lldb-commits] [PATCH] D159031: [LLDB] Fix IOHandlerEditline::GetCurrentLines()
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 29 14:45:31 PDT 2023
wallace added inline comments.
================
Comment at: lldb/source/Expression/REPL.cpp:535
+ if (current_line_idx < current_lines.GetSize()) {
+ for (uint32_t i = 0; i < current_line_idx; ++i) {
+ const char *line_cstr = current_lines.GetStringAtIndex(i);
----------------
aprantl wrote:
> `for (const char *line_cstr : current_lines)` ?
actually the current code is fine because we don't want to iterate through the entire set, we just want the first `current_line_idx + 1` elements
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159031/new/
https://reviews.llvm.org/D159031
More information about the lldb-commits
mailing list