gbencze added a comment. Another option that came to my mind is using a BitVector to (recursively) flag bits that are occupied by the fields. This solution would be slightly slower and uses more memory but is probably a lot easier to understand, maintain and more robust than the currently proposed implementation. This would also catch a few additional cases as it could also look inside unions.
I stared to experiment with an implementation of this here <https://github.com/gaborbencze/llvm-project/commit/689bba792b5699444674a1cadc0e235b668b2970#diff-b476912022a94429d868e13a139cf406>. Which direction do you think would be a better solution? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71973/new/ https://reviews.llvm.org/D71973 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits