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