This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] basic matcher support for ConceptReference
AcceptedPublic

Authored by sammccall on Aug 31 2023, 1:51 PM.

Details

Summary

This adds only the trivial conceptReference() matcher.
(Also adds tests for ConceptReference in DynTypedNode, which need this
matcher)

This node isn't part of any other inheritance hierarchy, so it meant
handling a new base type everywhere.

This caused us to run out of discriminator bits in the CurMatchData,
so I replaced the data structure with std::variant which is at least
less code.

Diff Detail

Event Timeline

sammccall created this revision.Aug 31 2023, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2023, 1:51 PM
sammccall requested review of this revision.Aug 31 2023, 1:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2023, 1:51 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
massberg added inline comments.Sep 4 2023, 1:16 AM
clang/docs/LibASTMatchersReference.html
2545

Was this change to drop the () by purpose?

2559

same as above

(by mail as phab is unusable today)

massberg accepted this revision.Sep 4 2023, 6:30 AM
This revision is now accepted and ready to land.Sep 4 2023, 6:30 AM
aaron.ballman accepted this revision.Nov 1 2023, 9:37 AM

LGTM as well btw -- @sammccall, it looks like this one may have fallen off your radar? (Please add a release note when landing though; we have a section for AST matchers specifically.)