On Monday, 20 June 2016 at 14:42:22 UTC, Jacob Carlborg wrote:
On 2016-06-20 16:06, Guillaume Chatelet wrote:

Thx Johan. I'm confused though: `FuncDeclaration.linkage` is the linkage for the function (which I already know is C++ function since I'm mangling it) but I need the linkage for the Parameter. Parameter has a
Type but I can't get the linkage from here. What did I miss?

1. Check if the type is a class. There's a field "ty" in Type
2. If it's a class, cast it to TypeClass
3. TypeClass has a field "sym" of type ClassDeclaration
4. ClassDeclaration has three fields: "com", "cpp" and "objc". I think these fields indicate if the class declaration has extern(C++), extern(Objective-C) and so on. If none of them are true, it's standard extern(D)

Pretty cool. Thx Jacob!

Anyone has a suggestion for my second problem?

If not I'll have to do some kind of mapping between the template args and the parameters...

Reply via email to