[cfe-dev] Exporting Clang AST
Bhargava Shastry via cfe-dev
cfe-dev at lists.llvm.org
Mon Sep 28 06:37:50 PDT 2015
> It is always *a* parent, yes :)
Hmm... okay. That's something I hadn't imagined in my head about an AST.
That a node can have multiple parents :/
Just to be clear, getParents(childNode) returns an array of parents
only, right i.e., one indentation level up in -ast-dump output? E.g., an
entry stmt in functiondecl scope has functiondecl as its parent and
*not* translationunitdecl?
> Our idea for IDE integration is to export everything that makes sense
> through libclang (for example, we want to export clang-tidy through
> libclang, and once we have refactorings, it might make sense to offer
> them through libclang, too).
Okay. I did try using libclang python bindings but the AST it exposes
currently is inferior to what one could get with a libtooling based tool.
Is AST provided by libclang *proper* (C binding) better than its python
counterpart? I suppose I mean: Is this a rough ordering from rich to
poor AST detail?
Stand-alone tool > libclang > py libclang
Thanks,
Bhargava
More information about the cfe-dev
mailing list