atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
229 stars 31 forks source link

Perform type casting when the type has macro attributes #253

Closed cbecerescu closed 4 years ago

cbecerescu commented 4 years ago

For a concrete example, see the GFP_ATOMIC macro definition from the linux kernel, where the attribute '__force' is used with a type cast.

LE: I previously tried to add the condition that tokens[0] should be a macro, but I found out that the macro could have been declared later on. The unit test showcases this: '__force' is defined after being used.