[Lldb-commits] [lldb] 502a06f - [lldb] Make TestExprDiagnostics.py pass again after enabling Fix-Its in test
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 30 04:52:27 PDT 2020
Author: Raphael Isemann
Date: 2020-03-30T13:52:09+02:00
New Revision: 502a06fcdafa637a9890da16c2734bc1a36010f6
URL: https://github.com/llvm/llvm-project/commit/502a06fcdafa637a9890da16c2734bc1a36010f6
DIFF: https://github.com/llvm/llvm-project/commit/502a06fcdafa637a9890da16c2734bc1a36010f6.diff
LOG: [lldb] Make TestExprDiagnostics.py pass again after enabling Fix-Its in test
Commit 83c81c0a469482888482983c302c09c02680ae7c enabled Fix-Its for top-level
expressions which change the error message of this test here as Clang comes
up with a strange Fix-It for this expression. This patch just changes the
test to declare a void variable so that Clang doesn't see a way to
recover with a Fix-It and change the error message.
Added:
Modified:
lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
index da29d7b2c1af..b5eb552badb5 100644
--- a/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
+++ b/lldb/test/API/commands/expression/diagnostics/TestExprDiagnostics.py
@@ -60,10 +60,10 @@ def test_source_and_caret_printing(self):
self.assertIn("<user expression 3>:1:10", value.GetError().GetCString())
# Multiline top-level expressions.
- value = frame.EvaluateExpression("void x() {}\nvoid foo(unknown_type x) {}", top_level_opts)
+ value = frame.EvaluateExpression("void x() {}\nvoid foo;", top_level_opts)
self.assertFalse(value.GetError().Success())
- self.assertIn("\nvoid foo(unknown_type x) {}\n ^\n", value.GetError().GetCString())
- self.assertIn("<user expression 4>:2:10", value.GetError().GetCString())
+ self.assertIn("\nvoid foo;\n ^", value.GetError().GetCString())
+ self.assertIn("<user expression 4>:2:6", value.GetError().GetCString())
# Test that we render Clang's 'notes' correctly.
value = frame.EvaluateExpression("struct SFoo{}; struct SFoo { int x; };", top_level_opts)
More information about the lldb-commits
mailing list