This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Fix traversal matchers with explicit and defaulted methods
ClosedPublic

Authored by steveire on Jan 4 2021, 1:44 PM.

Diff Detail

Event Timeline

steveire requested review of this revision.Jan 4 2021, 1:44 PM
steveire created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2021, 1:44 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Jan 5 2021, 6:31 AM

LGTM with a few comments.

clang/include/clang/ASTMatchers/ASTMatchersInternal.h
727

Would it be a bit cleaner to make this a private function that's a friend of ASTChildrenNotSpelledInSourceScope to discourage users from thinking they should set this manually themselves? (The query side of things seems reasonable as a public interface though.)

As a drive-by comment: we introduced some naming inconsistencies with capitalization and this continues the inconsistency. We should probably go back through and change the IsMatching* to be isMatching* to fit the usual naming conventions.

This revision is now accepted and ready to land.Jan 5 2021, 6:31 AM
This revision was landed with ongoing or failed builds.Jan 5 2021, 7:22 AM
This revision was automatically updated to reflect the committed changes.
steveire added inline comments.Jan 5 2021, 7:23 AM
clang/include/clang/ASTMatchers/ASTMatchersInternal.h
727

The query method is also just an implementation detail, so I made that private too.