[PATCH] D94030: [ASTMatchers] Fix traversal matchers with explicit and defaulted methods

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 06:31:15 PST 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM with a few comments.



================
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:727
+  virtual bool IsMatchingChildrenNotSpelledInSource() const = 0;
+  virtual void SetMatchingChildrenNotSpelledInSource(bool Set) = 0;
+
----------------
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94030/new/

https://reviews.llvm.org/D94030



More information about the cfe-commits mailing list