[Lldb-commits] [lldb] r187499 - Updated the LLDB rvalue reference test to cross-reference with a bugzilla report,

Ashok Thirumurthi ashok.thirumurthi at intel.com
Wed Jul 31 08:58:01 PDT 2013


Author: athirumu
Date: Wed Jul 31 10:58:01 2013
New Revision: 187499

URL: http://llvm.org/viewvc/llvm-project?rev=187499&view=rev
Log:
Updated the LLDB rvalue reference test to cross-reference with a bugzilla report,
provide more detail on compiler compatibility, and to illustrate that this is
an issue with expression evaluation.

- Note that clang doesn't emit DW_TAG_const_type, which might be okay if there's
no such thing as a non-const rvalue reference.  How about foo(make_int())?

Modified:
    lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py

Modified: lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py?rev=187499&r1=187498&r2=187499&view=diff
==============================================================================
--- lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py (original)
+++ lldb/trunk/test/lang/cpp/rvalue-references/TestRvalueReferences.py Wed Jul 31 10:58:01 2013
@@ -6,7 +6,7 @@ import lldb
 from lldbtest import *
 import lldbutil
 
-class CPPThisTestCase(TestBase):
+class RvalueReferencesTestCase(TestBase):
     
     mydir = os.path.join("lang", "cpp", "rvalue-references")
     
@@ -20,8 +20,9 @@ class CPPThisTestCase(TestBase):
         self.static_method_commands()
 
     #rdar://problem/11479676
-    @expectedFailureClang
+    @expectedFailureClang # pr16762: Expression evaluation of an rvalue-reference does not show the correct type.
     @expectedFailureGcc # GCC (4.7) does not emit correct DWARF tags for rvalue-references
+    @expectedFailureIcc # ICC (13.1, 14-beta) do not emit DW_TAG_rvalue_reference_type.
     @dwarf_test
     def test_with_dwarf_and_run_command(self):
         """Test that rvalues are supported in the C++ expression parser"""
@@ -43,8 +44,14 @@ class CPPThisTestCase(TestBase):
 
         self.runCmd("process launch", RUN_SUCCEEDED)
 
+        # Note that clang as of r187480 doesn't emit DW_TAG_const_type, unlike gcc 4.8.1
+        # With gcc 4.8.1, lldb reports the type as (int &&const)
+        self.expect("frame variable i",
+                    startstr = "(int &&",
+                    substrs = ["i = 0x", "&i = 3"])
+
         self.expect("expression -- i",
-                    startstr = "(int &&) $0 =",
+                    startstr = "(int &&",
                     substrs = ["3"])
 
         self.expect("breakpoint delete 1")





More information about the lldb-commits mailing list