Skip to content

Commit 377d5d2

Browse files
authored
Merge pull request #747 from Teemperor/BackportStaticInitFIx
[lldb] Improve error message when running static initializers in an e…
2 parents 22687c1 + 9f451dd commit 377d5d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ def test_failing_init(self):
3030

3131
# FIXME: This error message is not even remotely helpful.
3232
self.expect("expr -p -- struct Foo2 { Foo2() { do_abort(); } }; Foo2 f;", error=True,
33-
substrs=["error: couldn't run static initializers: couldn't run static initializer:"])
33+
substrs=["error: couldn't run static initializer:"])

lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ bool ClangUserExpression::Parse(DiagnosticManager &diagnostic_manager,
658658
const char *error_cstr = static_init_error.AsCString();
659659
if (error_cstr && error_cstr[0])
660660
diagnostic_manager.Printf(eDiagnosticSeverityError,
661-
"couldn't run static initializers: %s\n",
661+
"%s\n",
662662
error_cstr);
663663
else
664664
diagnostic_manager.PutString(eDiagnosticSeverityError,

0 commit comments

Comments
 (0)