| 1 |
// RUN: %clang_delta --transformation=remove-unused-function --counter=1 %s 2>&1 | %remove_lit_checks | FileCheck %s |
| 2 |
// RUN: %clang_delta --transformation=remove-unused-function --counter=2 %s 2>&1 | %remove_lit_checks | FileCheck %s -check-prefix=CHECK-SECOND |
| 3 |
// RUN: %clang_delta --transformation=remove-unused-function --counter=3 %s 2>&1 | %remove_lit_checks | FileCheck %s -check-prefix=CHECK-THIRD |
| 4 |
// RUN: %clang_delta --transformation=remove-unused-function --counter=4 %s 2>&1 | %remove_lit_checks | FileCheck %s -check-prefix=CHECK-FOURTH |
| 5 |
|
| 6 |
// CHECK-NOT: void foo(); |
| 7 |
// CHECK-SECOND: void foo(); |
| 8 |
// CHECK-THIRD: void foo(); |
| 9 |
// CHECK-FOURTH: void foo(); |
| 10 |
void foo(); |
| 11 |
// CHECK: void bar(int x) { |
| 12 |
// CHECK-SECOND-NOT: void bar(int x) { |
| 13 |
// CHECK-THIRD: void bar(int x) { |
| 14 |
// CHECK-FOURTH: void bar(int x) { |
| 15 |
void bar(int x) { |
| 16 |
|
| 17 |
// CHECK: } |
| 18 |
// CHECK-SECOND-NOT: } |
| 19 |
// CHECK-THIRD: } |
| 20 |
// CHECK-FOURTH: } |
| 21 |
} |
| 22 |
// CHECK: extern int baz(int x, |
| 23 |
// CHECK-SECOND: extern int baz(int x, |
| 24 |
// CHECK-THIRD-NOT: extern int baz(int x, |
| 25 |
// CHECK-FOURTH: extern int baz(int x, |
| 26 |
extern int baz(int x, |
| 27 |
// CHECK: int y); |
| 28 |
// CHECK-SECOND: int y); |
| 29 |
// CHECK-THIRD-NOT: int y); |
| 30 |
// CHECK-FOURTH: int y); |
| 31 |
int y); |
| 32 |
|
| 33 |
// CHECK: extern "C" { |
| 34 |
// CHECK-SECOND: extern "C" { |
| 35 |
// CHECK-THIRD: extern "C" { |
| 36 |
// CHECK-FOURTH: extern "C" { |
| 37 |
extern "C" { |
| 38 |
// CHECK: long long f1() {} |
| 39 |
// CHECK-SECOND: long long f1() {} |
| 40 |
// CHECK-THIRD: long long f1() {} |
| 41 |
// CHECK-FOURTH-NOT: long long f1() {} |
| 42 |
long long f1() {} |
| 43 |
// CHECK: } |
| 44 |
// CHECK-SECOND: } |
| 45 |
// CHECK-THIRD: } |
| 46 |
// CHECK-FOURTH: } |
| 47 |
} |