This patch actually brings clang-refactor to a usable state as it can now apply the refactoring changes to the source files.
The -selection option is now also fully supported.
Details
- Reviewers
ioeric hokein klimek - Commits
- rGe1b7b959012b: Recommit r315738 "[clang-refactor] Apply source replacements"
rG57e060b30985: [clang-refactor] Apply source replacements
rC315918: Recommit r315738 "[clang-refactor] Apply source replacements"
rC315738: [clang-refactor] Apply source replacements
rL315918: Recommit r315738 "[clang-refactor] Apply source replacements"
rL315738: [clang-refactor] Apply source replacements
Diff Detail
- Repository
- rL LLVM
Event Timeline
test/Refactor/tool-apply-replacements.cpp | ||
---|---|---|
6 | Why is the result class {? | |
tools/clang-refactor/ClangRefactor.cpp | ||
319 | I think Changes or SourceChanges would be a clearer variable name. | |
330 | s/AllSourceReplacements/Changes or SourceChanges for clarity. | |
410 | s/Replacements/Changes/ ? | |
416 | I think we would also want to clean up by default in the future. Maybe add this to FIXME as well? |
Address review comments
test/Refactor/tool-apply-replacements.cpp | ||
---|---|---|
6 | Sorry, the test was broken. Fixed! |
include/clang/Frontend/CommandLineSourceLoc.h | ||
---|---|---|
57 | Add a comment documenting what the first element and second element of the pair represent for (<Line, Column>? If I understand correctly). | |
60 | Would be clearer to document the valid format of the Str. | |
test/Refactor/tool-apply-replacements.cpp | ||
4 | Maybe add one more case for testing -selection=%t.cp.cpp:6:7-6:15. | |
tools/clang-refactor/ClangRefactor.cpp | ||
315 | Add override. | |
319–330 | The same, override. | |
422 | nit: missing a blank after open. |
Add a comment documenting what the first element and second element of the pair represent for (<Line, Column>? If I understand correctly).