I wrote a plugin which in inherits both the ASTConsumer and RecursiveASTVisitor classes. Before the plugin is over I would like it to write out my modified AST. <br><br>Currently this code does nothing. No errors, not output. As there are no return values or error checking function I'm not even sure how I'm supposed to debug it. Does anyone happen to see whats wrong?<br>
<br>Thank you<br><br>virtual void HandleTranslationUnit(ASTContext &ctx) {<br>                TraverseDecl(ctx.getTranslationUnitDecl());<br>                <br>                std::vector<unsigned char> buf;<br>
                BitstreamWriter stream_writer(buf);<br>                ASTWriter ast_writer(stream_writer);<br>                ast_writer.WriteAST(ci->getSema(), NULL, string("test.ast"), StringRef("wtf"));<br>
}<br>