Skip to content
Commit c79635cc authored by Chuanqi Xu's avatar Chuanqi Xu
Browse files

[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
parent 8d498e08
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment