[cfe-dev] bug with USRs and fixed-length arrays?

Iestyn Bleasdale-Shepherd iestyn at valvesoftware.com
Fri Nov 2 10:55:00 PDT 2012


The strings returned by clang_getCursorUSR represent fixed-length arrays as pointers, so the USRs for "void Func( char[16] )" and "void "Func( char[32] )" are identical and thus ambiguous. In this case, clang_getCursorDisplayName appears to deal with fixed-size arrays correctly.

There seem to be other issues with fixed-length arrays in USRs, for example "template <size_t N> void mystrlwr( char (&dst)[N] )" is represented as "c:@FT@>1#Nkmystrlwr#& #" (and specializations of this template are also similarly broken).

I thought I'd post here before submitting the above as a bug, in case I'm missing something (post 2 of 4 of this kind today ;) ).


iestyn Bleasdale-Shepherd

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20121102/6639964d/attachment.html>

More information about the cfe-dev mailing list