Allows to use sizeof on imporc types. Tricky as it requires to ensure that
there is no conditionally enabled branches, or their handling in nim is exactly matching (using 'when' conditions). Information about conditional field compilation must be provided in the IR as well, which requires specifying any preprocessor condition expression. Also libclang does not support preprocessor callbacks, so no this have to be accounter for as well. Boost::wave can handle conditional compilation registration with some additional work.
if wrapping an C++ object there must be no private fields, no parent classes, no virtual member functions (vtable pointer). This can also be partially emulated by inserting fake gensym elements for hidden data.
there is a way to test correctness of the generated object's sizeof. Clang can simply get this data via function call clang_Type_getSizeOf.
all field's types are either nim primitives, or also have sizeof declared
Allows to use sizeof on imporc types. Tricky as it requires to ensure that
clang_Type_getSizeOf
.