Author: Michael Buch
Date: 2026-02-23T16:26:30Z
New Revision: b9143faf46281b877513fdfbb49969e3ca8371af

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

LOG: [lldb][test] TestDataFormatterStdValarray: relax expected error message 
check

After https://github.com/llvm/llvm-project/pull/182297, we started generated 
`-gsimple-template-names` debug-info by default on macOS. The test was 
expecting template parameters in the error message. But with 
`simple-template-names` typenames would not contain template parameters (unless 
LLDB reconstructs them to do so). This formatter test was expecting template 
parameters, which would fail on macOS > 26.

Because the test is just concerned with checking that the `std::valarray` 
formatter works as expected (not that LLDB can retrieve typenames with/without 
template names), this patch relaxes the assertion.

In a follow-up we should fix up any type-name printing that would break with 
`simple-template-names`.

Added: 
    

Modified: 
    
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py

Removed: 
    


################################################################################
diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py
index 2d70f9ef88b8f..f94be3a658efd 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/valarray/TestDataFormatterStdValarray.py
@@ -51,7 +51,7 @@ def do_test(self):
         self.expect(
             "frame variable va_int[4]",
             error=True,
-            substrs=['array index 4 is not valid for "(valarray<int>) 
va_int"'],
+            substrs=['array index 4 is not valid for "(valarray'],
         )
 
         self.expect(
@@ -74,7 +74,7 @@ def do_test(self):
         self.expect(
             "frame variable va_double[4]",
             error=True,
-            substrs=['array index 4 is not valid for "(valarray<double>) 
va_double"'],
+            substrs=['array index 4 is not valid for "(valarray'],
         )
 
         #
@@ -101,7 +101,7 @@ def do_test(self):
         self.expect(
             "frame variable sa[4]",
             error=True,
-            substrs=['array index 4 is not valid for "(slice_array<int>) sa"'],
+            substrs=['array index 4 is not valid for "(slice_array'],
         )
 
         #
@@ -126,7 +126,7 @@ def do_test(self):
         self.expect(
             "frame variable ga[3]",
             error=True,
-            substrs=['array index 3 is not valid for "(gslice_array<int>) 
ga"'],
+            substrs=['array index 3 is not valid for "(gslice_array'],
         )
         #
         # std::mask_array
@@ -148,7 +148,7 @@ def do_test(self):
         self.expect(
             "frame variable ma[2]",
             error=True,
-            substrs=['array index 2 is not valid for "(mask_array<int>) ma"'],
+            substrs=['array index 2 is not valid for "(mask_array'],
         )
 
         #
@@ -173,7 +173,7 @@ def do_test(self):
         self.expect(
             "frame variable ia[3]",
             error=True,
-            substrs=['array index 3 is not valid for "(indirect_array<int>) 
ia"'],
+            substrs=['array index 3 is not valid for "(indirect_array'],
         )
 
     @add_test_categories(["libc++"])


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

Reply via email to