]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: sync prune.exp with GCC
authorJason Merrill <jason@redhat.com>
Tue, 11 Nov 2025 13:15:31 +0000 (18:45 +0530)
committerJason Merrill <jason@redhat.com>
Wed, 12 Nov 2025 03:35:41 +0000 (09:05 +0530)
I needed to add module context to dg-prune for libstdc++, and figured it
made sense to sync it with the GCC version rather than maintain slightly
different approaches to stripping the same messages.

libstdc++-v3/ChangeLog:

* testsuite/lib/prune.exp: Sync with gcc prune.exp.

libstdc++-v3/testsuite/lib/prune.exp

index a9a29937e43adc17a228a63bb1a950485fa76ece..93d3d526019b7a09079c079d4077ccdb151cb7e0 100644 (file)
@@ -53,12 +53,13 @@ proc libstdc++-dg-prune { system text } {
     regsub -all "(^|\n)\[^\n\]*:   (recursively )?required \[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*:   . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*:   in .constexpr. expansion \[^\n\]*" $text "" text
-    regsub -all "(^|\n)\[^\n\]*:   in requirements  .with\[^\n\]*" $text "" text
-    regsub -all "(^|\n)\[^\n\]*:   in requirements with\[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*:   in requirements \[^\n\]*" $text "" text
     regsub -all "(^|\n)    inlined from \[^\n\]*" $text "" text
-    # Why doesn't GCC need these to strip header context?
-    regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
-    regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text
+
+    # Diagnostic inclusion stack
+    regsub -all "(^|\n)(In file)?\[ \]+included from \[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[ \]+from \[^\n\]*" $text "" text
+    regsub -all "(^|\n)(In|of) module( \[^\n \]*,)? imported at \[^\n\]*" $text "" text
 
     # Ignore informational notes.
     #TODO As this isn't even using 'gcc-dg.exp', cannot consider its