[cfe-dev] clang_getCursorDisplayName bug?
kyrtzidis at apple.com
Fri Nov 2 11:13:58 PDT 2012
On Nov 2, 2012, at 10:36 AM, Iestyn Bleasdale-Shepherd <iestyn at valvesoftware.com> wrote:
> It appears that the 'display' names produced by clang_getCursorDisplayName are not specific enough for function template specializations; that is, the template parameters reduce to '<>'. The display names of all specializations of a given function template are identical and thus ambiguous.
That does not seem right, please file a bug.
> The same problem occurs for class methods, however the display names of template class specializations are correct. The display name for an unspecialized template class is still not ideal though; for example "template <class T> class myclass" yields the display name "myclass<T>" which does not make it clear whether 'T' is a generic typename or a specific type named 'T'! In this case, "myclass<typename T>" might be better.
Not sure about that, the display name is only to provide a user-friendly string, it's not supposed to provide unique and unambiguous identifiers.
I can see benefits either way, e.g. the shorter "myclass<T>" looks better to me, adding 'typename' to each parameter will make the display name a bit too long and unwieldy.
> I thought I’d post here before submitting the above as a bug, in case I’m missing something.
> iestyn Bleasdale-Shepherd
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev