1 // RUN: clang-refactor extract -selection=test:%s %s -- 2>&1 | grep -v CHECK | FileCheck %s
4 + (id)arrayWithObjects:(const id [])objects count:(unsigned long)cnt;
7 void extractStatementNoSemiObjCFor(NSArray *array) {
8 /*range astmt=->+2:4*/for (id i in array) {
12 // CHECK: 1 'astmt' results:
13 // CHECK: static void extracted() {
14 // CHECK-NEXT: for (id i in array) {
15 // CHECK-NEXT: int x = 0;
17 // CHECK-NEXT: }{{[[:space:]].*}}
19 void extractStatementNoSemiSync(void) {
21 /*range bstmt=->+2:4*/@synchronized(lock) {
25 // CHECK: 1 'bstmt' results:
26 // CHECK: static void extracted() {
27 // CHECK-NEXT: @synchronized(lock) {
28 // CHECK-NEXT: int x = 0;
30 // CHECK-NEXT: }{{[[:space:]].*}}
32 void extractStatementNoSemiAutorel(void) {
33 /*range cstmt=->+2:4*/@autoreleasepool {
37 // CHECK: 1 'cstmt' results:
38 // CHECK: static void extracted() {
39 // CHECK-NEXT: @autoreleasepool {
40 // CHECK-NEXT: int x = 0;
42 // CHECK-NEXT: }{{[[:space:]].*}}
44 void extractStatementNoSemiTryFinalllllly(void) {
45 /*range dstmt=->+3:4*/@try {
50 // CHECK: 1 'dstmt' results:
51 // CHECK: static void extracted() {
53 // CHECK-NEXT: int x = 0;
54 // CHECK-NEXT: } @finally {
56 // CHECK-NEXT: }{{[[:space:]].*}}