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

2021-03-09 Thread Stephen Kelly via Phabricator via cfe-commits
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

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

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/include/clang/ASTMatchers/Dynamic/Diagnostics.h:62-72 ET_RegistryMatcherNotFound = 1, -ET_RegistryWrongArgCount = 2, -ET_RegistryWrongArgType = 3, -ET_RegistryNotBindable = 4, -ET_RegistryAmbiguousOverload = 5

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

2021-03-05 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 328664. njames93 added a comment. Address clang-tidy issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97963/new/ https://reviews.llvm.org/D97963 Files: clang/include/clang/ASTMatchers/Dynamic/Diagnostic

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

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Tests haven't been added yet, wanted to gauge opinions on this first before fully committing to it. Comment at: clang/lib/ASTMatchers/Dynamic/TypoSuggester.cpp:40 +} // namespace clang \ No newline at end of file Duly noted :) Repo

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

2021-03-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, klimek, steveire. Herald added a subscriber: mgorny. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If there is a typo in parsing and we can see a close matc