r.stahl added a comment.

If all is good, I will need someone to commit this for me please.



================
Comment at: unittests/AST/ASTImporterTest.cpp:100
 
+  // This might catch other cases.
+  Imported->dump(ToNothing);
----------------
xazax.hun wrote:
> 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.
Yes, of course this referred to the case when the patch is not applied.

There is no noise since the dump is done on a buffer that will be discarded.


https://reviews.llvm.org/D38943



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to