[NFC] [Serialization] Add static assert for the size of the decls to
mention developers to remember to touch the serializer after them modified the field of decls It is easy for the developers to forget to touch the serializer after they add new field to decls. Then if the existing tests fail to catch such cases, it may be a bug report from users some day. And it is time-consuming to solve such bugs. To mitigate the problem, I add the static_asserts in the serializer. So that the developers can understand they need to modify the serializer after they saw the static assertion failure. Although this can't solve all the problems, I feel the current status can be much better. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D141992
Loading
Please sign in to comment