[Lldb-commits] [lldb] 2ebe30c - [lldb][NFC] Address some review feedback for D80775 ('command script delete' completion)
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 4 01:30:49 PDT 2020
Author: Raphael Isemann
Date: 2020-06-04T10:30:27+02:00
New Revision: 2ebe30c6e4ab1d65fc8605051eb528fc26ffc621
URL: https://github.com/llvm/llvm-project/commit/2ebe30c6e4ab1d65fc8605051eb528fc26ffc621
DIFF: https://github.com/llvm/llvm-project/commit/2ebe30c6e4ab1d65fc8605051eb528fc26ffc621.diff
LOG: [lldb][NFC] Address some review feedback for D80775 ('command script delete' completion)
In the similar review D81128, Jonas pointed out some style errors that also
apply to D80775 (which is already committed). Also applying the changes
suggested there to this code.
Added:
Modified:
lldb/source/Commands/CommandObjectCommands.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index 8f72ed7177e0..8c78803ab159 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1770,14 +1770,11 @@ class CommandObjectCommandsScriptDelete : public CommandObjectParsed {
void
HandleArgumentCompletion(CompletionRequest &request,
OptionElementVector &opt_element_vector) override {
-
if (!m_interpreter.HasCommands() || request.GetCursorIndex() != 0)
return;
- const auto &user_dict = m_interpreter.GetUserCommands();
- for (auto pos = user_dict.begin(); pos != user_dict.end(); ++pos) {
- request.TryCompleteCurrentArg(pos->first, pos->second->GetHelp());
- }
+ for (const auto &c : m_interpreter.GetUserCommands())
+ request.TryCompleteCurrentArg(c.first, c.second->GetHelp());
}
protected:
More information about the lldb-commits
mailing list