Hello, Currently I am dumping the Clang AST to the console but I want to
write it to a file.

I have pasted the code snippet.

bool HandleTopLevelDecl(DeclGroupRef DR) override {
for (DeclGroupRef::iterator b = DR.begin(), e = DR.end(); b != e; ++b) {
(*b)->dump(llvm::errs(), false,clang::ADOF_JSON);
}
return true;
}

How this can be done ?? Any help is appreciated.

Regards,
Mona
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to