This is an archive of the discontinued LLVM Phabricator instance.

Fix documentation for `forEachLambdaCapture` and `hasAnyCapture`
ClosedPublic

Authored by jcking1034 on Nov 30 2021, 10:16 AM.

Details

Summary

Updates the return types of these matchers' definitions to use
internal::Matcher<LambdaCapture> instead of LambdaCaptureMatcher. This
ensures that they are categorized as traversal matchers, instead of narrowing
matchers.

Diff Detail

Event Timeline

jcking1034 requested review of this revision.Nov 30 2021, 10:16 AM
jcking1034 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 30 2021, 10:16 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
jcking1034 edited the summary of this revision. (Show Details)Nov 30 2021, 10:20 AM
ymandel accepted this revision.Nov 30 2021, 10:26 AM

#TIL :)

This revision is now accepted and ready to land.Nov 30 2021, 10:26 AM
aaron.ballman accepted this revision.Dec 1 2021, 12:38 PM

LGTM! I had no idea...

(As a follow-up question, should we be removing the using declarations starting around line 141 or so? Many of them are not used, and if the documentation dumper can't look through typedefs and gets the documentation wrong, perhaps we want to discourage using them entirely?)

tdl-g accepted this revision.Dec 1 2021, 12:39 PM

LGTM! I had no idea...

(As a follow-up question, should we be removing the using declarations starting around line 141 or so? Many of them are not used, and if the documentation dumper can't look through typedefs and gets the documentation wrong, perhaps we want to discourage using them entirely?)

Aaron -- at least in our codebase, those are used a fair amount. What about updating the script to understand those typedefs?

This revision was landed with ongoing or failed builds.Dec 2 2021, 5:28 AM
This revision was automatically updated to reflect the committed changes.
aaron.ballman added a comment.EditedDec 2 2021, 5:35 AM

LGTM! I had no idea...

(As a follow-up question, should we be removing the using declarations starting around line 141 or so? Many of them are not used, and if the documentation dumper can't look through typedefs and gets the documentation wrong, perhaps we want to discourage using them entirely?)

Aaron -- at least in our codebase, those are used a fair amount. What about updating the script to understand those typedefs?

That would also be an effective solution! I was assuming it would be difficult to update the script.