<div dir="ltr">Hello, Currently I am dumping the Clang AST to the console but I want to write it to a file.<div><br></div><div>I have pasted the code snippet.</div><div><br></div><div>bool HandleTopLevelDecl(DeclGroupRef DR) override {<br>             for (DeclGroupRef::iterator b = DR.begin(), e = DR.end(); b != e; ++b) {<br>                      (*b)->dump(llvm::errs(), false,clang::ADOF_JSON);<br>          }<br>             return true;<br>  }<br></div><div><br></div><div>How this can be done ?? Any help is appreciated.</div><div><br></div><div>Regards,</div><div>Mona</div></div>