Tyker marked 2 inline comments as done. Tyker added inline comments.
================ Comment at: clang/lib/AST/ASTImporter.cpp:8503 +llvm::Expected<APValue> ASTImporter::Import(const APValue &FromValue) { + APValue Result; ---------------- martong wrote: > Tyker wrote: > > martong wrote: > > > Looks okay, but could we have unit tests for this in ASTImporterTest.cpp? > > I tested importing using the same test file as serialization > > `clang/test/PCH/APValue.cpp` with `-ast-merge` which uses importing. this > > prevent duplicating the test code for importing and serializing. is the > > unit-test in ASTImporterTest.cpp necessary anyway ? > Okay, that's fine I missed that previously, so there is no need for the > unit-tests in this case. > Though maybe the `-ast-merge` part of the test should reside in the > `clang/test/ASTMerge` directory, because that is where all the other > `-ast-merge` tests are. > I am not sure how to solve that nicely, because i see you use the same file > for both the serialization and for the import. > Perhaps there should be a common header file which is included both in > `test/PCH/APValue.cpp` and in `test/ASTMerge/apvalue/test.cpp`? > > we can have a common header, but i don't know where to put it. having a in `PCH` that includes a header form `ASTMerge` seems weird and vice versa. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63640/new/ https://reviews.llvm.org/D63640 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits