I am trying to get hold on Clang. So, I would like to view the AST generated by Clang after parsing the given program. Is it possible to dump AST in .dot or .viz format? Is there any tool out there?
相关问题
- CMakeList file to generate LLVM bitcode file from
- AddressSanitizer blacklist in c++ not working
-
Apple Clang and numeric_limits
::max() is - Why clang missing default argument on parameter pa
- LLVM OPT not giving optimised file as output.
相关文章
- How do I generate an AST from a string of C++ usin
- clang error: non-type template argument refers to
- Swift and Objective-c framework exposes its intern
- Compiling a .C file: Undefined symbols for archite
- (Optimization?) Bug regarding GCC std::thread
- What does Clang's 'type_visibility' at
- How to clone or create an AST Stmt node of clang?
- Unable to use f2py to link large PETSc/SLEPc Fortr
The method with
-cc1
invocation will have problem with includes and recognizing C++.For full-featured parsing, use:
Clang supports showing the AST with Graphviz's
dotty
-- you can grab the temporary .dot file generated (name is printed out) to get the graph source.You can also print to the command line with:
or:
or in 3.3:
but this was removed later as pointed by Lukas Kubanek in the comment.