This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.
ClosedPublic

Authored by ymandel on Jan 17 2019, 5:44 AM.

Details

Summary

Specifically, this diff:

  • fixes the comments on hasObjectExpression,
  • clarifies comments on thisPointerType and on,
  • adds comments to onImplicitObjectArgument

It also updates associated reference docs (using the doc tool).

Diff Detail

Repository
rC Clang

Event Timeline

ymandel created this revision.Jan 17 2019, 5:44 AM
ymandel retitled this revision from Update comments on assorted `CXXMemberCallExpr` matchers. to [ASTMatchers] Update comments on assorted `CXXMemberCallExpr` matchers..Jan 17 2019, 5:51 AM

Please always subscribe lists.
The reviews that happen without lists are null and void.

lebedev.ri retitled this revision from [ASTMatchers] Update comments on assorted `CXXMemberCallExpr` matchers. to [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers..Jan 17 2019, 5:56 AM
lebedev.ri set the repository for this revision to rC Clang.
steveire added inline comments.Jan 17 2019, 6:48 AM
clang/docs/LibASTMatchersReference.html
4823 ↗(On Diff #182261)

If we're going to put such examples and details into the docs, maybe we should explain why things are and are not matched. What do you think?

It seems in this case the type of the object expression of m is X* because of the hidden this->?

Some minor nits, but this is a good improvement!

clang/docs/LibASTMatchersReference.html
4823 ↗(On Diff #182261)

I think that adding more clarity like this would be very nice.

clang/include/clang/ASTMatchers/ASTMatchers.h
2905 ↗(On Diff #182261)

Missing a full stop.

5017 ↗(On Diff #182261)

how about matches "x.m", but not "m"; however,

5020 ↗(On Diff #182261)

Missing a full stop at the end of the sentence.

ymandel updated this revision to Diff 182299.Jan 17 2019, 8:40 AM

Respond to comments; fix mistake (revealed by test).

ymandel updated this revision to Diff 182301.Jan 17 2019, 8:42 AM
ymandel marked 2 inline comments as done.

Update HTML docs.

ymandel marked 4 inline comments as done.Jan 17 2019, 8:44 AM
ymandel added inline comments.
clang/include/clang/ASTMatchers/ASTMatchers.h
2905 ↗(On Diff #182261)

also fixed mistake in first example (turned up by actually testing the claim. :) )

alexfh accepted this revision.Jan 22 2019, 7:12 AM

Thanks for tidying up the docs. LG with one nit.

clang/include/clang/ASTMatchers/ASTMatchers.h
5018 ↗(On Diff #182301)

nit: Let's use backquotes here instead of double quotes. Same three lines below.

This revision is now accepted and ready to land.Jan 22 2019, 7:12 AM
ymandel updated this revision to Diff 182918.Jan 22 2019, 7:53 AM
ymandel marked an inline comment as done.

Use backticks instead of quotes for quoted code.

ymandel marked an inline comment as done.Jan 22 2019, 8:19 AM
ymandel updated this revision to Diff 185309.Feb 5 2019, 7:28 AM

Sync'd with master.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 5 2019, 7:28 AM

Alex, can you please submit this? Thanks!

ymandel updated this revision to Diff 185977.Feb 8 2019, 7:58 AM

Sync with head.

This revision was automatically updated to reflect the committed changes.