Open Febbe opened 1 year ago
@llvm/issue-subscribers-clangd
Unrelated, but have you tried https://ast-grep.github.io/? They recently got support for C++ through tree-sitter-cpp
The thing is, that there is already a tool from LLVM, which supports this: clang-query. Basically I would like to see clang-query integrated to clangd.
So clangd does have support for showing AST, just select some text and right click
No, not showing the AST, I know, that clangd can print it. I want to search and replace in all ASTs of all files with the help of the Clang AST Matcher DSL, just like I can do it either via clang-query or writing my own libtooling program. As I know clang query only supports single files and does not allow replacements and writing a libtooling parser is most often overkill, since I will never need that parser again.
While refactoring or reviewing code I often find problematic code, which occurs in similar forms in the complete codebase. Searching for those via a regex ist cumbersome and does not work for all cases.
My preferred workflow would be:
In order to implement this in clangd-plugins, clangd itself requires the functionality to