blob: 0e073f6e1c1ea438bb9cc435693867f7c7fb0c4a [file] [log] [blame]
Alex Lorenzad38fbf2017-10-13 01:53:13 +00001// RUN: clang-refactor local-rename -selection=test:%s -new-name=test -v %s -- | FileCheck %s
Alex Lorenzb54ef6a2017-09-14 10:06:52 +00002
3/*range=*/int test;
4
5/*range named=*/int test2;
6
7/*range= +1*/int test3;
8
9/* range = +100 */int test4;
10
11/*range named =+0*/int test5;
12
Alex Lorenz7fe441b2017-10-24 17:18:45 +000013/*range =->+0:22*/int test6;
14
Alex Lorenzb54ef6a2017-09-14 10:06:52 +000015// CHECK: Test selection group '':
Alex Lorenzad38fbf2017-10-13 01:53:13 +000016// CHECK-NEXT: 105-105
17// CHECK-NEXT: 158-158
18// CHECK-NEXT: 197-197
Alex Lorenz7fe441b2017-10-24 17:18:45 +000019// CHECK-NEXT: 248-251
Alex Lorenzb54ef6a2017-09-14 10:06:52 +000020// CHECK-NEXT: Test selection group 'named':
Alex Lorenzad38fbf2017-10-13 01:53:13 +000021// CHECK-NEXT: 132-132
22// CHECK-NEXT: 218-218
Alex Lorenzb54ef6a2017-09-14 10:06:52 +000023
24// The following invocations are in the default group:
25
26// CHECK: invoking action 'local-rename':
27// CHECK-NEXT: -selection={{.*}}tool-test-support.c:3:11
28
29// CHECK: invoking action 'local-rename':
30// CHECK-NEXT: -selection={{.*}}tool-test-support.c:7:15
31
32// CHECK: invoking action 'local-rename':
33// CHECK-NEXT: -selection={{.*}}tool-test-support.c:9:29
34
Alex Lorenz7fe441b2017-10-24 17:18:45 +000035// CHECK: invoking action 'local-rename':
36// CHECK-NEXT: -selection={{.*}}tool-test-support.c:13:19 -> {{.*}}tool-test-support.c:13:22
Alex Lorenzb54ef6a2017-09-14 10:06:52 +000037
38// The following invocations are in the 'named' group, and they follow
39// the default invocation even if some of their ranges occur prior to the
40// ranges from the default group because the groups are tested one-by-one:
41
42// CHECK: invoking action 'local-rename':
43// CHECK-NEXT: -selection={{.*}}tool-test-support.c:5:17
44
45// CHECK: invoking action 'local-rename':
46// CHECK-NEXT: -selection={{.*}}tool-test-support.c:11:20