[Lldb-commits] [PATCH] D50317: Remove duplicated code in CommandObjectQuit

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 5 15:49:48 PDT 2018


teemperor created this revision.

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


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D50317

Files:
  source/Commands/CommandObjectQuit.cpp


Index: source/Commands/CommandObjectQuit.cpp
===================================================================
--- source/Commands/CommandObjectQuit.cpp
+++ source/Commands/CommandObjectQuit.cpp
@@ -86,13 +86,6 @@
     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50317.159237.patch
Type: text/x-patch
Size: 632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180805/1ac42175/attachment.bin>


More information about the lldb-commits mailing list