ioeric added inline comments.

================
Comment at: include/clang/Tooling/Refactoring/RefactoringResultConsumer.h:39
+  /// Handles the source replacements that are produced by a refactoring 
action.
+  virtual void handle(AtomicChanges SourceReplacements) = 0;
+};
----------------
I think this interface is specific to some refactoring rules and should be 
pushed down to derived classes.


================
Comment at: unittests/Tooling/RefactoringActionRulesTest.cpp:39
+  class Consumer final : public RefactoringResultConsumer {
+    void handleInitiationFailure() {
+      Result = Expected<Optional<AtomicChanges>>(None);
----------------
Can we probably have default error handling in the base class so that we don't 
need to re-implement these for every derived consumer. I would expect the error 
handling for initiation and invocation to be similar in different consumers.


Repository:
  rL LLVM

https://reviews.llvm.org/D37291



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

Reply via email to