[PATCH] D39027: [docs][refactor] Add a new tutorial that talks about how one can implement refactoring actions
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 18 06:16:20 PDT 2017
hokein added a comment.
Awesome, thanks for the very well-illustrated tutorial!
================
Comment at: docs/RefactoringActionTutorial.rst:7
+
+ This tutorial talks about a work-in-progress library in Clang.
+ Some of the described features might not be available yet in trunk, but should
----------------
I'm a bit concerned about this. If we check in this doc before all features are implemented, it probably confuses users.
================
Comment at: docs/RefactoringActionTutorial.rst:36
+selected ``if`` statement that's nested in another ``if`` and merge the two
+into ``if``s one just one ``if``. For example, the following code:
+
----------------
merge the two `if`s into just one `if`?
================
Comment at: docs/RefactoringActionTutorial.rst:96
+
+.. code-block:: c++
+
----------------
It might be more sensible to provide a repository holding all source code of the sample, so that users can easily build and play around it.
================
Comment at: docs/RefactoringActionTutorial.rst:122
+operation. The refactoring library supports a number of different kinds of
+refactoring operations, which are describes in the
+:doc:`rule types <RefactoringEngine.html#rule-types>`_ section of the
----------------
s/describes/described
================
Comment at: docs/RefactoringActionTutorial.rst:167
+ Change.insert(Context.getSources(), ParentCond->getLocEnd(),
+ (llvm::Twine(" && ") + NestedCondStr).str());
+
----------------
An out-of-scope comment: the new code after refactoring may not be equivalent to the original one because of operator precedence.
================
Comment at: docs/RefactoringEngine.rst:21
-.. FIXME: create new refactoring action tutorial and link to the tutorial
+You can also take a look a the
+:doc:`refactoring action tutorial <RefactoringActionTutorial>` to see how
----------------
s/a/at
Repository:
rL LLVM
https://reviews.llvm.org/D39027
More information about the cfe-commits
mailing list