[PATCH] D61386: [clang-tidy] Add support writing a check as a Transformer rewrite rule.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 21 09:52:34 PDT 2019


ymandel marked 2 inline comments as done.
ymandel added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.h:32
+// };
+class TransformerTidy : public ClangTidyCheck {
+public:
----------------
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?


================
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;
----------------
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?


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