]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Fix find_type helper to work consistently
authorJonathan Wakely <jwakely@redhat.com>
Thu, 11 Mar 2021 16:48:32 +0000 (16:48 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 18 Jun 2021 11:55:59 +0000 (12:55 +0100)
commit3f023bc5bb3d260ffe7d6e1f333fb41bbbbae444
tree08501a5712f9edd9ed9ec805fc029a611fdfe3a4
parentebf5768c9658cb6a555d58d8ad8bd1f49dabddaa
libstdc++: Fix find_type helper to work consistently

The find_type helper function sometimes results in "class X::name" and
lookup for that fails. For more details see "Problem 1" in
https://gcc.gnu.org/pipermail/libstdc++/2021-March/052132.html and the
example at https://sourceware.org/bugzilla/show_bug.cgi?id=27510#c2

This patch replaces typ.unqualified() with typ.tag, which is never
qualified, and will never include the 'class' or 'struct' keywords.
Using the .tag attribute should be safe here because we know we are
looking at a class type and we've already used strip_typedefs().

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (find_type): Use tag attribute
instead of unqualified() method.

(cherry picked from commit 9dacc828bf8b087ddfaf797ed7238da45609082c)
libstdc++-v3/python/libstdcxx/v6/printers.py
This page took 0.058215 seconds and 6 git commands to generate.