Naming C++ template functions

Is there some way to allow naming of functions with C++ template characters? I know ida.cfg’s NameChars can be modified to allow this, but there are at least two issues with that route:

  1. Including a comma in particular results in variable highlighting in pseudocode matching commas in function calls and the comma operator.
  2. It interferes with the clang C++ type parser, causing you to be unable to set certain types to variables. (I submitted a report on this one.)

Hi Anthony,
Thanks for pointing this. So far I couldn’t collect any useful hints for naming, but based on your report, we’ve opened an internal ticket to investigate further. We’ll keep you posted if we discover anything or decide on next steps.

Hi Teresa,

I’m not sure I understand what you mean by “hints for naming”. What can I provide that will assist in possible solutions? Screenshots? Clarifications?

Hi Anthony,

I meant that at the moment I’m not aware of any workarounds for the issues you mentioned.

We don’t need additional details or screenshots right now, but since a ticket has been opened, we’ll reach out through the official support channel if any questions come up during the investigation. Thanks for your patience!

I think you can use set_name API directly to set the raw name string with any characters, but this may lead to issues in other parts of IDA not prepared for this, as you have observed.

In theory, using a mangled name would be the best option, but you’ll need to figure out the mangled form yourself. Mangling is context sensitive and usually requires access to the full source code for the compiler to produce correct results, so implementing it directly in IDA is difficult.