[cfe-dev] clang::MangleContext::shouldMangleDeclName

Vassil Vassilev vvasilev at cern.ch
Thu Oct 25 00:01:10 PDT 2012


On 10/24/12 11:07 PM, John McCall wrote:
> On Oct 24, 2012, at 2:03 PM, John McCall wrote:
>> On Oct 24, 2012, at 2:20 AM, Vassil Vassilev wrote:
>>> shouldMangleDeclName returns true for decls like EnumConstantDecl.
>>> Is that expected behaviour? Am I missing something?
>> It doesn't really return anything meaningful for declarations that
>> obviously aren't mangled.
> To clarify, that query is only meaningful for declarations that can be
> directly referenced as global symbols.  It's not meaningful for, say,
> enum constants or classes or using declarations.
>
> John.
Thanks for the answer, John!

It's somehow contra-intuitive for shouldMangleDeclName to return true 
for decls that aren't/can't be mangled.

I know that I can solve the issue on my side, but I thought this is the 
original idea of that interface. Isn't it better to check for the decls 
that are mangled and for everything else to return false?
Vassil




More information about the cfe-dev mailing list