PR libstdc++/87308 adjust regex used in std::any pretty printer
commitfb75ff455a73f415407c5b717ae0dad6cd396ef0
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Nov 2018 15:48:56 +0000 (23 15:48 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Nov 2018 15:48:56 +0000 (23 15:48 +0000)
treecd70190832e81d95f74ef9d192edcd719bd012e3
parentc118d45949244fff6aedf0eba4f0e165a8df9dd8
PR libstdc++/87308 adjust regex used in std::any pretty printer

The pretty printer for std::any fails when the contained value is a
locally-defined type, because the name in the debuginfo has
cv-qualifiers and ptr-declarators in different positions. The unexpected
format confuses the printer. This makes the printer's regex handle
either format.

This isn't a complete fix because looking up the contained type fails
when there are two types with the same name (defined in different local
scopes). This applies to all closure types defined in a given function,
as they all appear as "func()::lambda" in the debuginfo names.

PR libstdc++/87308 (partial)
* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Adjust regex to
work around PR 88166.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Test std::any
containing a local type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266408 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/cxx17.cc