Author: Michael Buch
Date: 2025-10-02T13:33:21+01:00
New Revision: 7e6d277d3bd10bacc121962637c3c646866e2ca3

URL: 
https://github.com/llvm/llvm-project/commit/7e6d277d3bd10bacc121962637c3c646866e2ca3
DIFF: 
https://github.com/llvm/llvm-project/commit/7e6d277d3bd10bacc121962637c3c646866e2ca3.diff

LOG: [lldb][test] TestStructuredBinding.py: adjust assertion to check for 
compatible compiler version

Requires a compiler with the changes in 
https://github.com/llvm/llvm-project/pull/122265

Added: 
    

Modified: 
    lldb/test/API/lang/cpp/structured-binding/TestStructuredBinding.py

Removed: 
    


################################################################################
diff  --git 
a/lldb/test/API/lang/cpp/structured-binding/TestStructuredBinding.py 
b/lldb/test/API/lang/cpp/structured-binding/TestStructuredBinding.py
index 5f939ecfbef29..882c91d1ce8c8 100644
--- a/lldb/test/API/lang/cpp/structured-binding/TestStructuredBinding.py
+++ b/lldb/test/API/lang/cpp/structured-binding/TestStructuredBinding.py
@@ -99,16 +99,21 @@ def test(self):
         self.expect_expr("ty2", result_value="'z'")
         self.expect_expr("tz2", result_value="10")
 
-        self.expect(
-            "frame variable",
-            substrs=[
-                "tx1 =",
-                "ty1 =",
-                "tz1 =",
-                "tx2 =",
-                "ty2 =",
-                "tz2 =",
-                "mp1 =",
-                "mp2 =",
-            ],
-        )
+        # Older versions of Clang marked structured binding variables
+        # as artificial, and thus LLDB wouldn't display them.
+        if self.expectedCompiler(["clang"]) and self.expectedCompilerVersion(
+            [">=", "22.0"]
+        ):
+            self.expect(
+                "frame variable",
+                substrs=[
+                    "tx1 =",
+                    "ty1 =",
+                    "tz1 =",
+                    "tx2 =",
+                    "ty2 =",
+                    "tz2 =",
+                    "mp1 =",
+                    "mp2 =",
+                ],
+            )


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to