Show HN: Anyone interested in a tool helps to explore C++ ASTs(uvic-aurora.github.io)
uvic-aurora.github.io
Show HN: Anyone interested in a tool helps to explore C++ ASTs
https://uvic-aurora.github.io/acav-manual/index.html
I built this software to help users who need to do static code analysis for C/C++ codebase. This can help you to explore the ASTs interactively. It can replace the Clang ast dump completely and also you can search the code/ASTs in a structual way. For example you can search a function which matches specific name or number of paremeters.
6 comments
Nice to see another static analysis tool.
It looks like the compilation database is only used for discovering source files, without any additional cross translation unit analysis [1]. Even if you don't plan on implementing data flow tracking or other passes, it can still be interesting to know on which translation unit a function declaration is defined on.
Also, it seems we always have to recompile each unit when switching between source files. Consider pre-compiling and caching so it's only done once. That should also enable users to search across files/ASTs.
[1]: https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslat...
It looks like the compilation database is only used for discovering source files, without any additional cross translation unit analysis [1]. Even if you don't plan on implementing data flow tracking or other passes, it can still be interesting to know on which translation unit a function declaration is defined on.
Also, it seems we always have to recompile each unit when switching between source files. Consider pre-compiling and caching so it's only done once. That should also enable users to search across files/ASTs.
[1]: https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslat...
Is this based on or otherwise related to kythe?
Nice, you don't see many new Qt projects that use QDockWidget anymore.
This is the repo: https://github.com/uvic-aurora/acav
Feel free to leave a comment if you have any questions. Thanks!
Feel free to leave a comment if you have any questions. Thanks!
Cool project. The bidirectional source-to-AST navigation is the killer combination, clang -Xclang -ast-dump gives you a wall of text that's hard to correlate back to code, especially with C++'s implicit conversions and template instantiations. Being able to click and see exactly what Clang produces is invaluable for anyone writing AST matchers or clang-tidy checks.
I work on a related project called sem (Ataraxy-Labs/sem) that takes ASTs in a different direction — extracting semantic entities from tree-sitter ASTs to build cross-file dependency graphs with git history tracking. Would be curious if you've thought about leveraging Clang's richer AST to do cross-file entity analysis for C++.
I work on a related project called sem (Ataraxy-Labs/sem) that takes ASTs in a different direction — extracting semantic entities from tree-sitter ASTs to build cross-file dependency graphs with git history tracking. Would be curious if you've thought about leveraging Clang's richer AST to do cross-file entity analysis for C++.