[PATCH] D38943: [ASTImporter] import SubStmt of CaseStmt
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 16 08:16:10 PDT 2017
xazax.hun added inline comments.
================
Comment at: unittests/AST/ASTImporterTest.cpp:100
+ // This might catch other cases.
+ Imported->dump(ToNothing);
----------------
r.stahl wrote:
> xazax.hun wrote:
> > I would elaborate a bit more on the purpose of the code below.
> I will need help for that, since I do not have a better rationale myself. My guess would be that print has different assumptions and error checking than dump, so executing both increases coverage.
So the reason you need this to traverse the AST and crash on the null pointers (when the patch is not applied right?)
I think you could comment something like traverse the AST to catch certain bugs like poorly (not) imported subtrees.
If we do not want to actually print the whole tree (because it might be noisy) you can also try using a no-op recursive AST visitor.
https://reviews.llvm.org/D38943
More information about the cfe-commits
mailing list