]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix type printers for Library Fundamentals types
authorJonathan Wakely <jwakely@redhat.com>
Mon, 15 Jan 2018 12:38:56 +0000 (12:38 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 15 Jan 2018 12:38:56 +0000 (12:38 +0000)
* python/libstdcxx/v6/printers.py (register_type_printers): Remove
printer for experimental::any. Fix printers for experimental::optional
and experimental::basic_string_view.

From-SVN: r256699

libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py

index d67a0000005ed1718b0ef11b9d2320f2ba073f92..8db45525a7d6b695a81bb0b556fbd6ab9f2e805b 100644 (file)
@@ -1,5 +1,9 @@
 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
 
+       * python/libstdcxx/v6/printers.py (register_type_printers): Remove
+       printer for experimental::any. Fix printers for experimental::optional
+       and experimental::basic_string_view.
+
        Backport from mainline
        2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
 
index 040715a9073ce414c70c4238c4d520d2e90a513d..ec3feafc5deda446195b006ae92e8a06eb52d006 100644 (file)
@@ -1154,7 +1154,7 @@ class TemplateTypePrinter(object):
     Recognizes type names that match a regular expression.
     Replaces them with a formatted string which can use replacement field
     {N} to refer to the \N subgroup of the regex match.
-    Type printers are recusively applied to the subgroups.
+    Type printers are recursively applied to the subgroups.
 
     This allows recognizing e.g. "std::vector<(.*), std::allocator<\\1> >"
     and replacing it with "std::vector<{1}>", omitting the template argument
@@ -1335,10 +1335,10 @@ def register_type_printers(obj):
     # strip the "fundamentals_v1" inline namespace from these types
     add_one_template_type_printer(obj, 'optional<T>',
             'experimental::fundamentals_v1::optional<(.*)>',
-            'experimental::optional<\\1>')
+            'experimental::optional<{1}>')
     add_one_template_type_printer(obj, 'basic_string_view<C>',
             'experimental::fundamentals_v1::basic_string_view<(.*), std::char_traits<\\1> >',
-            'experimental::basic_string_view<\\1>')
+            'experimental::basic_string_view<{1}>')
 
 def register_libstdcxx_printers (obj):
     "Register libstdc++ pretty-printers with objfile Obj."