This revision was automatically updated to reflect the committed changes.
Closed by commit rL263166: Fixed ValueObject::GetExpressionPath() for paths 
including anonymous… (authored by mamai).

Changed prior to commit:
  http://reviews.llvm.org/D18005?vs=50192&id=50353#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D18005

Files:
  lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
  lldb/trunk/source/Core/ValueObject.cpp

Index: lldb/trunk/source/Core/ValueObject.cpp
===================================================================
--- lldb/trunk/source/Core/ValueObject.cpp
+++ lldb/trunk/source/Core/ValueObject.cpp
@@ -2536,7 +2536,7 @@
         if (!is_deref_of_parent)
         {
             ValueObject *non_base_class_parent = GetNonBaseClassParent();
-            if (non_base_class_parent)
+            if (non_base_class_parent && 
!non_base_class_parent->GetName().IsEmpty())
             {
                 CompilerType non_base_class_parent_compiler_type = 
non_base_class_parent->GetCompilerType();
                 if (non_base_class_parent_compiler_type)
Index: 
lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
@@ -112,6 +112,17 @@
         if not error.Success() or value != 0:
             self.fail ("failed to get the correct value for element a in n")
 
+    def test_nest_flat(self):
+        self.build()
+        self.common_setup(self.line2)
+
+        # These should display correctly.
+        self.expect('frame variable n --flat',
+                    substrs = ['n.a = 0',
+                               'n.b = 2',
+                               'n.foo.c = 0',
+                               'n.foo.d = 4'])
+
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)


Index: lldb/trunk/source/Core/ValueObject.cpp
===================================================================
--- lldb/trunk/source/Core/ValueObject.cpp
+++ lldb/trunk/source/Core/ValueObject.cpp
@@ -2536,7 +2536,7 @@
         if (!is_deref_of_parent)
         {
             ValueObject *non_base_class_parent = GetNonBaseClassParent();
-            if (non_base_class_parent)
+            if (non_base_class_parent && !non_base_class_parent->GetName().IsEmpty())
             {
                 CompilerType non_base_class_parent_compiler_type = non_base_class_parent->GetCompilerType();
                 if (non_base_class_parent_compiler_type)
Index: lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
===================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
+++ lldb/trunk/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
@@ -112,6 +112,17 @@
         if not error.Success() or value != 0:
             self.fail ("failed to get the correct value for element a in n")
 
+    def test_nest_flat(self):
+        self.build()
+        self.common_setup(self.line2)
+
+        # These should display correctly.
+        self.expect('frame variable n --flat',
+                    substrs = ['n.a = 0',
+                               'n.b = 2',
+                               'n.foo.c = 0',
+                               'n.foo.d = 4'])
+
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to