[PATCH] D97963: [ASTMatchers][Dynamic] Provide Fallback and suggestions for typos.

Stephen Kelly via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 9 16:31:35 PST 2021


steveire added a comment.

I like the idea, but I think you're violating the Interface Segregation Principle by putting it in the `Registry::lookupMatcherCtor` implementation. The interface here is easy to use incorrectly. Consider adding a new method instead. That way, `lookupMatcherCtor` will continue to do what it's name says it does and it will never return a "wrong" matcher. A new `lookupCloseMatch` API can be called if the optional returned by `lookupMatcherCtor` is `None`. That seems to be a more consistent API.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97963



More information about the cfe-commits mailing list