Get member offset in a non-POD type

Hi! I need to implement reflection for my C++ project. I was thinking about something like offsetof() to get offset of a class member, but offsetof() is applicable just for POD types. So, I have a question: is it possible to implement Clang plugin(or tool) to generate metadata(like offsets, names, types, …) needed for reflection?