gribozavr2 accepted this revision.
gribozavr2 added inline comments.

================
Comment at: clang/lib/Tooling/Transformer/RewriteRule.cpp:154
+    const RewriteRule &Rule,
+    ast_type_traits::TraversalKind DefaultTraversalKind) {
   // Map the cases into buckets of matchers -- one for each "root" AST kind,
----------------
I don't see any callers using the new argument. Do we need this flexibility?


================
Comment at: clang/unittests/Tooling/TransformerTest.cpp:574
 
+// Verifies that a rule with a matcher for an implicit node (like
+// `implicitCastExpr`) does not change the code, when the traversal kind is not
----------------
a matcher => a top-level matcher


================
Comment at: clang/unittests/Tooling/TransformerTest.cpp:575
+// Verifies that a rule with a matcher for an implicit node (like
+// `implicitCastExpr`) does not change the code, when the traversal kind is not
+// explicitly set ti TK_AsIs). In this test, only the rule with the
----------------
I'd say "when the AST traversal skips implicit nodes".


================
Comment at: clang/unittests/Tooling/TransformerTest.cpp:576
+// `implicitCastExpr`) does not change the code, when the traversal kind is not
+// explicitly set ti TK_AsIs). In this test, only the rule with the
+// explicit-node matcher will fire.
----------------
ti => to

AsIs) => AsIs


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80606



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to