[PATCH] D98407: [clang-query] Add syntax highlight for clang-query scripts.

Nathan James via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 14:00:46 PST 2021


njames93 added a comment.

In D98407#2621580 <https://reviews.llvm.org/D98407#2621580>, @OikawaKirie wrote:

> I wrote this demo script to extract the matchers from the file `clang/lib/ASTMatchers/Dynamic/Registry.cpp` as you mentioned. However, there are still some missing matchers (`fixedPointLiteral`, `hasAnyBody`, `templateArgumentLoc` and `traverse`) in addition to the two matchers (`findAll` and `equalsNode`) that are mentioned to be missing in the comments of function `RegistryMaps::RegistryMaps`. I am not very sure whether the comment mentioned all of the missing matchers, or I missed some registries other places in this file.

The Registry is the truth about what clang-query can accept. Any matcher not registered in there won't work with clang-query. I've rustled up a patch, D98556 <https://reviews.llvm.org/D98556>, to include `fixedPointLiteral`, `hasAnyBody` and `templateArgumentLoc` in there.
`traverse` needs a little work to get working, `equalsNode` makes no sense in clang-query. I'm not sure of the exact issue with `findAll`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98407/new/

https://reviews.llvm.org/D98407



More information about the llvm-commits mailing list