<div dir="ltr">Hi Bhargava,<div><br></div><div>You may (or may not) be interested in the JsonASTExporter plugin in <a href="https://github.com/facebook/facebook-clang-plugins">https://github.com/facebook/facebook-clang-plugins</a> .<br><br></div><div>Pros:<br>* Exports most of the clang AST in Json (or an equivalent binary format called "Biniou").<br>* The Json follows a schema understood by the Ocaml library "atdgen" (<a href="https://mjambon.github.io/atdgen-doc/tutorial">https://mjambon.github.io/atdgen-doc/tutorial</a>).<br>* Used by the Infer tool (<a href="http://fbinfer.com">http://fbinfer.com</a>) and actively maintained.<br><br></div><div>Cons:<br>* The Json format is not human-friendly.<br></div><div>* "atdgen" does not target other languages besides Ocaml (but this could be fixed, or in principle, you could hack the plugin to use another serialization library).<br>* Some C++ constructions are not fully exported yet.<br></div><div><div>* Not a standalone tool yet (this causes some overheads -- work in progress).<br></div>* Not considered stable. Everything may change.<br><br></div><div>-- Mathieu<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-28 7:31 GMT-07:00 Manuel Klimek via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span class=""><div dir="ltr">On Mon, Sep 28, 2015 at 4:00 PM Bhargava Shastry <<a href="mailto:bshastry@sec.t-labs.tu-berlin.de" target="_blank">bshastry@sec.t-labs.tu-berlin.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> The question is what you want to do; if we're talking IDE support, we<br>
> don't want every IDE to go and fiddle with the clang AST - it's complex<br>
> and hard to get right.<br>
> Instead, we want to build tools in clang/clang-tools-extra, and export<br>
> those via libclang (or something similar). That way, all IDEs will have<br>
> a common set of well-tested tools.<br>
> If you want to build your own one-of code transformation, I'd recommend<br>
> to write it in C++ against the clang AST directly.<br>
<br>
I am working on a close-to-source on-disk representation of clang AST.</blockquote><div><br></div></span><div>I understand that - my question is what you want to use it for.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I<br>
am unsure what level of AST detail is necessary. But I do know that the<br>
detail offered by python bindings is too abstract (low level of detail)<br>
for my needs.<br>
<br>
Is the libclang project you speak of (clang-tidy abstraction) in<br>
development or planned for the future? It sounds like an apt setting to<br>
implement Bjarne Stroustrup's coding guidelines [1] that he discusses in<br>
his latest cppcon talk!<br></blockquote><div><br></div></span><div>Yes, clang-tidy exists and already has implemented a couple of the core guidelines - contributions to implement more checks from the guidelines would be highly appreciated.</div><div><br></div><div>Note that clang-tidy is not exposed through libclang yet.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
[1] <a href="https://github.com/isocpp/CppCoreGuidelines" rel="noreferrer" target="_blank">https://github.com/isocpp/CppCoreGuidelines</a><br>
</blockquote></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>