Hacker News new | ask | show | jobs
by creatornator 1551 days ago
I've played a bit with weggli, it's pretty useful for "grepping" an entire codebase for patterns (for example, to search for antipatterns in a codebase)

Perhaps more capable but also more complex is clang-query:

https://devblogs.microsoft.com/cppblog/exploring-clang-tooli...

I couldn't find any direct documentation of clang-query, but it's part of clang-tools:

https://clang.llvm.org/extra/doxygen/ClangQuery_8cpp_source....

Similarly clang's LibASTMatchers (for writing matchers which can do anything from displaying a message, to actually transforming the matched code):

https://clang.llvm.org/docs/LibASTMatchers.html