Skip to content

Conversation

@JDevlieghere
Copy link
Member

AppendError ends up trimming this "\n" from the end of the string, then putting another on on. So there's no reason to keep appending the newline in CommandObjectMultiword::Execute.

AppendError ends up trimming this "\n" from the end of the string, then
putting another on on. So there's no reason to keep appending the
newline in CommandObjectMultiword::Execute.
@llvmbot
Copy link
Member

llvmbot commented Dec 9, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

AppendError ends up trimming this "\n" from the end of the string, then putting another on on. So there's no reason to keep appending the newline in CommandObjectMultiword::Execute.


Full diff: https://github.com/llvm/llvm-project/pull/171531.diff

1 Files Affected:

  • (modified) lldb/source/Commands/CommandObjectMultiword.cpp (-1)
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index e08b33cdce940..a881b19119280 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -204,7 +204,6 @@ void CommandObjectMultiword::Execute(const char *args_string,
                     " Use \"help " + GetCommandName() + "\" to find out more.")
             .str());
   }
-  error_msg.append("\n");
   result.AppendError(error_msg);
 }
 

@JDevlieghere JDevlieghere merged commit 097ac33 into llvm:main Dec 10, 2025
12 checks passed
@JDevlieghere JDevlieghere deleted the remove-pointless-newlien branch December 10, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants