summaryrefslogtreecommitdiffstats
path: root/lldb/test/expression_command
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-07-08 18:03:41 +0000
committerSean Callanan <scallanan@apple.com>2015-07-08 18:03:41 +0000
commit83b8ad0eaa7926c243e799b6166d285614e4e2d0 (patch)
treef105fc1201e3bfc3b4d2279a68bf6d92df352ca0 /lldb/test/expression_command
parente086afa66789f3072da5651bc09a6f1963a55686 (diff)
downloadbcm5719-llvm-83b8ad0eaa7926c243e799b6166d285614e4e2d0.tar.gz
bcm5719-llvm-83b8ad0eaa7926c243e799b6166d285614e4e2d0.zip
Fixed a serious bug in DeportType where the types could retain DeclContexts that
pointed into the artificial function constructed for the expression. I now make anything that pointed to the function as its DeclContext be global while the copy occurs; afterward I restored the old DeclContext. Added a testcase that make sure that this works properly and doesn't crash anything. <rdar://problem/21049838> llvm-svn: 241695
Diffstat (limited to 'lldb/test/expression_command')
-rw-r--r--lldb/test/expression_command/persistent_types/TestPersistentTypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/expression_command/persistent_types/TestPersistentTypes.py b/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
index ab25f4f9ee0..65ab677a339 100644
--- a/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
+++ b/lldb/test/expression_command/persistent_types/TestPersistentTypes.py
@@ -46,6 +46,12 @@ class PersistenttypesTestCase(TestBase):
self.expect("expression struct { int a; int b; } x = { 2, 3 }; x",
substrs = ['a = 2', 'b = 3'])
+ self.expect("expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
+ substrs = ['x = 2', 'y = 1', 'z = 3'])
+
+ self.expect("expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
+ substrs = ['x = 2', 'y = 1', 'z = 3'])
+
if __name__ == '__main__':
import atexit
OpenPOWER on IntegriCloud