summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/c
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2016-08-26 18:12:39 +0000
committerSean Callanan <scallanan@apple.com>2016-08-26 18:12:39 +0000
commitfc670cf6d0cea44f3a5d96baaa4755c07b904987 (patch)
treedc59e6396a8e49dd27b4138605d173862ba8be28 /lldb/packages/Python/lldbsuite/test/lang/c
parent58f505ba24761c22314a85874580679c209388b5 (diff)
downloadbcm5719-llvm-fc670cf6d0cea44f3a5d96baaa4755c07b904987.tar.gz
bcm5719-llvm-fc670cf6d0cea44f3a5d96baaa4755c07b904987.zip
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. <rdar://problem/27770298> llvm-svn: 279850
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py4
1 files changed, 3 insertions, 1 deletions
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:
OpenPOWER on IntegriCloud