[PATCH] D61386: [clang-tidy] Add support writing a check as a Transformer rewrite rule.
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 10:18:15 PDT 2019
gribozavr added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.h:32
+// };
+class TransformerTidy : public ClangTidyCheck {
+public:
----------------
ymandel wrote:
> gribozavr wrote:
> > I'd prefer a name like "TransformerClangTidyCheck", it will only appear in a few places, but is much more clear.
> will do, but should I also rename the files correspondingly?
Yes please.
================
Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.h:38
+
+ void registerMatchers(ast_matchers::MatchFinder *Finder) override;
+ void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
----------------
ymandel wrote:
> gribozavr wrote:
> > I'd suggest to add comments telling users to not override these methods in subclasses.
> sure. would marking them as `final` make sense, then?
Right, that's the perfect tool for the job.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61386/new/
https://reviews.llvm.org/D61386
More information about the cfe-commits
mailing list