[PATCH] D36075: [refactor] Initial support for refactoring action rules

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 28 08:02:16 PDT 2017


klimek added inline comments.


================
Comment at: cfe/trunk/include/clang/Tooling/Refactoring/RefactoringActionRule.h:23-37
+/// A common refactoring action rule interface.
+class RefactoringActionRule {
+public:
+  enum RuleKind { SourceChangeRefactoringRuleKind };
+
+  RuleKind getRuleKind() const { return Kind; }
+
----------------
Sorry for being late, was out on vacation.
Generally, why do we need this tag-based abstraction here instead of using the more typical OO double-dispatch where necessary?
(We do this in the AST a lot, but the AST is special, because there we want to implement a lot of different algorithms that rely on the node type, while I don't see how that applies here)


Repository:
  rL LLVM

https://reviews.llvm.org/D36075





More information about the cfe-commits mailing list