llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

[AST] [Test] Add unit tests for serializing/deserializing each ASTNodes #57439

Open ChuanqiXu9 opened 2 years ago

ChuanqiXu9 commented 2 years ago

Currently, when we add any field to ASTNode, we need to change the serializer/deserializer too. However, the developers usually forgets this. The process may like: changing AST Nodes -> test, review and land the patch -> met segmentation fault -> revert, debugging and locate the problem -> test, review and land it again. Although we can' teach serializer/deserializer the change automatically. We could add unit tests for serializing/deserializing each ASTNodes. So that the developer can find their problems in the early day. It should save a lot of time.

llvmbot commented 2 years ago

@llvm/issue-subscribers-clang-modules