[PATCH] D37210: [refactor] add a refactoring action rule that returns symbol occurrences

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 02:13:28 PDT 2017

hokein added inline comments.

Comment at: include/clang/Tooling/Refactoring/RefactoringActionRule.h:29
+    SourceChangeRefactoringRuleKind,
+    FindSymbolOccurrencesRefactoringRuleKind
+  };
I might miss some context here. As per your comment in https://reviews.llvm.org/D36075#inline-323769, you'll try to remove this tag, so I think we will hold off this patch until that is done?

Comment at: unittests/Tooling/RefactoringActionRulesTest.cpp:167
+findOccurrences(const std::unique_ptr<RefactoringActionRule> &Rule,
+                RefactoringRuleContext &Context) {
I'm not a fan of passing a const smart_pointer& as function parameter. The function being called doesn't care about the lifetime management, so I'd use a raw pointer here.



More information about the cfe-commits mailing list