[cfe-dev] How to demangle _ZN3foocvPT_I3barEEv?
richard at metafoo.co.uk
Mon Feb 11 11:02:10 PST 2013
On Mon, Feb 11, 2013 at 7:05 AM, Marshall Clow <mclow.lists at gmail.com>wrote:
> On Monday 11 February 2013 14:06:45 fakju666 wrote:
> > Can anyone tell me what this is supposed to demangle to:
> > _ZN3foocvPT_I3barEEv
> > I got this in a call graph generated by opt, and this is the only name
> > c++filt can't process. I think the problem is with the "T_" identifier,
> > because c++filt is happy if I replace it with "S_":
> > foo::operator foo<bar>*()
> $ c++filt -n _ZN3foocvPT_I3barEEv
> foo::operator bar*<bar>()
This is the right answer (or, prior to substitution, template<typename T>
foo::operator T*(), with T = bar).
This case is a little hard to demangle, since it's /almost/ ambiguous. It
could be conversion to PT_ (that is, "operator template-type-parameter-0
*"), instantiated with <bar>, or it could be conversion to PT_I3barE (that
is, "operator template-template-parameter-0<bar> *"). But it actually can't
be the latter, since the use of the template-template-parameter implies
that we need to specify template arguments, so we'd expect another template
argument list: _ZN3foocvPT_I3barEI3bazEEv.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev