Mercurial > hg > CbC > CbC_llvm
comparison clang/test/CodeGenCXX/for-range.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | c4bab56944e8 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
30 B *begin(C&); | 30 B *begin(C&); |
31 B *end(C&); | 31 B *end(C&); |
32 | 32 |
33 extern B array[5]; | 33 extern B array[5]; |
34 | 34 |
35 // CHECK-LABEL: define void @_Z9for_arrayv( | 35 // CHECK-LABEL: define{{.*}} void @_Z9for_arrayv( |
36 void for_array() { | 36 void for_array() { |
37 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) | 37 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) |
38 A a; | 38 A a; |
39 for (B b : array) { | 39 for (B b : array) { |
40 // CHECK-NOT: 5begin | 40 // CHECK-NOT: 5begin |
59 // CHECK: [[END]]: | 59 // CHECK: [[END]]: |
60 // CHECK: call void @_ZN1AD1Ev(%struct.A* [[A]]) | 60 // CHECK: call void @_ZN1AD1Ev(%struct.A* [[A]]) |
61 // CHECK: ret void | 61 // CHECK: ret void |
62 } | 62 } |
63 | 63 |
64 // CHECK-LABEL: define void @_Z9for_rangev( | 64 // CHECK-LABEL: define{{.*}} void @_Z9for_rangev( |
65 void for_range() { | 65 void for_range() { |
66 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) | 66 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) |
67 A a; | 67 A a; |
68 for (B b : C()) { | 68 for (B b : C()) { |
69 // CHECK: call void @_ZN1CC1Ev( | 69 // CHECK: call void @_ZN1CC1Ev( |
91 // CHECK: [[END]]: | 91 // CHECK: [[END]]: |
92 // CHECK: call void @_ZN1AD1Ev(%struct.A* [[A]]) | 92 // CHECK: call void @_ZN1AD1Ev(%struct.A* [[A]]) |
93 // CHECK: ret void | 93 // CHECK: ret void |
94 } | 94 } |
95 | 95 |
96 // CHECK-LABEL: define void @_Z16for_member_rangev( | 96 // CHECK-LABEL: define{{.*}} void @_Z16for_member_rangev( |
97 void for_member_range() { | 97 void for_member_range() { |
98 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) | 98 // CHECK: call void @_ZN1AC1Ev(%struct.A* [[A:.*]]) |
99 A a; | 99 A a; |
100 for (B b : D()) { | 100 for (B b : D()) { |
101 // CHECK: call void @_ZN1DC1Ev( | 101 // CHECK: call void @_ZN1DC1Ev( |