We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68e1137 commit f549520Copy full SHA for f549520
clang/test/CIR/CodeGen/try-catch.cpp
@@ -149,3 +149,22 @@ void tc6() {
149
// CHECK: cir.yield
150
// CHECK: }
151
152
+
153
+// CHECK: cir.func @_Z3tc7v()
154
+void tc7() {
155
+ int r = 1;
156
+ try {
157
+ ++r;
158
+ return;
159
+ } catch (...) {
160
+ }
161
+}
162
163
+// CHECK: cir.scope {
164
+// CHECK: cir.try {
165
+// CHECK: %[[V2:.*]] = cir.load {{.*}} : !cir.ptr<!s32i>, !s32i
166
+// CHECK: %[[V3:.*]] = cir.unary(inc, %[[V2]]) : !s32i, !s32i
167
+// CHECK: cir.store %[[V3]], {{.*}} : !s32i, !cir.ptr<!s32i>
168
+// CHECK: cir.return
169
+// CHECK: }
170
0 commit comments