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

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 5 07:23:02 PST 2021


steveire added inline comments.


================
Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:727
+  virtual bool IsMatchingChildrenNotSpelledInSource() const = 0;
+  virtual void SetMatchingChildrenNotSpelledInSource(bool Set) = 0;
+
----------------
aaron.ballman wrote:
> 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.
The query method is also just an implementation detail, so I made that private too.


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