[Lldb-commits] [PATCH] D104448: [lldb] Remove redundant calls to set eReturnStatusFailed

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 17 06:28:37 PDT 2021


teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

LGTM now, just a small nit about the redundant "error: " string.



================
Comment at: lldb/source/Commands/CommandObjectWatchpoint.cpp:879
     if (command.GetArgumentCount() <= 0) {
-      result.GetErrorStream().Printf("error: required argument missing; "
-                                     "specify your program variable to watch "
-                                     "for\n");
-      result.SetStatus(eReturnStatusFailed);
+      result.AppendError("error: required argument missing; "
+                         "specify your program variable to watch "
----------------
`AppendError` adds the `error: ` prefix so it shouldn't be in the passed message


================
Comment at: lldb/source/Commands/CommandObjectWatchpoint.cpp:901
     if (command.GetArgumentCount() != 1) {
-      result.GetErrorStream().Printf(
-          "error: specify exactly one variable to watch for\n");
-      result.SetStatus(eReturnStatusFailed);
+      result.AppendError("error: specify exactly one variable to watch for\n");
       return false;
----------------
here too


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104448/new/

https://reviews.llvm.org/D104448



More information about the lldb-commits mailing list