Fixes the FIXME: related to adding forEachTemplateArgument to the core AST Matchers library.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Do you expect to use this matcher in a new check in the immediate future? We usually don't push specialized matchers into ASTMatchers.h but instead try to keep them next to the only check using them. This reduces compile time overhead for everyone building Clang. (It's not that there's anything wrong with this one, it's more just resistance to adding matches unless they're sufficiently necessary.)
Thanks! Then I think the only thing missing here are updates to https://github.com/llvm/llvm-project/blob/main/clang/lib/ASTMatchers/Dynamic/Registry.cpp.
LGTM with that change made.
Oh, you should probably also add a release note for the new matcher to clang/docs/ReleaseNotes.rst
Could you please check if I did it the right way? I did not know about this file, and I am still not exactly sure about its purpose.
Yup, you did it correct! This is the magic that allows clang-query to work -- it sets up the dynamic mapping of C++ matchers, so if you forget to add something to that list, it'll be available to folks in C++ but not in clang-query.