This is an archive of the discontinued LLVM Phabricator instance.

[AST] Improve traversal of concept requirements
ClosedPublic

Authored by ilya-biryukov on Apr 27 2022, 9:15 AM.

Details

Summary
  • 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.

Diff Detail

Event Timeline

ilya-biryukov created this revision.Apr 27 2022, 9:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 9:15 AM
ilya-biryukov requested review of this revision.Apr 27 2022, 9:15 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 27 2022, 9:15 AM
This revision is now accepted and ready to land.Apr 27 2022, 10:48 AM
  • Mention the AutoType traversal does not traverse the constrained concept decl anymore and add a test for it