[Lldb-commits] [lldb] 7926143 - [lldb] Fix redundant newline in AppendError calls.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 20 23:12:04 PDT 2020


Author: Jonas Devlieghere
Date: 2020-07-20T23:11:56-07:00
New Revision: 7926143fb0a56ae17e06e462d19e0fde48801a5c

URL: https://github.com/llvm/llvm-project/commit/7926143fb0a56ae17e06e462d19e0fde48801a5c
DIFF: https://github.com/llvm/llvm-project/commit/7926143fb0a56ae17e06e462d19e0fde48801a5c.diff

LOG: [lldb] Fix redundant newline in AppendError calls.

AppendError always appends a newline to the given argument, while
AppendErrorWithFormat does not. I've updated the calls to remove the
extra newline.

Added: 
    

Modified: 
    lldb/source/Breakpoint/BreakpointIDList.cpp
    lldb/source/Interpreter/CommandInterpreter.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Breakpoint/BreakpointIDList.cpp b/lldb/source/Breakpoint/BreakpointIDList.cpp
index 95ae60522262..e6a5dceeb93b 100644
--- a/lldb/source/Breakpoint/BreakpointIDList.cpp
+++ b/lldb/source/Breakpoint/BreakpointIDList.cpp
@@ -223,7 +223,7 @@ void BreakpointIDList::FindAndReplaceIDRanges(Args &old_args, Target *target,
       result.AppendError("Invalid breakpoint id range:  Either "
                          "both ends of range must specify"
                          " a breakpoint location, or neither can "
-                         "specify a breakpoint location.\n");
+                         "specify a breakpoint location.");
       result.SetStatus(eReturnStatusFailed);
       return;
     }

diff  --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index 963c1ea76ee8..baceeac7fbae 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -1708,7 +1708,7 @@ bool CommandInterpreter::HandleCommand(const char *command_line,
         command_string = command_line;
         original_command_string = command_line;
         if (m_repeat_command.empty()) {
-          result.AppendError("No auto repeat.\n");
+          result.AppendError("No auto repeat.");
           result.SetStatus(eReturnStatusFailed);
           return false;
         }


        


More information about the lldb-commits mailing list