gedatsu217 added inline comments.
================ Comment at: lldb/source/Interpreter/CommandInterpreter.cpp:1875-1878 + if (entry.startswith(line)) { + llvm::StringRef res = entry.substr(line.size()); + result = res.str(); + return result; ---------------- labath wrote: > ``` > if (entry.consume_front(line)) { > result = entry.str(); > return result; // Why is this returning the result both as a proper return > value and a by-ref argument? > } > ``` That is because using the llvm::Optional as a return value instead of void would make it more obvious what the function returns in case there is no suggestion. We've discussed this issue before, so please see the comments above. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81001/new/ https://reviews.llvm.org/D81001 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits