[cfe-dev] Exporting Clang AST

Bhargava Shastry via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 28 07:00:00 PDT 2015


> The question is what you want to do; if we're talking IDE support, we
> don't want every IDE to go and fiddle with the clang AST - it's complex
> and hard to get right.
> Instead, we want to build tools in clang/clang-tools-extra, and export
> those via libclang (or something similar). That way, all IDEs will have
> a common set of well-tested tools.
> If you want to build your own one-of code transformation, I'd recommend
> to write it in C++ against the clang AST directly.

I am working on a close-to-source on-disk representation of clang AST. I
am unsure what level of AST detail is necessary. But I do know that the
detail offered by python bindings is too abstract (low level of detail)
for my needs.

Is the libclang project you speak of (clang-tidy abstraction) in
development or planned for the future? It sounds like an apt setting to
implement Bjarne Stroustrup's coding guidelines [1] that he discusses in
his latest cppcon talk!

[1] https://github.com/isocpp/CppCoreGuidelines



More information about the cfe-dev mailing list