From fc670cf6d0cea44f3a5d96baaa4755c07b904987 Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Fri, 26 Aug 2016 18:12:39 +0000 Subject: Don't crash when trying to capture persistent variables in a block. Reports an error instead. We can fix this later to make persistent variables work, but right now we hit an LLVM assertion if we get this wrong. llvm-svn: 279850 --- lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test') diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py index 0cc9456af32..e31b56c06fb 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py @@ -57,8 +57,10 @@ class BlocksTestCase(TestBase): self.launch_common() self.runCmd("expression int (^$add)(int, int) = ^int(int a, int b) { return a + b; };") - self.expect("expression $add(2,3)", VARIABLES_DISPLAYED_CORRECTLY, substrs = [" = 5"]) + + self.runCmd("expression int $a = 3") + self.expect("expression int (^$addA)(int) = ^int(int b) { return $a + b; };", "Proper error is reported on capture", error=True) def wait_for_breakpoint(self): if self.is_started == False: -- cgit v1.2.3