[lldb] Remove trailing newlines from AppendErrorWithFormat calls (part 3) (#193527)

Follow up to #193168.

This call adds a newline if there isn't one. Changing these will
eventually let us always add a newline, which is in line with
the other methods on CommandReturnObject.

This is a small part of calls found with:
* VSCode search for
`(\.AppendErrorWithFormat\(([\s\r\n]+)?"(?:(?:\\.|[^"\\])*))\\n"` and
replace with `$1"`.
* Asserting that the last character of the format string is not a
newline.
* Manual inspection.
This commit is contained in:
David Spickett authored and GitHub committed 2026-04-23 09:37:59 +01:00
1 parent 9baca01261
commit 1bf0787a16
12 files changed
+120 -128

No files matched your search

@@ -862,8 +862,8 @@ bool ScriptInterpreterPythonImpl::ExecuteOneLine(
// The one-liner failed. Append the error message.
if (result) {
result->AppendErrorWithFormat(
"python failed attempting to evaluate '%s'\n", command_str.c_str());
result->AppendErrorWithFormat("python failed attempting to evaluate '%s'",
command_str.c_str());
}
return false;
}