[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
Wed May 1 10:38:59 PDT 2019


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


================
Comment at: clang-tools-extra/clang-tidy/utils/TransformerTidy.cpp:22
+  // Verify the existence and validity of the AST node that roots this rule.
+  auto &NodesMap = Result.Nodes.getMap();
+  auto Root = NodesMap.find(tooling::RewriteRule::RootId);
----------------
Eugene.Zelenko wrote:
> Please don't use auto when return type is not spelled at same statement or iterator. Same for other places. 
I left only the iterator's auto, expanded the rest.  Let me know if I've converted too many.   I wonder about this one here, for example, because the type of the map is essentially an internal detail of BoundNodes.


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