Open mellery451 opened 1 month ago
How do I use this? https://godbolt.org/z/a17GYf6Kz, I tried the instructions on https://firefox-source-docs.mozilla.org/code-quality/static-analysis/writing-new/clang-query.html
in the tool input window, enter something like this:
set output dump
m translationUnitDecl()
Obviously there are lots of queries one could do...and I guess that would be one trick (allowing users to specify/customize the tool input)..but starting with just the dump of the TU would be cool
For just printing the AST you can another plugin of mine https://github.com/p00f/clangd_extensions.nvim?tab=readme-ov-file#view-ast
This will be much faster because it's local, and it has live highlighting of nodes/subtrees
Re: other uses I need to think on how to take query input
godbolt has an optional clang-query output and it would be handy to optionally open a window with that info locally.