[PATCH] D124532: [AST] Improve traversal of concept requirements

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 27 09:15:39 PDT 2022


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: usaxena95, kadircet, arphaman.
Herald added a project: All.
ilya-biryukov requested review of this revision.
Herald added projects: clang, clang-tools-extra.

- Do not visit implicit AST node the relevant traversal mode.
- Add traversal extension points for concept requirements.
- Renamed `TraverseConceptReference` to mark as helper to share the code. Having an extension point there seems confusing given that there are many concept refences in the AST that do not call the helper. Those are `AutoType`, `AutoTypeLoc` and constraint requirements.

Only clangd code requires an update.

There is really no use-case for concept requirements traversals yet, but
I added them in the earlier version of the patch and decided to keep
them for completeness.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124532

Files:
  clang-tools-extra/clangd/Selection.cpp
  clang-tools-extra/clangd/unittests/XRefsTests.cpp
  clang/include/clang/AST/RecursiveASTVisitor.h
  clang/lib/Index/IndexBody.cpp
  clang/unittests/Tooling/RecursiveASTVisitorTests/Concept.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124532.425534.patch
Type: text/x-patch
Size: 14963 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220427/90da07eb/attachment-0001.bin>


More information about the cfe-commits mailing list