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 | ||
---|---|---|
7 | Why is the result class {? | |
tools/clang-refactor/ClangRefactor.cpp | ||
313–320 | I think Changes or SourceChanges would be a clearer variable name. | |
324 | s/AllSourceReplacements/Changes or SourceChanges for clarity. | |
400 | s/Replacements/Changes/ ? | |
406 | 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 | ||
---|---|---|
7 | 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 | ||
309 | Add override. | |
313–320 | The same, override. | |
412 | 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).