erichkeane wrote:

As a quick note, the best way to check serialization/deserialization is a PCH 
/restore test.  I did a bunch in `SemaOpenACC` that you can use as an example 
(see a bunch ending with `-ast` in the name).  Basically, you just do the right 
command-line incantation, plus a #ifdef around the whole file.  Write your code 
that has the correct AST nodes in place, then it does a 'write to a PCH file', 
then does a 'load from a PCH file'.  You then use `CHECK` lines via `FileCheck` 
to make sure it is the same before and after the serialization.

https://github.com/llvm/llvm-project/pull/121417
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to