Debian Codegraph @

clang_delta/tests/param-to-local/param.cc

raw
1 // RUN: %clang_delta --transformation=param-to-local --counter=1 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-1
2 // RUN: %clang_delta --transformation=param-to-local --counter=2 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-2
3 // RUN: %clang_delta --transformation=param-to-local --counter=3 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-3
4 // RUN: %clang_delta --transformation=param-to-local --counter=4 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-4
5 // RUN: %clang_delta --transformation=param-to-local --counter=5 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-5
6 // RUN: %clang_delta --transformation=param-to-local --counter=6 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-6
7 // RUN: %clang_delta --transformation=param-to-local --counter=7 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-7
8 // RUN: %clang_delta --transformation=param-to-local --counter=8 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-8
9 // RUN: %clang_delta --transformation=param-to-local --counter=9 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-9
10 // RUN: %clang_delta --transformation=param-to-local --counter=10 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-10
11 // RUN: %clang_delta --transformation=param-to-local --counter=11 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-11
12 // RUN: %clang_delta --transformation=param-to-local --counter=12 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-12
13 // RUN: %clang_delta --transformation=param-to-local --counter=13 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-13
14 // RUN: %clang_delta --transformation=param-to-local --counter=14 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-14
15 // RUN: %clang_delta --transformation=param-to-local --counter=15 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-15
16 // RUN: %clang_delta --transformation=param-to-local --counter=16 %s 2>&1 | %remove_lit_checks | FileCheck %s --check-prefix=CHECK-16
17
18 void foo1(void *) {}
19 void foo2( int * ) {}
20 void foo3( int* ) {}
21 void foo4(int*) {}
22 void foo5(int, int) {}
23 void foo6(int x, int) {}
24 void foo7(int x, int y = 111) {}
25 void foo8(int x, int y = 123, int z = 244) {}
26 void foo9(int x, int, int z = 111) {}
27
28 // CHECK-1: void foo1(void) {}
29 // CHECK-1: void foo2( int * ) {}
30
31 // CHECK-2: void foo1(void *) {}
32 // CHECK-2: void foo2( void ) {}
33 // CHECK-2: void foo3( int* ) {}
34
35 // CHECK-3: void foo2( int * ) {}
36 // CHECK-3: void foo3( void ) {}
37 // CHECK-3: void foo4(int*) {}
38
39 // CHECK-4: void foo3( int* ) {}
40 // CHECK-4: void foo4(void) {}
41 // CHECK-4: void foo5(int, int) {}
42
43 // CHECK-5: void foo4(int*) {}
44 // CHECK-5: void foo5( int) {}
45 // CHECK-5: void foo6(int x, int) {}
46
47 // CHECK-6: void foo4(int*) {}
48 // CHECK-6: void foo5(int) {}
49 // CHECK-6: void foo6(int x, int) {}
50
51 // CHECK-7: void foo5(int, int) {}
52 // CHECK-7: void foo6( int) {
53 // CHECK-7: int x = 0;}
54 // CHECK-7: void foo7(int x, int y = 111) {}
55
56 // CHECK-8: void foo5(int, int) {}
57 // CHECK-8: void foo6(int x) {}
58 // CHECK-8: void foo7(int x, int y = 111) {}
59
60 // CHECK-9: void foo6(int x, int) {}
61 // CHECK-9: void foo7( int y = 111) {
62 // CHECK-9: int x = 0;}
63 // CHECK-9: void foo8(int x, int y = 123, int z = 244) {}
64
65 // CHECK-10: void foo6(int x, int) {}
66 // CHECK-10: void foo7(int x) {
67 // CHECK-10: int y = 111;}
68 // CHECK-10: void foo8(int x, int y = 123, int z = 244) {}
69
70 // CHECK-11: void foo7(int x, int y = 111) {}
71 // CHECK-11: void foo8( int y = 123, int z = 244) {
72 // CHECK-11: int x = 0;}
73 // CHECK-11: void foo9(int x, int, int z = 111) {}
74
75 // CHECK-12: void foo7(int x, int y = 111) {}
76 // CHECK-12: void foo8(int x, int z = 244) {
77 // CHECK-12: int y = 123;}
78 // CHECK-12: void foo9(int x, int, int z = 111) {}
79
80 // CHECK-13: void foo7(int x, int y = 111) {}
81 // CHECK-13: void foo8(int x, int y = 123) {
82 // CHECK-13: int z = 244;}
83 // CHECK-13: void foo9(int x, int, int z = 111) {}
84
85 // CHECK-14: void foo8(int x, int y = 123, int z = 244) {}
86 // CHECK-14: void foo9( int, int z = 111) {
87 // CHECK-14: int x = 0;}
88
89 // CHECK-15: void foo8(int x, int y = 123, int z = 244) {}
90 // CHECK-15: void foo9(int x, int z = 111) {}
91
92 // CHECK-16: void foo8(int x, int y = 123, int z = 244) {}
93 // CHECK-16: void foo9(int x, int) {
94 // CHECK-16: int z = 111;}
95