[Lldb-commits] [lldb] r338976 - Remove duplicated code in CommandObjectQuit

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 5 17:04:52 PDT 2018


Author: teemperor
Date: Sun Aug  5 17:04:51 2018
New Revision: 338976

URL: http://llvm.org/viewvc/llvm-project?rev=338976&view=rev
Log:
Remove duplicated code in CommandObjectQuit

Summary:
We already have the same check directly before, so this code can never be
reached (as seen in the test coverage).

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D50317

Modified:
    lldb/trunk/source/Commands/CommandObjectQuit.cpp

Modified: lldb/trunk/source/Commands/CommandObjectQuit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectQuit.cpp?rev=338976&r1=338975&r2=338976&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectQuit.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectQuit.cpp Sun Aug  5 17:04:51 2018
@@ -86,13 +86,6 @@ bool CommandObjectQuit::DoExecute(Args &
     return false;
   }
 
-  if (command.GetArgumentCount() > 1) {
-    result.AppendError("Too many arguments for 'quit'. Only an optional exit "
-                       "code is allowed");
-    result.SetStatus(eReturnStatusFailed);
-    return false;
-  }
-
   // We parse the exit code argument if there is one.
   if (command.GetArgumentCount() == 1) {
     llvm::StringRef arg = command.GetArgumentAtIndex(0);




More information about the lldb-commits mailing list