[cfe-dev] renaming a Type

Vladimir Kirillov proger at uaoug.org.ua
Fri Aug 27 04:40:54 PDT 2010


Hello, cfe-dev!

I'm using a clang to index the types used all over the code.
I'm having a custom anonymous types naming scheme used in the code,
so I want to rename the anonymous types to conform that scheme.

For instance, consider the following type:
struct parent::<anonymous at tests/a.c:4:2>

I want to rename the <anonymous ...> part (actually let the type
identifier have something in it's name field).

I took a brief look into the IdentifierInfo and TypePrinter,
but the IdentifierInfo::getNameStart() method uses some weird 
identifier lookups, so i'm asking for help here.

Please, explain me how to do it the best way :-).


Thanks!



More information about the cfe-dev mailing list