Need DMD AST expertise

Johan Engelen via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 20 06:50:45 PDT 2016


On Monday, 20 June 2016 at 12:33:31 UTC, Guillaume Chatelet wrote:
>
>> class Expression;
>> extern(C++) void foo(Expression);
>
> Question:
> ---------
> - How to I get the linkage for Expression from a 
> FunDeclaration? This will ensure the added indirection is put 
> only for the D classes, not the C++ ones. I tried looking at 
> Parameter, ClassDeclaration or TypeClass but couldn't find it.

A FuncDeclaration is a Declaration, which contains the field 
`LINK linkage;`. That's the one you want.

-Johan


More information about the Digitalmars-d mailing list