diff options
author | Haojian Wu <hokein@google.com> | 2017-10-20 12:37:16 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2017-10-20 12:37:16 +0000 |
commit | 55186786a9a984ea7bd47496c05c6ea379b47ad2 (patch) | |
tree | f0dbf35f582535471d93618e3d9c107cc68404f1 /clang/test/Refactor | |
parent | f761d0e514c593c49f9dde7eebd293e97b80b8b4 (diff) | |
download | llvm-55186786a9a984ea7bd47496c05c6ea379b47ad2.zip llvm-55186786a9a984ea7bd47496c05c6ea379b47ad2.tar.gz llvm-55186786a9a984ea7bd47496c05c6ea379b47ad2.tar.bz2 |
[clang-refactor] Add "-Inplace" option to the commandline tool.
Summary:
Change clang-refactor default behavior to print the new code after refactoring
(instead of editing the source files), which would make it easier to use
and debug the refactoring action.
Reviewers: arphaman, ioeric
Reviewed By: arphaman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D39092
llvm-svn: 316212
Diffstat (limited to 'clang/test/Refactor')
-rw-r--r-- | clang/test/Refactor/tool-apply-replacements.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/test/Refactor/tool-apply-replacements.cpp b/clang/test/Refactor/tool-apply-replacements.cpp index 9f45950..59b0991 100644 --- a/clang/test/Refactor/tool-apply-replacements.cpp +++ b/clang/test/Refactor/tool-apply-replacements.cpp @@ -1,10 +1,8 @@ -// RUN: rm -f %t.cp.cpp -// RUN: cp %s %t.cp.cpp -// RUN: clang-refactor local-rename -selection=%t.cp.cpp:9:7 -new-name=test %t.cp.cpp -- -// RUN: grep -v CHECK %t.cp.cpp | FileCheck %t.cp.cpp -// RUN: cp %s %t.cp.cpp -// RUN: clang-refactor local-rename -selection=%t.cp.cpp:9:7-9:15 -new-name=test %t.cp.cpp -- -// RUN: grep -v CHECK %t.cp.cpp | FileCheck %t.cp.cpp +// RUN: sed -e 's#//.*$##' %s > %t.cpp +// RUN: clang-refactor local-rename -selection=%t.cpp:7:7 -new-name=test %t.cpp -- | FileCheck %s +// RUN: clang-refactor local-rename -selection=%t.cpp:7:7-7:15 -new-name=test %t.cpp -- | FileCheck %s +// RUN: clang-refactor local-rename -i -selection=%t.cpp:7:7 -new-name=test %t.cpp -- +// RUN: FileCheck -input-file=%t.cpp %s class RenameMe { // CHECK: class test { |